From: palfia@homejinni.com Date: Tue, 27 Aug 2013 23:07:03 +0000 (+0000) Subject: MIPS: Eliminate Smi check when changing from Smi to Integer32 X-Git-Tag: upstream/4.7.83~12791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d1f0cc28509b4faeef40aacdd57575bb824f143;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 7b321df..b11c9c2 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -1844,11 +1844,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { ASSERT(to.IsInteger32()); LOperand* value = NULL; LInstruction* res = NULL; - if (instr->value()->type().IsSmi()) { - value = UseRegisterAtStart(instr->value()); + HValue* val = instr->value(); + if (val->type().IsSmi() || val->representation().IsSmi()) { + value = UseRegisterAtStart(val); res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); } else { - value = UseRegister(instr->value()); + value = UseRegister(val); LOperand* temp1 = TempRegister(); LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() : NULL;