Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 9f1e7eb8914b5ae824a080718fcebee55c70d58a..55be216ffe63cff80675f3976e7973ce312ca5b3 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -303,7 +303,9 @@ Reduction JSTypedLowering::ReduceJSComparison(Node* node) { |
return NoChange(); |
} |
return r.ChangeToPureOperator(stringOp); |
- } else if (r.OneInputCannotBe(Type::String())) { |
+ } |
+ Type* maybe_string = Type::Union(Type::String(), Type::Receiver(), zone()); |
+ if (r.OneInputCannotBe(maybe_string)) { |
// If one input cannot be a string, then emit a number comparison. |
const Operator* less_than; |
const Operator* less_than_or_equal; |