[X86] Teach method 'isVectorClearMaskLegal' how to check for legal blend masks.
[oota-llvm.git] / lib / CodeGen / SelectionDAG / DAGCombiner.cpp
index 107f5a12693862cbfdfd5e0e5657ad7385f84dad..33b2527287e37daa172339890db3835d5177df4d 100644 (file)
@@ -11293,7 +11293,7 @@ SDValue DAGCombiner::XformToShuffleWithZero(SDNode *N) {
         if (cast<ConstantSDNode>(Elt)->isAllOnesValue())
           Indices.push_back(i);
         else if (cast<ConstantSDNode>(Elt)->isNullValue())
-          Indices.push_back(NumElts);
+          Indices.push_back(NumElts+i);
         else
           return SDValue();
       }