[llvm] f84efe9 - [X86][AVX] combineHorizOpWithShuffle - fix valuetype comparison typo.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 08:36:53 PST 2021


Author: Simon Pilgrim
Date: 2021-01-28T16:36:23Z
New Revision: f84efe97bce138af0f8e21d3a03b7c5be168705b

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

LOG: [X86][AVX] combineHorizOpWithShuffle - fix valuetype comparison typo.

Ensure we check the valuetypes of all the HOP(SHUFFLE(X,Y),SHUFFLE(X,Y)) shuffle input ops - there was a copy+paste typo (noticed by MSVC analyzer) that meant we were checking the same input from one of the shuffles twice.

I haven't been able to create a test case for this yet - I don't think its currently possible to create a target/faux binary shuffle that scales to a 2x128 shuffle mask from two different value types.

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 6b816c710f98..00dbc7a35b87 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -43184,7 +43184,7 @@ static SDValue combineHorizOpWithShuffle(SDNode *N, SelectionDAG &DAG,
       SDValue Op10 = Ops1.front(), Op11 = Ops1.back();
       SmallVector<int, 2> ShuffleMask0, ShuffleMask1;
       if (Op00.getValueType() == SrcVT && Op01.getValueType() == SrcVT &&
-          Op11.getValueType() == SrcVT && Op11.getValueType() == SrcVT &&
+          Op10.getValueType() == SrcVT && Op11.getValueType() == SrcVT &&
           scaleShuffleElements(Mask0, 2, ShuffleMask0) &&
           scaleShuffleElements(Mask1, 2, ShuffleMask1)) {
         if ((Op00 == Op11) && (Op01 == Op10)) {


        


More information about the llvm-commits mailing list