summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-14 17:32:56 +0000
committerChris Lattner <sabre@nondot.org>2005-09-14 17:32:56 +0000
commita393e4d4b32b8e4ff7618c80dd0fe5a444d89581 (patch)
tree126f93eefca4e54fb3a78207353407e76121e611 /llvm/lib/Transforms
parentb42e962d23ce00afcf2dc9e3754e5e675ec78032 (diff)
downloadbcm5719-llvm-a393e4d4b32b8e4ff7618c80dd0fe5a444d89581.tar.gz
bcm5719-llvm-a393e4d4b32b8e4ff7618c80dd0fe5a444d89581.zip
Fix the regression last night compiling povray
llvm-svn: 23348
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index a1095406181..13c0977cb30 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -4749,7 +4749,7 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
NewIdx = GEP.getOperand(1);
Scale = ConstantInt::get(NewIdx->getType(), 1);
} else if (ConstantInt *CI = dyn_cast<ConstantInt>(GEP.getOperand(1))) {
- NewIdx = ConstantInt::get(NewIdx->getType(), 1);
+ NewIdx = ConstantInt::get(CI->getType(), 1);
Scale = CI;
} else if (Instruction *Inst =dyn_cast<Instruction>(GEP.getOperand(1))){
if (Inst->getOpcode() == Instruction::Shl &&
@@ -4772,7 +4772,8 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
if (Scale && Scale->getRawValue() % ArrayEltSize == 0) {
if (ConstantSInt *C = dyn_cast<ConstantSInt>(Scale))
Scale = ConstantSInt::get(C->getType(),
- C->getRawValue()/(int64_t)ArrayEltSize);
+ (int64_t)C->getRawValue() /
+ (int64_t)ArrayEltSize);
else
Scale = ConstantUInt::get(Scale->getType(),
Scale->getRawValue() / ArrayEltSize);
OpenPOWER on IntegriCloud