Commit d8679a23 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] JSUnaryNot and JSToBoolean have exactly 2 inputs, no need to trim.

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/1071333004

Cr-Commit-Position: refs/heads/master@{#27741}
parent 826a954d
......@@ -537,7 +537,7 @@ Reduction JSTypedLowering::ReduceJSUnaryNot(Node* node) {
// JSUnaryNot(x:number) => NumberEqual(x,#0)
node->set_op(simplified()->NumberEqual());
node->ReplaceInput(1, jsgraph()->ZeroConstant());
node->TrimInputCount(2);
DCHECK_EQ(2, node->InputCount());
return Changed(node);
} else if (input_type->Is(Type::String())) {
// JSUnaryNot(x:string) => NumberEqual(x.length,#0)
......@@ -549,8 +549,8 @@ Reduction JSTypedLowering::ReduceJSUnaryNot(Node* node) {
node->set_op(simplified()->NumberEqual());
node->ReplaceInput(0, length);
node->ReplaceInput(1, jsgraph()->ZeroConstant());
node->TrimInputCount(2);
NodeProperties::ReplaceWithValue(node, node, length);
DCHECK_EQ(2, node->InputCount());
return Changed(node);
}
return NoChange();
......@@ -580,7 +580,7 @@ Reduction JSTypedLowering::ReduceJSToBoolean(Node* node) {
node->set_op(simplified()->NumberLessThan());
node->ReplaceInput(0, jsgraph()->ZeroConstant());
node->ReplaceInput(1, length);
node->TrimInputCount(2);
DCHECK_EQ(2, node->InputCount());
return Changed(node);
}
return NoChange();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment