From dfc557cbea342b2991f9d129235470ac789b50a2 Mon Sep 17 00:00:00 2001 From: Christian Hagedorn Date: Thu, 30 Sep 2021 08:29:43 +0000 Subject: [PATCH] 8274406: RunThese30M.java failed "assert(!LCA_orig->dominates(pred_block) || early->dominates(pred_block)) failed: early is high enough" Reviewed-by: kvn, thartmann --- src/hotspot/share/opto/loopopts.cpp | 4 ++-- .../jtreg/compiler/loopopts/TestSinkingDivisorLostPin.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/opto/loopopts.cpp b/src/hotspot/share/opto/loopopts.cpp index 4379a6c744b64..fe117797e3f49 100644 --- a/src/hotspot/share/opto/loopopts.cpp +++ b/src/hotspot/share/opto/loopopts.cpp @@ -1455,8 +1455,8 @@ void PhaseIdealLoop::try_sink_out_of_loop(Node* n) { if (n_loop != loop_ctrl && n_loop->is_member(loop_ctrl)) { // n has a control input inside a loop but get_ctrl() is member of an outer loop. This could happen, for example, // for Div nodes inside a loop (control input inside loop) without a use except for an UCT (outside the loop). - // Rewire control of n to get_ctrl(n) to move it out of the loop, regardless if its input(s) are later sunk or not. - _igvn.replace_input_of(n, 0, n_ctrl); + // Rewire control of n to right outside of the loop, regardless if its input(s) are later sunk or not. + _igvn.replace_input_of(n, 0, place_outside_loop(n_ctrl, loop_ctrl)); } } if (n_loop != _ltree_root && n->outcnt() > 1) { diff --git a/test/hotspot/jtreg/compiler/loopopts/TestSinkingDivisorLostPin.java b/test/hotspot/jtreg/compiler/loopopts/TestSinkingDivisorLostPin.java index 1ee487654cd73..d2c2a60abdea3 100644 --- a/test/hotspot/jtreg/compiler/loopopts/TestSinkingDivisorLostPin.java +++ b/test/hotspot/jtreg/compiler/loopopts/TestSinkingDivisorLostPin.java @@ -29,9 +29,9 @@ * @summary Sinking a data node used as divisor of a DivI node into a zero check UCT loses its pin outside the loop due to * optimizing the CastII node away, resulting in a div by zero crash (SIGFPE) due to letting the DivI node floating * back inside the loop. - * @run main/othervm -Xcomp -XX:CompileCommand=compileonly,compiler.loopopts.TestSinkingDivisorLostPin -XX:-TieredCompilation + * @run main/othervm -Xcomp -XX:CompileCommand=compileonly,compiler.loopopts.TestSinkingDivisorLostPin::* -XX:-TieredCompilation * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM -XX:StressSeed=4177789702 compiler.loopopts.TestSinkingDivisorLostPin - * @run main/othervm -Xcomp -XX:CompileCommand=compileonly,compiler.loopopts.TestSinkingDivisorLostPin -XX:-TieredCompilation + * @run main/othervm -Xcomp -XX:CompileCommand=compileonly,compiler.loopopts.TestSinkingDivisorLostPin::* -XX:-TieredCompilation * -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM compiler.loopopts.TestSinkingDivisorLostPin */