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 5a5c8902dde364cfa57773179a42b01c5a11c47b..57de1acda94dfbd1e2f6462fdd7c8014cdb84b80 100644 |
| --- a/src/compiler/machine-operator-reducer.cc |
| +++ b/src/compiler/machine-operator-reducer.cc |
| @@ -473,6 +473,21 @@ Reduction MachineOperatorReducer::Reduce(Node* node) { |
| if (m.IsChangeFloat32ToFloat64()) return Replace(m.node()->InputAt(0)); |
| break; |
| } |
| + case IrOpcode::kStore: { |
| + Node* const value = node->InputAt(2); |
| + if (value->opcode() == IrOpcode::kWord32And) { |
| + MachineType const rep = static_cast<MachineType>( |
| + StoreRepresentationOf(node->op()).machine_type() & kRepMask); |
| + Uint32BinopMatcher m(value); |
| + if (m.right().HasValue() && |
| + ((rep == kRepWord8 && (m.right().Value() & 0xff) == 0xff) || |
| + (rep == kRepWord16 && (m.right().Value() & 0xffff) == 0xffff))) { |
|
titzer
2014/10/09 10:54:47
We could generalize this to 64-bits as well, but p
|
| + node->ReplaceInput(2, m.left().node()); |
| + return Changed(node); |
| + } |
| + } |
| + break; |
| + } |
| default: |
| break; |
| } |