RFR: 8290711: assert(false) failed: infinite loop in PhaseIterGVN::optimize [v4]

Roland Westrelin roland at openjdk.org
Wed Aug 24 08:28:11 UTC 2022


On Tue, 23 Aug 2022 23:43:13 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Should we add `NeverBranch` if the only exit is never taken (CCP folds it)? Or it is done already for such loops later after CCP?

Thanks for reviewing this.
The round of loop opts after CCP takes care of that. But NeverBranch nodes don't help here because the loop becomes infinite during CCP: when CCP transform the graph after analysis, it follows Root's inputs. One of the inputs is from the null check that is now known to never fail. That input's type is TOP so CCP doesn't follow that edge and there's no other edge from Root to the loop body at that point so the loop body is never processed by CCP.

-------------

PR: https://git.openjdk.org/jdk/pull/9961


More information about the hotspot-compiler-dev mailing list