Index: src/compiler/verifier.cc |
diff --git a/src/compiler/verifier.cc b/src/compiler/verifier.cc |
index 348e09059541ce1ed09228d41ad55f3921a2759c..534b68441494c30a0ad338edef9328576fdbb533 100644 |
--- a/src/compiler/verifier.cc |
+++ b/src/compiler/verifier.cc |
@@ -825,7 +825,23 @@ void Verifier::Run(Graph* graph, Typing typing) { |
CHECK_NOT_NULL(graph->end()); |
Zone zone; |
Visitor visitor(&zone, typing); |
- for (Node* node : AllNodes(&zone, graph).live) visitor.Check(node); |
+ AllNodes all(&zone, graph); |
+ for (Node* node : all.live) visitor.Check(node); |
+ |
+ // Check the uniqueness of projections. |
+ for (Node* proj : all.live) { |
+ if (proj->opcode() != IrOpcode::kProjection) continue; |
+ Node* node = proj->InputAt(0); |
+ for (Node* other : node->uses()) { |
+ if (all.IsLive(other) && other != proj && |
+ other->opcode() == IrOpcode::kProjection && |
+ ProjectionIndexOf(other->op()) == ProjectionIndexOf(proj->op())) { |
+ V8_Fatal(__FILE__, __LINE__, |
+ "Node #%d:%s has duplicate projections #%d and #%d", |
+ node->id(), node->op()->mnemonic(), proj->id(), other->id()); |
+ } |
+ } |
+ } |
} |