Commit 6d1f0cc2 authored by palfia@homejinni.com's avatar palfia@homejinni.com

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
parent 8a277a79
...@@ -1844,11 +1844,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment