> "Robin Dapp" <rdapp....@gmail.com> writes: >> But here I intended to just change the encoded value in memory and to >> prevent it from aliasing with other encoded values. >> In an actual instruction the values we "padded" (or that are beyond the >> vector length) are ignored. For the purpose of hashing a mask of >> "1010" and "10101010" should be distinct which they are not right now >> because we don't stop at the length so to say. > > But what modes do "1010" and "10101010" represent here? And which code > treats them as equal? (It should be ok if the hashes are equal, as long > as the equality function distinguishes them.)
I realize I didn't fully detail that in the original post, sorry :/ In my test case we have two functions one with the first mask ("1010" for V4BI) and another one performing a similar operation just for V8BI ("10101010"). In optimize_constant_pool we use native_encode_rtx to encode the value into a buffer (of size GET_MODE_SIZE which is one byte here). IIRC the whole function works at byte granularity. htab->find_slot_with_hash then finds the same hash for the V4BI and V8BI masks, and we wrongly unify it. -- Regards Robin