| Index: src/ia32/lithium-ia32.cc
|
| ===================================================================
|
| --- src/ia32/lithium-ia32.cc (revision 6458)
|
| +++ src/ia32/lithium-ia32.cc (working copy)
|
| @@ -733,8 +733,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));
|
| } else {
|
| ASSERT(instr->representation().IsTagged());
|
| @@ -1306,8 +1310,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();
|
| @@ -1348,8 +1356,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)) {
|
|
|