[llvm] f5f7fd9 - [X86][SSE] combineX86ShuffleChain - remove unused shuffle(vzext_load(),undef) combine.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 07:20:57 PDT 2020


Author: Simon Pilgrim
Date: 2020-05-06T15:20:29+01:00
New Revision: f5f7fd990e0e9c6f786d48d9a6ea832f9d706c1a

URL: https://github.com/llvm/llvm-project/commit/f5f7fd990e0e9c6f786d48d9a6ea832f9d706c1a
DIFF: https://github.com/llvm/llvm-project/commit/f5f7fd990e0e9c6f786d48d9a6ea832f9d706c1a.diff

LOG: [X86][SSE] combineX86ShuffleChain - remove unused shuffle(vzext_load(),undef) combine.

This should always be caught by the various VZEXT_MOVL handling in combineTargetShuffle and SimplifyDemandedVectorEltsForTargetNode.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 77406b1cb173..5a4986a729a3 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -34260,22 +34260,6 @@ static SDValue combineX86ShuffleChain(ArrayRef<SDValue> Inputs, SDValue Root,
   APInt Zeroable = KnownUndef | KnownZero;
 
   if (UnaryShuffle) {
-    // If we are shuffling a X86ISD::VZEXT_LOAD then we can use the load
-    // directly if we don't shuffle the lower element and we shuffle the upper
-    // (zero) elements within themselves.
-    if (V1.getOpcode() == X86ISD::VZEXT_LOAD &&
-        (cast<MemIntrinsicSDNode>(V1)->getMemoryVT().getScalarSizeInBits() %
-         MaskEltSizeInBits) == 0) {
-      unsigned Scale =
-          cast<MemIntrinsicSDNode>(V1)->getMemoryVT().getScalarSizeInBits() /
-          MaskEltSizeInBits;
-      ArrayRef<int> HiMask(Mask.data() + Scale, NumMaskElts - Scale);
-      if (isSequentialOrUndefInRange(Mask, 0, Scale, 0) &&
-          isUndefOrZeroOrInRange(HiMask, Scale, NumMaskElts)) {
-        return DAG.getBitcast(RootVT, V1);
-      }
-    }
-
     // Attempt to match against broadcast-from-vector.
     // Limit AVX1 to cases where we're loading+broadcasting a scalar element.
     if ((Subtarget.hasAVX2() ||


        


More information about the llvm-commits mailing list