[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
Thu Apr 28 08:26:53 PDT 2016


RKSimon added a comment.

> We could generalize lowerVectorShuffleAsPSHUFB to ymm, but when I tried that was less readable than doing it inline.


How much did you have to do to alter lowerVectorShuffleAsPSHUFB? I'd have expected it to end up quite similar to the implementation in combineX86ShuffleChain which I thought was quite straightforward.


================
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);
----------------
Convention for lowering is to accept any negative value as undefined - its only later on that we make use of sentinel constants.


http://reviews.llvm.org/D19661





More information about the llvm-commits mailing list