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
--- 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");