mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 22:50:08 +00:00
8219517: assert(false) failed: infinite loop in PhaseIterGVN::optimize
Reviewed-by: kvn, thartmann
This commit is contained in:
parent
b5783d5055
commit
1057f7e2a7
@ -1394,6 +1394,14 @@ Node *LoadNode::split_through_phi(PhaseGVN *phase) {
|
||||
Node* in = mem->in(i);
|
||||
Node* m = optimize_memory_chain(in, t_oop, this, phase);
|
||||
if (m == mem) {
|
||||
if (i == 1) {
|
||||
// if the first edge was a loop, check second edge too.
|
||||
// If both are replaceable - we are in an infinite loop
|
||||
Node *n = optimize_memory_chain(mem->in(2), t_oop, this, phase);
|
||||
if (n == mem) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
set_req(Memory, mem->in(cnt - i));
|
||||
return this; // made change
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user