[PATCH] D14664: [ARM] Match VABDL from log2 shuffles.

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 10:36:19 PST 2015


rengolin added a comment.

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 signals, because you end up with a FF00 or 00FF pattern in the intermediate results.

cheers,
--renato


http://reviews.llvm.org/D14664





More information about the llvm-commits mailing list