RFR: 8290529: C2: assert(BoolTest(btest).is_canonical()) failure [v2]
Roland Westrelin
roland at openjdk.org
Tue Aug 30 13:55:22 UTC 2022
> For the test case:
>
> 1) In Parse::do_if(), tst0 is:
>
> (Bool#lt (CmpU 0 Parm0))
>
> 2) transformed by gvn in tst:
>
> (Bool#gt (CmpU Parm0 0))
>
> 3) That test is not canonical and is negated and retransformed which
> results in:
>
> (Bool#eq (CmpI Parm0 0))
>
> The assert fires because that test is not canonical either.
>
> The root cause I think is that the (CmpU .. 0) -> (CmpI .. 0) only
> triggers if the condition of the CmpU is canonical (and results in a
> non canonical test). Tweaking it so it applies even if the condition
> is not leads to the following change in the steps above:
>
> 2) (Bool#ne (CmpI Parm0 0))
>
> which is a canonical test.
Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- IR test
- Merge branch 'master' into JDK-8290529
- test
- more
- fix
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/9553/files
- new: https://git.openjdk.org/jdk/pull/9553/files/e136c466..f8656e4c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=9553&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=9553&range=00-01
Stats: 160062 lines in 3328 files changed: 82179 ins; 55894 del; 21989 mod
Patch: https://git.openjdk.org/jdk/pull/9553.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9553/head:pull/9553
PR: https://git.openjdk.org/jdk/pull/9553
More information about the hotspot-compiler-dev
mailing list