Index: src/compiler/js-typed-lowering.cc |
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc |
index 06d2902020fc6e8308e4c18e8b3510758c6f2517..1f81d8ab31151667e3e152adfbba0f42f1762a6b 100644 |
--- a/src/compiler/js-typed-lowering.cc |
+++ b/src/compiler/js-typed-lowering.cc |
@@ -596,13 +596,16 @@ Reduction JSTypedLowering::ReduceJSEqual(Node* node, bool invert) { |
return r.ChangeToStringComparisonOperator(simplified()->StringEqual(), |
invert); |
} |
+ if (r.BothInputsAre(Type::Boolean())) { |
+ return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Boolean()), |
+ invert); |
+ } |
if (r.BothInputsAre(Type::Receiver())) { |
return r.ChangeToPureOperator( |
simplified()->ReferenceEqual(Type::Receiver()), invert); |
} |
// TODO(turbofan): js-typed-lowering of Equal(undefined) |
// TODO(turbofan): js-typed-lowering of Equal(null) |
- // TODO(turbofan): js-typed-lowering of Equal(boolean) |
return NoChange(); |
} |