Index: src/arm64/lithium-arm64.cc |
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc |
index 2d5f7f297c3deea0be673e4a73fda67e8bd8ef9a..d667f719e89138ab3d1ce07808867eefe8a533d4 100644 |
--- a/src/arm64/lithium-arm64.cc |
+++ b/src/arm64/lithium-arm64.cc |
@@ -1963,7 +1963,9 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) { |
: UseRegisterAtStart(least_const); |
LInstruction* result = |
DefineAsRegister(new(zone()) LMulConstIS(left, right)); |
- if ((bailout_on_minus_zero && constant <= 0) || can_overflow) { |
+ if ((bailout_on_minus_zero && constant <= 0) || |
+ (can_overflow && constant != 1 && |
+ base::bits::IsPowerOfTwo32(constant_abs))) { |
result = AssignEnvironment(result); |
} |
return result; |