diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-30 05:56:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-30 05:56:44 +0000 |
commit | 93ad6170fd3b201ed119d1c4086a393670260f11 (patch) | |
tree | b727a9974747c825be3314a169119ba3a06bffc8 /llvm/lib/Transforms | |
parent | 97fd3599e1e8c8fa2c6e789bfb61a5fd32d3bd4b (diff) | |
download | bcm5719-llvm-93ad6170fd3b201ed119d1c4086a393670260f11.tar.gz bcm5719-llvm-93ad6170fd3b201ed119d1c4086a393670260f11.zip |
fix a bug I introduced in r80478 found by the build bot.
llvm-svn: 80482
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 3527eee2c74..4102e6ceddb 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -11240,7 +11240,8 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) { Scale = ConstantInt::get(Scale->getType(), Scale->getZExtValue() / ArrayEltSize); if (Scale->getZExtValue() != 1) { - Constant *C = ConstantExpr::getZExt(Scale, NewIdx->getType()); + Constant *C = ConstantExpr::getIntegerCast(Scale, NewIdx->getType(), + false /*ZExt*/); Instruction *Sc = BinaryOperator::CreateMul(NewIdx, C, "idxscale"); NewIdx = InsertNewInstBefore(Sc, GEP); } |