[PATCH] D23027: [X86][SSE] Avoid specifying unused arguments in SHUFPD lowering

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 20 13:33:36 PDT 2016


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

LGTM. See inline comment for one question.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:8965-8966
@@ -8965,1 +8964,4 @@
+    return DAG.getNode(X86ISD::SHUFP, DL, MVT::v2f64,
+                       Mask[0] < 0 ? DAG.getUNDEF(MVT::v2f64) : V1,
+                       Mask[1] < 0 ? DAG.getUNDEF(MVT::v2f64) : V1,
                        DAG.getConstant(SHUFPDMask, DL, MVT::i8));
----------------
I can never keep this straight, but shouldn't we use '== SM_SentinelUndef' here instead of '< 0'? 

Ie, we get here from lowerVectorShuffle() which uses ShuffleVectorSDNode->getMask() which says "An index of -1 is treated as undef..."


Repository:
  rL LLVM

https://reviews.llvm.org/D23027





More information about the llvm-commits mailing list