aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index aa260da9b5..18da86a0e2 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -2422,10 +2422,10 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
}
Sum = BinaryOperator::create(Instruction::Add, SO1, GO1,
GEP.getOperand(0)->getName()+".sum", &GEP);
+ WorkList.push_back(cast<Instruction>(Sum));
}
GEP.setOperand(0, SrcGEPOperands[0]);
GEP.setOperand(1, Sum);
- WorkList.push_back(cast<Instruction>(Sum));
return &GEP;
} else if (isa<Constant>(*GEP.idx_begin()) &&
cast<Constant>(*GEP.idx_begin())->isNullValue() &&