RFR: 8308504: C2: "malformed control flow" after JDK-8303466 [v2]
Roland Westrelin
roland at openjdk.org
Mon Jul 24 11:05:15 UTC 2023
> I took that bug over from Emanuel because he's away:
> https://github.com/openjdk/jdk/pull/14331
>
> I tried adding a `CastII` to narrow the limit of the loop as I
> suggested in a comment on the PR but I found that doesn't work in all
> cases: if the type of the initial value for the loop variable is not
> narrow enough, then the narrower type for the limit doesn't help
> narrow the loop phi type.
>
> What I propose instead is to add an assert predicate that catches when
> the main loop is unreachable but the zero trip count doesn't constant
> fold. For that to work, the order of predicates must be preserved when
> they are copied or updated. I had to make some small changes to
> guarantee that.
Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
Update src/hotspot/share/opto/loopTransform.cpp
Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14973/files
- new: https://git.openjdk.org/jdk/pull/14973/files/46c60fc3..c65b4bf1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14973&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14973&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/14973.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14973/head:pull/14973
PR: https://git.openjdk.org/jdk/pull/14973
More information about the hotspot-compiler-dev
mailing list