Revision: 15958
Author: [email protected]
Date: Tue Jul 30 06:30:03 2013
Log: Don't generate a shift left by one if can deoptimize on ia32 and
arm and mips.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/21196006
http://code.google.com/p/v8/source/detail?r=15958
Modified:
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Jul 29
10:17:19 2013
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Tue Jul 30
06:30:03 2013
@@ -1744,7 +1744,9 @@
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 {
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Jul 29
10:17:19 2013
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Tue Jul 30
06:30:03 2013
@@ -1771,7 +1771,9 @@
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 {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Jul 29
06:56:51 2013
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jul 30
06:30:03 2013
@@ -1583,7 +1583,9 @@
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 {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.