8079343: Crash in PhaseIdealLoop with "assert(!had_error) failed: bad dominance"

C2 should not try to vectorize loops with loop variant vector base address.

Reviewed-by: kvn
This commit is contained in:
Tobias Hartmann 2015-05-11 07:44:46 +02:00
parent 43a5abc876
commit e113dfc652

View file

@ -2557,6 +2557,11 @@ SWPointer::SWPointer(MemNode* mem, SuperWord* slp) :
}
// 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");