Index: src/compiler/js-builtin-reducer.cc |
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc |
index e3bafadaef0ef1304680fa9553d4617000e3a57c..66c212dfcb71a3d3f45ba6411736558a378fb6e7 100644 |
--- a/src/compiler/js-builtin-reducer.cc |
+++ b/src/compiler/js-builtin-reducer.cc |
@@ -1513,14 +1513,10 @@ Reduction JSBuiltinReducer::ReduceNumberIsInteger(Node* node) { |
// ES6 section 20.1.2.4 Number.isNaN ( number ) |
Reduction JSBuiltinReducer::ReduceNumberIsNaN(Node* node) { |
JSCallReduction r(node); |
- if (r.InputsMatchOne(Type::Number())) { |
- // Number.isNaN(a:number) -> BooleanNot(NumberEqual(a, a)) |
- Node* input = r.GetJSCallInput(0); |
- Node* check = graph()->NewNode(simplified()->NumberEqual(), input, input); |
- Node* value = graph()->NewNode(simplified()->BooleanNot(), check); |
- return Replace(value); |
- } |
- return NoChange(); |
+ // Number.isNaN(a:number) -> ObjectIsNaN(a) |
+ Node* input = r.GetJSCallInput(0); |
+ Node* value = graph()->NewNode(simplified()->ObjectIsNaN(), input); |
+ return Replace(value); |
} |
// ES6 section 20.1.2.5 Number.isSafeInteger ( number ) |