| Index: src/compiler/simplified-operator-reducer.cc
|
| diff --git a/src/compiler/simplified-operator-reducer.cc b/src/compiler/simplified-operator-reducer.cc
|
| index 9d45e5b19261c39f5492687aa828588b3a63054c..01ad15e21eff01ac4c22306e6efde18618225674 100644
|
| --- a/src/compiler/simplified-operator-reducer.cc
|
| +++ b/src/compiler/simplified-operator-reducer.cc
|
| @@ -54,6 +54,8 @@ Reduction SimplifiedOperatorReducer::Reduce(Node* node) {
|
| if (m.IsChangeBitToBool()) return Replace(m.node()->InputAt(0));
|
| break;
|
| }
|
| + case IrOpcode::kChangeWord32ToBit:
|
| + return ReduceChangeWord32ToBit(node);
|
| case IrOpcode::kChangeFloat64ToTagged: {
|
| Float64Matcher m(node->InputAt(0));
|
| if (m.HasValue()) return ReplaceNumber(m.Value());
|
| @@ -136,6 +138,17 @@ Reduction SimplifiedOperatorReducer::ReduceAnyToBoolean(Node* node) {
|
| }
|
|
|
|
|
| +Reduction SimplifiedOperatorReducer::ReduceChangeWord32ToBit(Node* node) {
|
| + Node* const input = NodeProperties::GetValueInput(node, 0);
|
| + Type* const input_type = NodeProperties::GetBounds(input).upper;
|
| + if (input_type->Is(jsgraph()->ZeroOneRangeType())) {
|
| + // ChangeWord32ToBit(x:bit) => x
|
| + return Replace(input);
|
| + }
|
| + return NoChange();
|
| +}
|
| +
|
| +
|
| Reduction SimplifiedOperatorReducer::Change(Node* node, const Operator* op,
|
| Node* a) {
|
| DCHECK_EQ(node->InputCount(), OperatorProperties::GetTotalInputCount(op));
|
|
|