Chromium Code Reviews| Index: src/compiler/machine-operator-reducer.cc |
| diff --git a/src/compiler/machine-operator-reducer.cc b/src/compiler/machine-operator-reducer.cc |
| index fd402ee1c7fecbea37ff222c6d57d9d188eb343a..4e2a3777b1d9b7ea162533119ad7229427ff9477 100644 |
| --- a/src/compiler/machine-operator-reducer.cc |
| +++ b/src/compiler/machine-operator-reducer.cc |
| @@ -264,6 +264,16 @@ Reduction MachineOperatorReducer::Reduce(Node* node) { |
| return ReplaceBool(m.left().Value() < m.right().Value()); |
| } |
| if (m.LeftEqualsRight()) return ReplaceBool(false); // x < x => false |
| + if (m.left().IsWord32Or() && m.right().Is(0)) { // (X | Y) < 0 ... |
| + // This targets the check for -0 after multiplication. |
|
Benedikt Meurer
2016/07/20 17:37:44
This is a detail that is not necessarily relevant.
|
| + Int32BinopMatcher mleftmatcher(m.left().node()); |
| + if ((mleftmatcher.left().HasValue() && |
|
Benedikt Meurer
2016/07/20 17:37:44
Please add a IsNegative() helper to the Int32Match
|
| + mleftmatcher.left().Value() < 0) || |
| + (mleftmatcher.right().HasValue() && |
| + mleftmatcher.right().Value() < 0)) { |
| + return ReplaceBool(true); // and X < 0 or Y < 0 => true |
| + } |
| + } |
| break; |
| } |
| case IrOpcode::kInt32LessThanOrEqual: { |