diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index 929d04de13..5f5ce07476 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -1744,7 +1744,9 @@ void LCodeGen::DoShiftI(LShiftI* instr) { if (shift_count != 0) { if (instr->hydrogen_value()->representation().IsSmi() && instr->can_deopt()) { - __ mov(result, Operand(left, LSL, shift_count - 1)); + if (shift_count != 1) { + __ mov(result, Operand(left, LSL, shift_count - 1)); + } __ SmiTag(result, result, SetCC); DeoptimizeIf(vs, instr->environment()); } else { diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 3ddad068bf..a21a96575b 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -1771,7 +1771,9 @@ void LCodeGen::DoShiftI(LShiftI* instr) { if (shift_count != 0) { if (instr->hydrogen_value()->representation().IsSmi() && instr->can_deopt()) { - __ shl(ToRegister(left), shift_count - 1); + if (shift_count != 1) { + __ shl(ToRegister(left), shift_count - 1); + } __ SmiTag(ToRegister(left)); DeoptimizeIf(overflow, instr->environment()); } else { diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 8db5f00fbf..4fa0ac4455 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -1583,7 +1583,9 @@ void LCodeGen::DoShiftI(LShiftI* instr) { if (shift_count != 0) { if (instr->hydrogen_value()->representation().IsSmi() && instr->can_deopt()) { - __ sll(result, left, shift_count - 1); + if (shift_count != 1) { + __ sll(result, left, shift_count - 1); + } __ SmiTagCheckOverflow(result, result, scratch); DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg)); } else {