[llvm] 4879c8f - [X86][SSE] combineVectorTruncation - simplify PSHUFB-is-better logic. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 6 12:04:54 PDT 2021


Author: Simon Pilgrim
Date: 2021-06-06T20:04:14+01:00
New Revision: 4879c8f3b06eebb498c28c3d2aa6bc0f3f9b961e

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

LOG: [X86][SSE] combineVectorTruncation - simplify PSHUFB-is-better logic. NFCI.

OutSVT is guaranteed to be i8/i16 and we accept any InSVT that isn't i64

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 5d6dbd190a3a..ea892b695f51 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -46546,9 +46546,7 @@ static SDValue combineVectorTruncation(SDNode *N, SelectionDAG &DAG,
     return SDValue();
 
   // SSSE3's pshufb results in less instructions in the cases below.
-  if (Subtarget.hasSSSE3() && NumElems == 8 &&
-      ((OutSVT == MVT::i8 && InSVT != MVT::i64) ||
-       (InSVT == MVT::i32 && OutSVT == MVT::i16)))
+  if (Subtarget.hasSSSE3() && NumElems == 8 && InSVT != MVT::i64)
     return SDValue();
 
   SDLoc DL(N);


        


More information about the llvm-commits mailing list