RFR: 8336830: C2: assert(get_loop(lca)->_nest < n_loop->_nest || lca->in(0)->is_NeverBranch()) failed: must not be moved into inner loop [v2]
Roland Westrelin
roland at openjdk.org
Thu Aug 22 15:09:19 UTC 2024
> A store is sunk from a counted loop into an enclosing infinite
> loop. The assert fires because:
>
>
> get_loop(lca)->_nest < n_loop->_nest
>
>
> is false. That happens because the outer loop was found to be infinite
> in the current loop opts pass. When that happens, it's not properly
> attached to the loop tree. The second part of the assert was added to
> cover a similar case:
>
>
> lca->in(0)->is_NeverBranch()
>
>
> but it doesn't work in this case bcause lca is not a projection of the
> `NeverBranch`. It's the exit projection of the counted loop. The fix I
> propose changes that part of the assert to test that lca is, indeed,
> in an infinite loop in a way that's robust.
>
> I also removed some code that I believe to be useless following
> 8335709.
Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
undo unrelated change
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20334/files
- new: https://git.openjdk.org/jdk/pull/20334/files/420873b7..6d0444ba
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20334&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20334&range=00-01
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/20334.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20334/head:pull/20334
PR: https://git.openjdk.org/jdk/pull/20334
More information about the hotspot-compiler-dev
mailing list