Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index d022a82f4df540d5078dcdebc184eb3bba1566fd..de936b4a18edd79fd8371f1af201e6436389f952 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1762,7 +1762,14 @@ void LCodeGen::DoShiftI(LShiftI* instr) { |
break; |
case Token::SHL: |
if (shift_count != 0) { |
- __ shl(ToRegister(left), shift_count); |
+ if (instr->hydrogen_value()->representation().IsSmi() && |
+ instr->can_deopt()) { |
+ __ shl(ToRegister(left), shift_count - 1); |
+ __ SmiTag(ToRegister(left)); |
+ DeoptimizeIf(overflow, instr->environment()); |
+ } else { |
+ __ shl(ToRegister(left), shift_count); |
+ } |
} |
break; |
default: |