RFR: 8351392: C2 crash: failed: Expected Bool, but got OpaqueMultiversioning [v3]
Emanuel Peter
epeter at openjdk.org
Fri Mar 7 14:32:16 UTC 2025
> With https://github.com/openjdk/jdk/pull/23865 I mark the `OpaqueMultiversioning` useless once there are no loops for the multiversioning any more. The idea was that this way the `multiversion_if` would be folded away once the loops are gone, and then we should not encounter the `OpaqueMultiversioning` in `PhaseIdealLoop::conditional_move`.
>
> But there is a case where we do not remove the `OpaqueMultiversioning` fast enough, see the attached regression test:
> - The loops disappear during IGVN.
> - At the beginning of the next loop-opts we mark the `OpaqueMultiversioning` as useless.
> - Later during loop-opts we encounter the useless `OpaqueMultiversioning` in `PhaseIdealLoop::conditional_move`, and assert.
> - But in the IGVN after this loop-opts phase we would have constant folded the `OpaqueMultiversioning` and `multiversion_if` anyway... we just did not get there fast enough ;)
>
> Hence I propose to just create an explicit bailout for useless `OpaqueMultiversioning` nodes in `PhaseIdealLoop::conditional_move`.
Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
Update test/hotspot/jtreg/compiler/loopopts/superword/TestMultiversionRemoveUselessSlowLoop.java
Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23943/files
- new: https://git.openjdk.org/jdk/pull/23943/files/e852e377..563348e6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23943&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23943&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23943.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23943/head:pull/23943
PR: https://git.openjdk.org/jdk/pull/23943
More information about the hotspot-compiler-dev
mailing list