[PATCH] D23027: [X86][SSE] Avoid specifying unused arguments in SHUFPD lowering
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 20 14:33:53 PDT 2016
craig.topper added a subscriber: craig.topper.
================
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));
----------------
spatel wrote:
> 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..."
If this comes from a generic VECTOR_SHUFFLE, then we can assume that the only value less than 0 will be -1 so the < 0 is safe. The SM_SentinelUndef is needed if you can get here using a mask from a target shuffle which uses -2 to represent zeroable. Sometimes I think we should use a zeroable bit vector for target shuffles like we do for VECTOR_SHUFFLE.
Repository:
rL LLVM
https://reviews.llvm.org/D23027
More information about the llvm-commits
mailing list