| Index: src/compiler/mips/instruction-selector-mips.cc
|
| diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc
|
| index 1e4b996531d6e3152e3954ba65a55b67043f5486..a8aa7c17c5840ba6c54a15a6ed9da003f4b7c2a1 100644
|
| --- a/src/compiler/mips/instruction-selector-mips.cc
|
| +++ b/src/compiler/mips/instruction-selector-mips.cc
|
| @@ -652,7 +652,7 @@ void InstructionSelector::VisitInt32Add(Node* node) {
|
| if (m.right().opcode() == IrOpcode::kWord32Shl &&
|
| CanCover(node, m.left().node()) && CanCover(node, m.right().node())) {
|
| Int32BinopMatcher mright(m.right().node());
|
| - if (mright.right().HasValue()) {
|
| + if (mright.right().HasValue() && !m.left().HasValue()) {
|
| int32_t shift_value = static_cast<int32_t>(mright.right().Value());
|
| Emit(kMipsLsa, g.DefineAsRegister(node), g.UseRegister(m.left().node()),
|
| g.UseRegister(mright.left().node()), g.TempImmediate(shift_value));
|
| @@ -664,7 +664,7 @@ void InstructionSelector::VisitInt32Add(Node* node) {
|
| if (m.left().opcode() == IrOpcode::kWord32Shl &&
|
| CanCover(node, m.right().node()) && CanCover(node, m.left().node())) {
|
| Int32BinopMatcher mleft(m.left().node());
|
| - if (mleft.right().HasValue()) {
|
| + if (mleft.right().HasValue() && !m.right().HasValue()) {
|
| int32_t shift_value = static_cast<int32_t>(mleft.right().Value());
|
| Emit(kMipsLsa, g.DefineAsRegister(node), g.UseRegister(m.right().node()),
|
| g.UseRegister(mleft.left().node()), g.TempImmediate(shift_value));
|
|
|