Fix an issue where we tried to turn a v2f32 build_vector into a v4i32 build vector with 2 elts

llvm-svn: 118720
This commit is contained in:
Nate Begeman 2010-11-10 21:35:41 +00:00
parent 8f7220e9fd
commit ca52411955
1 changed files with 2 additions and 2 deletions

View File

@ -3546,8 +3546,8 @@ static SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
for (unsigned i = 0; i < NumElts; ++i)
Ops.push_back(DAG.getNode(ISD::BIT_CONVERT, dl, MVT::i32,
Op.getOperand(i)));
SDValue Val = DAG.getNode(ISD::BUILD_VECTOR, dl, MVT::v4i32, &Ops[0],
NumElts);
EVT VecVT = EVT::getVectorVT(*DAG.getContext(), MVT::i32, NumElts);
SDValue Val = DAG.getNode(ISD::BUILD_VECTOR, dl, VecVT, &Ops[0], NumElts);
Val = LowerBUILD_VECTOR(Val, DAG, ST);
if (Val.getNode())
return DAG.getNode(ISD::BIT_CONVERT, dl, VT, Val);