Index: src/compiler/simplified-lowering.cc |
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc |
index 92a6bb5283d040a70c36ba7de794eb3e73efd9de..6dfc9ae9fc57693aaa02792c32d4fe99638f32c2 100644 |
--- a/src/compiler/simplified-lowering.cc |
+++ b/src/compiler/simplified-lowering.cc |
@@ -776,6 +776,21 @@ class RepresentationSelector { |
} |
break; |
} |
+ case IrOpcode::kNumberIsHoleNaN: { |
+ VisitUnop(node, kMachFloat64, kMachBool); |
+ if (lower()) { |
+ // NumberIsHoleNaN(x) => Word32Equal(Float64ExtractLowWord32(x), |
+ // #HoleNaNLower32) |
+ node->ReplaceInput(0, |
+ jsgraph_->graph()->NewNode( |
+ lowering->machine()->Float64ExtractLowWord32(), |
+ node->InputAt(0))); |
+ node->AppendInput(jsgraph_->zone(), |
+ jsgraph_->Int32Constant(kHoleNanLower32)); |
+ NodeProperties::ChangeOp(node, jsgraph_->machine()->Word32Equal()); |
+ } |
+ break; |
+ } |
case IrOpcode::kPlainPrimitiveToNumber: { |
VisitUnop(node, kMachAnyTagged, kTypeNumber | kRepTagged); |
if (lower()) { |