summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-20 10:10:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-20 10:10:26 +0000
commit00a640dbe0c447aad6f300b7f00b190e612daa07 (patch)
tree16f0923ed1b0099679514ccfc0e56da29891cc5d /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentdfd79ad319eea567262905345227a40a75610e7e (diff)
downloadbcm5719-llvm-00a640dbe0c447aad6f300b7f00b190e612daa07.tar.gz
bcm5719-llvm-00a640dbe0c447aad6f300b7f00b190e612daa07.zip
Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.
llvm-svn: 33398
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index fa48d546dd7..fa546d2e2d2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/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];
OpenPOWER on IntegriCloud