| Index: src/arm/lithium-arm.cc
|
| ===================================================================
|
| --- src/arm/lithium-arm.cc (revision 6458)
|
| +++ src/arm/lithium-arm.cc (working copy)
|
| @@ -730,8 +730,12 @@
|
| 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());
|
| return DefineSameAsFirst(new LBitI(op, left, right));
|
| }
|
|
|
| @@ -1274,8 +1278,12 @@
|
| if (instr->representation().IsInteger32()) {
|
| ASSERT(instr->left()->representation().IsInteger32());
|
| ASSERT(instr->right()->representation().IsInteger32());
|
| - LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
| - LOperand* right = UseOrConstant(instr->MostConstantOperand());
|
| + LOperand* left = UseRegisterAtStart(instr->left()->IsConstant()
|
| + ? instr->right()
|
| + : instr->left());
|
| + LOperand* right = UseOrConstant(instr->left()->IsConstant()
|
| + ? instr->left()
|
| + : instr->right());
|
| LOperand* temp = NULL;
|
| if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
| temp = TempRegister();
|
| @@ -1314,8 +1322,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)) {
|
|
|