Index: src/compiler/representation-change.cc |
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc |
index fedf7afc0e96dc4fb79760d7b4150104b7a8e676..5744de1d54c0028785fb353eb0e2165d069c58ff 100644 |
--- a/src/compiler/representation-change.cc |
+++ b/src/compiler/representation-change.cc |
@@ -253,7 +253,7 @@ Node* RepresentationChanger::GetFloat32RepresentationFor( |
op = machine()->TruncateFloat64ToFloat32(); |
} |
} else if (output_rep == MachineRepresentation::kTagged) { |
- if (output_type->Is(Type::Number())) { |
+ if (output_type->Is(Type::NumberOrUndefined())) { |
op = simplified() |
->ChangeTaggedToFloat64(); // tagged -> float64 -> float32 |
node = jsgraph()->graph()->NewNode(op, node); |
@@ -305,7 +305,7 @@ Node* RepresentationChanger::GetFloat64RepresentationFor( |
op = machine()->ChangeUint32ToFloat64(); |
} |
} else if (output_rep == MachineRepresentation::kTagged) { |
- if (output_type->Is(Type::Number())) { |
+ if (output_type->Is(Type::NumberOrUndefined())) { |
op = simplified()->ChangeTaggedToFloat64(); |
} |
} else if (output_rep == MachineRepresentation::kFloat32) { |