OSDN Git Service

[X86] Early out of combineInsertSubvector for mask vectors.
authorCraig Topper <craig.topper@intel.com>
Sat, 12 Aug 2017 22:33:58 +0000 (22:33 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 12 Aug 2017 22:33:58 +0000 (22:33 +0000)
The combines here shouldn't be done for mask vectors, but it wasn't clear anything was preventing that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310786 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 1c3e557..3860d94 100644 (file)
@@ -35504,13 +35504,18 @@ static SDValue combineInsertSubvector(SDNode *N, SelectionDAG &DAG,
   if (DCI.isBeforeLegalizeOps())
     return SDValue();
 
+  MVT OpVT = N->getSimpleValueType(0);
+
+  // Early out for mask vectors.
+  if (OpVT.getVectorElementType() == MVT::i1)
+    return SDValue();
+
   SDLoc dl(N);
   SDValue Vec = N->getOperand(0);
   SDValue SubVec = N->getOperand(1);
   SDValue Idx = N->getOperand(2);
 
   unsigned IdxVal = cast<ConstantSDNode>(Idx)->getZExtValue();
-  MVT OpVT = N->getSimpleValueType(0);
   MVT SubVecVT = SubVec.getSimpleValueType();
 
   // If this is an insert of an extract, combine to a shuffle. Don't do this