[RISCV] Add test for miscompile of vector.interleave when odd vector is literal poison.
The interleave lowering relies on a math trick that requires passing the odd vector to two math instructions. In order to be correct these instructions must see the same value. If the odd vector is provably poison or undef, SelectionDAG will create a vwadd and vwmaccu where the operand is a copy from IMPLICIT_DEF. Later this will become just the undef flag on the operand. This gives the register allocator freedom to pick a different register for each instruction.
parent
d595080b
Please register or sign in to comment