Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-01-20 10:10:26 +00:00
parent f4d5de4080
commit 597a3bde35

View File

@ -3251,7 +3251,7 @@ SDOperand DAGCombiner::visitVBUILD_VECTOR(SDNode *N) {
SmallVector<SDOperand, 8> BuildVecIndices; SmallVector<SDOperand, 8> BuildVecIndices;
for (unsigned i = 0; i != NumInScalars; ++i) { for (unsigned i = 0; i != NumInScalars; ++i) {
if (N->getOperand(i).getOpcode() == ISD::UNDEF) { if (N->getOperand(i).getOpcode() == ISD::UNDEF) {
BuildVecIndices.push_back(DAG.getNode(ISD::UNDEF, MVT::i32)); BuildVecIndices.push_back(DAG.getNode(ISD::UNDEF, TLI.getPointerTy()));
continue; continue;
} }
@ -3265,12 +3265,13 @@ SDOperand DAGCombiner::visitVBUILD_VECTOR(SDNode *N) {
// Otherwise, use InIdx + VecSize // Otherwise, use InIdx + VecSize
unsigned Idx = cast<ConstantSDNode>(Extract.getOperand(1))->getValue(); unsigned Idx = cast<ConstantSDNode>(Extract.getOperand(1))->getValue();
BuildVecIndices.push_back(DAG.getConstant(Idx+NumInScalars, MVT::i32)); BuildVecIndices.push_back(DAG.getConstant(Idx+NumInScalars,
TLI.getPointerTy()));
} }
// Add count and size info. // Add count and size info.
BuildVecIndices.push_back(NumElts); BuildVecIndices.push_back(NumElts);
BuildVecIndices.push_back(DAG.getValueType(MVT::i32)); BuildVecIndices.push_back(DAG.getValueType(TLI.getPointerTy()));
// Return the new VVECTOR_SHUFFLE node. // Return the new VVECTOR_SHUFFLE node.
SDOperand Ops[5]; SDOperand Ops[5];