summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/instruction_simplifier.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r--compiler/optimizing/instruction_simplifier.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 2ef19b92a1..56ec8a7ed1 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -292,8 +292,7 @@ void InstructionSimplifierVisitor::VisitMul(HMul* instruction) {
// MUL dst, src, pow_of_2
// with
// SHL dst, src, log2(pow_of_2)
- HIntConstant* shift = new (allocator) HIntConstant(WhichPowerOf2(factor));
- block->InsertInstructionBefore(shift, instruction);
+ HIntConstant* shift = GetGraph()->GetIntConstant(WhichPowerOf2(factor));
HShl* shl = new(allocator) HShl(type, input_other, shift);
block->ReplaceAndRemoveInstructionWith(instruction, shl);
}