8079343: Crash in PhaseIdealLoop with "assert(!had_error) failed: bad dominance"
authorthartmann
Mon, 11 May 2015 07:44:46 +0200
changeset 30626 86ba6ca7ca4a
parent 30625 80a08f9b2d63
child 30627 d79f16a39a8c
8079343: Crash in PhaseIdealLoop with "assert(!had_error) failed: bad dominance" Summary: C2 should not try to vectorize loops with loop variant vector base address. Reviewed-by: kvn
hotspot/src/share/vm/opto/superword.cpp
--- a/hotspot/src/share/vm/opto/superword.cpp	Fri May 08 12:19:17 2015 +0200
+++ b/hotspot/src/share/vm/opto/superword.cpp	Mon May 11 07:44:46 2015 +0200
@@ -2557,6 +2557,11 @@
   }
   // Match AddP(base, AddP(ptr, k*iv [+ invariant]), constant)
   Node* base = adr->in(AddPNode::Base);
+  // The base address should be loop invariant
+  if (!invariant(base)) {
+    assert(!valid(), "base address is loop variant");
+    return;
+  }
   //unsafe reference could not be aligned appropriately without runtime checking
   if (base == NULL || base->bottom_type() == Type::TOP) {
     assert(!valid(), "unsafe access");