Index: src/crankshaft/hydrogen-instructions.h |
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h |
index fdb1fd6d46c5cea8a8f77458d8297f5e8980b51d..f3d0b974ae27d856212966648abed1f67802ed74 100644 |
--- a/src/crankshaft/hydrogen-instructions.h |
+++ b/src/crankshaft/hydrogen-instructions.h |
@@ -5148,8 +5148,11 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, |
HAllocate* allocate = HAllocate::cast(object); |
if (allocate->IsAllocationFolded()) { |
HValue* dominator = allocate->allocation_folding_dominator(); |
- DCHECK(HAllocate::cast(dominator)->IsAllocationFoldingDominator()); |
- object = dominator; |
+ // There is no guarantee that all allocations are folded together because |
+ // GVN performs a fixpoint. |
+ if (HAllocate::cast(dominator)->IsAllocationFoldingDominator()) { |
+ object = dominator; |
+ } |
} |
} |