8268882: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc

Reviewed-by: neliasso, chagedorn, kvn
This commit is contained in:
Rickard Bäckman 2021-11-09 21:38:12 +00:00
parent d7012fbd60
commit 0699220830

View File

@ -611,7 +611,7 @@ void PhaseChaitin::post_allocate_copy_removal() {
if( phi != x && u != x ) // Found a different input
u = u ? NodeSentinel : x; // Capture unique input, or NodeSentinel for 2nd input
}
if (u != NodeSentinel) { // Junk Phi. Remove
if (u != NodeSentinel || phi->outcnt() == 0) { // Junk Phi. Remove
phi->replace_by(u);
j -= yank_if_dead(phi, block, &value, &regnd);
phi_dex--;