[PATCH] D19661: [X86] Also try to zero elts when lowering v32i8 shuffle with PSHUFB.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat May 7 07:56:50 PDT 2016


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with a couple of nits:

Please can you add a comment explaining why lowerVectorShuffleAsPSHUFB can't be used?

I think we're getting to the point where we should probably just generate Zeroable as standard and pass it around the same as Mask - we're generating it a lot these days. That would also make the addition of a 'isSingleInputShuffleMaskWithZeroables' helper more straightforward. We can look into this for a future patch.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:11448
@@ +11447,3 @@
+    for (int i = 0; i < 32; ++i) {
+      if (Mask[i] < 0)
+        PSHUFBMask[i] = DAG.getUNDEF(MVT::i8);
----------------
RKSimon wrote:
> Convention for lowering is to accept any negative value as undefined - its only later on that we make use of sentinel constants.
Sorry I was wrong here (I missed the Zeroable case afterward) - it should read Mask[i] == SM_SentinelUndef


http://reviews.llvm.org/D19661





More information about the llvm-commits mailing list