diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-20 10:10:26 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-20 10:10:26 +0000 |
commit | 597a3bde3578f33dc2a038186275b021c79c00b9 (patch) | |
tree | b1481553227cf5513c21825809a494627966a80c | |
parent | f4d5de4080c2ddb791c4c2171b30f47d51111e67 (diff) | |
download | external_llvm-597a3bde3578f33dc2a038186275b021c79c00b9.zip external_llvm-597a3bde3578f33dc2a038186275b021c79c00b9.tar.gz external_llvm-597a3bde3578f33dc2a038186275b021c79c00b9.tar.bz2 |
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
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index fa48d54..fa546d2 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3251,7 +3251,7 @@ SDOperand DAGCombiner::visitVBUILD_VECTOR(SDNode *N) { SmallVector<SDOperand, 8> BuildVecIndices; for (unsigned i = 0; i != NumInScalars; ++i) { 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; } @@ -3265,12 +3265,13 @@ SDOperand DAGCombiner::visitVBUILD_VECTOR(SDNode *N) { // Otherwise, use InIdx + VecSize 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. BuildVecIndices.push_back(NumElts); - BuildVecIndices.push_back(DAG.getValueType(MVT::i32)); + BuildVecIndices.push_back(DAG.getValueType(TLI.getPointerTy())); // Return the new VVECTOR_SHUFFLE node. SDOperand Ops[5]; |