[llvm] 5dcf0c3 - [X86] lowerShuffleWithVPMOV - remove oneuse constraints on shuffle(trunc(x),undef) -> vpmov(x) lowering

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 06:12:33 PDT 2022


Author: Simon Pilgrim
Date: 2022-08-11T14:06:42+01:00
New Revision: 5dcf0c342bc81e9b2338ba0fd08a188d9829b7d3

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

LOG: [X86] lowerShuffleWithVPMOV - remove oneuse constraints on shuffle(trunc(x),undef) -> vpmov(x) lowering

These were added in rG057bdd63 but shuffle combining has gotten a lot better at folding different vector widths since then.

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 102055c2618d6..bea4d58e758ec 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -12412,11 +12412,7 @@ static SDValue lowerShuffleWithVPMOV(const SDLoc &DL, MVT VT, SDValue V1,
         !Zeroable.extractBits(UpperElts, NumSrcElts).isAllOnes())
       continue;
 
-    SDValue Src = V1;
-    if (!Src.hasOneUse())
-      return SDValue();
-
-    Src = peekThroughOneUseBitcasts(Src);
+    SDValue Src = peekThroughBitcasts(V1);
     if (Src.getOpcode() != ISD::TRUNCATE ||
         Src.getScalarValueSizeInBits() != (EltSizeInBits * Scale))
       return SDValue();


        


More information about the llvm-commits mailing list