Remove an incorrect optimization that is performed correctly by
[oota-llvm.git] / lib / Target / X86 / X86ISelLowering.cpp
index 2f629aca284ad24ceb0fdfe9e4ddb299a070e5ae..4aff4c5e23692717e365865c4703e0257488d865 100644 (file)
@@ -3608,17 +3608,7 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT(SDOperand Op, SelectionDAG &DAG) {
       N2 = DAG.getConstant(cast<ConstantSDNode>(N2)->getValue(),getPointerTy());
     return DAG.getNode(X86ISD::PINSRW, VT, N0, N1, N2);
   }
-
-  N1 = DAG.getNode(ISD::SCALAR_TO_VECTOR, VT, N1);
-  unsigned Idx = cast<ConstantSDNode>(N2)->getValue();
-  MVT::ValueType MaskVT = MVT::getIntVectorWithNumElements(4);
-  MVT::ValueType MaskEVT = MVT::getVectorElementType(MaskVT);
-  SmallVector<SDOperand, 4> MaskVec;
-  for (unsigned i = 0; i < 4; ++i)
-    MaskVec.push_back(DAG.getConstant((i == Idx) ? i+4 : i, MaskEVT));
-  return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, N0, N1,
-                     DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
-                                 &MaskVec[0], MaskVec.size()));
+  return SDOperand();
 }
 
 SDOperand