8338844: C2: remove useless code in PhaseIdealLoop::place_outside_loop() after 8335709

Reviewed-by: chagedorn, thartmann
This commit is contained in:
Roland Westrelin 2024-08-26 07:32:19 +00:00
parent 0c14579fef
commit ce83f6af64

View File

@ -1272,9 +1272,7 @@ Node* PhaseIdealLoop::place_outside_loop(Node* useblock, IdealLoopTree* loop) co
// Pick control right outside the loop
for (;;) {
Node* dom = idom(useblock);
if (loop->is_member(get_loop(dom)) ||
// NeverBranch nodes are not assigned to the loop when constructed
(dom->is_NeverBranch() && loop->is_member(get_loop(dom->in(0))))) {
if (loop->is_member(get_loop(dom))) {
break;
}
useblock = dom;