Index: src/compiler/redundancy-elimination.cc |
diff --git a/src/compiler/redundancy-elimination.cc b/src/compiler/redundancy-elimination.cc |
index 292b2fe6b789ce82895cbfeec1b1500a4d233451..707752f36446e225a64ab0a1f7525cf74ba5bd6c 100644 |
--- a/src/compiler/redundancy-elimination.cc |
+++ b/src/compiler/redundancy-elimination.cc |
@@ -22,6 +22,7 @@ Reduction RedundancyElimination::Reduce(Node* node) { |
case IrOpcode::kCheckFloat64Hole: |
case IrOpcode::kCheckHeapObject: |
case IrOpcode::kCheckIf: |
+ case IrOpcode::kCheckInternalizedString: |
case IrOpcode::kCheckNumber: |
case IrOpcode::kCheckSmi: |
case IrOpcode::kCheckString: |
@@ -120,7 +121,14 @@ RedundancyElimination::EffectPathChecks::AddCheck(Zone* zone, |
namespace { |
bool IsCompatibleCheck(Node const* a, Node const* b) { |
- if (a->op() != b->op()) return false; |
+ if (a->op() != b->op()) { |
+ if (a->opcode() == IrOpcode::kCheckInternalizedString && |
+ b->opcode() == IrOpcode::kCheckString) { |
+ // CheckInternalizedString(node) implies CheckString(node) |
+ } else { |
+ return false; |
+ } |
+ } |
for (int i = a->op()->ValueInputCount(); --i >= 0;) { |
if (a->InputAt(i) != b->InputAt(i)) return false; |
} |