mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-07 08:59:07 +00:00
8179882: C2: Stale control info after cast node elimination during loop optimization pass
Reviewed-by: kvn, roland
This commit is contained in:
parent
73b3420b12
commit
5d2b14d198
@ -1860,6 +1860,9 @@ void IdealLoopTree::dump_head( ) const {
|
||||
if (_required_safept != NULL && _required_safept->size() > 0) {
|
||||
tty->print(" req={"); _required_safept->dump_simple(); tty->print(" }");
|
||||
}
|
||||
if (Verbose) {
|
||||
tty->print(" body={"); _body.dump_simple(); tty->print(" }");
|
||||
}
|
||||
tty->cr();
|
||||
}
|
||||
|
||||
|
||||
@ -913,7 +913,11 @@ Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
|
||||
|
||||
if (n->is_ConstraintCast()) {
|
||||
Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this);
|
||||
if (dom_cast != NULL) {
|
||||
// ConstraintCastNode::dominating_cast() uses node control input to determine domination.
|
||||
// Node control inputs don't necessarily agree with loop control info (due to
|
||||
// transformations happened in between), thus additional dominance check is needed
|
||||
// to keep loop info valid.
|
||||
if (dom_cast != NULL && is_dominator(get_ctrl(dom_cast), get_ctrl(n))) {
|
||||
_igvn.replace_node(n, dom_cast);
|
||||
return dom_cast;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user