Revision: 18089
Author: [email protected]
Date: Tue Nov 26 20:31:47 2013 UTC
Log: MIPS: Optimize Integer32ToSmi.
Port r18084 (426bc19)
Original commit message:
Optimize register constraints and code generated for Integer32ToSmi Lithium
instruction.
TEST=none
BUG=
[email protected]
Review URL: https://codereview.chromium.org/88623004
Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=18089
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Nov 22
11:35:39 2013 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Nov 26
20:31:47 2013 UTC
@@ -4633,10 +4633,13 @@
LOperand* output = instr->result();
Register scratch = scratch0();
- __ SmiTagCheckOverflow(ToRegister(output), ToRegister(input), scratch);
+ ASSERT(output->IsRegister());
if (!instr->hydrogen()->value()->HasRange() ||
!instr->hydrogen()->value()->range()->IsInSmiRange()) {
+ __ SmiTagCheckOverflow(ToRegister(output), ToRegister(input), scratch);
DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg));
+ } else {
+ __ SmiTag(ToRegister(output), ToRegister(input));
}
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Mon Nov 25 21:25:15
2013 UTC
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Nov 26 20:31:47
2013 UTC
@@ -1951,8 +1951,8 @@
HValue* val = instr->value();
LOperand* value = UseRegister(val);
LInstruction* result = val->CheckFlag(HInstruction::kUint32)
- ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value))
- : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value));
+ ? DefineAsRegister(new(zone()) LUint32ToSmi(value))
+ : DefineAsRegister(new(zone()) LInteger32ToSmi(value));
if (val->HasRange() && val->range()->IsInSmiRange()) {
return result;
}
--
--
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.