MIPS: Eliminate Smi check when changing from Smi to Integer32
Port r16362 (6dd68a5c) BUG= Review URL: https://codereview.chromium.org/23462004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
8a277a790e
commit
6d1f0cc285
@ -1844,11 +1844,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|||||||
ASSERT(to.IsInteger32());
|
ASSERT(to.IsInteger32());
|
||||||
LOperand* value = NULL;
|
LOperand* value = NULL;
|
||||||
LInstruction* res = NULL;
|
LInstruction* res = NULL;
|
||||||
if (instr->value()->type().IsSmi()) {
|
HValue* val = instr->value();
|
||||||
value = UseRegisterAtStart(instr->value());
|
if (val->type().IsSmi() || val->representation().IsSmi()) {
|
||||||
|
value = UseRegisterAtStart(val);
|
||||||
res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
|
res = DefineAsRegister(new(zone()) LSmiUntag(value, false));
|
||||||
} else {
|
} else {
|
||||||
value = UseRegister(instr->value());
|
value = UseRegister(val);
|
||||||
LOperand* temp1 = TempRegister();
|
LOperand* temp1 = TempRegister();
|
||||||
LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
|
LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
|
||||||
: NULL;
|
: NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user