[PATCH] [AArch64] Fix a bug generating incorrect instruction when building small vector.
t.p.northover at gmail.com
Tue Jul 22 02:27:15 PDT 2014
> If LHS = v4i16, RHS = v8i8, result = v2i32, it must be LHS = v4i8, RHS = v8i8, result = v2i8 before legalization. Because the actual lane size is decided by the smallest element size among result and 2 operands, and all other larger element sizes must come from legalization. Please correct me if I'm wrong. Based on this logic, the mask <4, u, u, u, 8, u, u, u> is correct.
You shouldn't be assuming that these nodes come from some specific
path through legalisation that you understand. The node we're given
has clear semantics, no matter how it got to us, and it says that 16
bits from LHS need to be inserted into the final vector.
This isn't even theoretical, see the attached file for something that
reaches ReconstructShuffle very much as I described (I had to use
v4i32 as the result since only results with >= 4 vectors call
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 450 bytes
Desc: not available
More information about the llvm-commits