| Index: src/x64/lithium-x64.cc
|
| ===================================================================
|
| --- src/x64/lithium-x64.cc (revision 6458)
|
| +++ src/x64/lithium-x64.cc (working copy)
|
| @@ -1183,8 +1183,12 @@
|
| if (instr->representation().IsInteger32()) {
|
| ASSERT(instr->left()->representation().IsInteger32());
|
| ASSERT(instr->right()->representation().IsInteger32());
|
| - LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
| - LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
|
| + LOperand* left = UseRegisterAtStart(instr->left()->IsConstant()
|
| + ? instr->right()
|
| + : instr->left());
|
| + LOperand* right = UseOrConstantAtStart(instr->left()->IsConstant()
|
| + ? instr->left()
|
| + : instr->right());
|
| LAddI* add = new LAddI(left, right);
|
| LInstruction* result = DefineSameAsFirst(add);
|
| if (instr->CheckFlag(HValue::kCanOverflow)) {
|
|
|