The patterns are pretty gross, but I couldn't see a more concise way of doing it.
The bitcasts are needed for the v2i64 and v8i16 cases because they're type-legalized to v4i32.
Differential D14664
[ARM] Match VABDL from log2 shuffles. • chatur01 on Nov 13 2015, 10:42 AM. Authored by
Details The patterns are pretty gross, but I couldn't see a more concise way of doing it. The bitcasts are needed for the v2i64 and v8i16 cases because they're type-legalized to v4i32.
Diff Detail
Event TimelineComment Actions Hi Charlie, It seems that this pattern is only valid if the original types were unsigned to begin with, which is a fair assumption, but Is there any guarantee that the zero-extend is exclusively used in unsigned values, or are there some legalization patterns that could zero extend for other reasons? For instance, this arithmetic shift-right is used instead of logical, in assumed unsigned values, because negative numbers will set the most significant bits of the double-size result registers, and you want to clear them out with the XOR. Funny, though, it also works when both values are negative, but not when they're of different signs, because you end up with a FF00 or 00FF pattern in the intermediate results. cheers, |