[jdk17] RFR: 8268371: C2: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed [v2]
Vladimir Ivanov
vlivanov at openjdk.java.net
Tue Jun 15 16:31:31 UTC 2021
> The way `CheckCastPP` nodes are handled now doesn't let redundant casts to be completely removed: even when the corresponding runtime check disappears, the cast node stays in the graph and it broadens/worsens the type of casted value.
>
> Proposed fix leaves `CheckCastPP` handling intact, but skips the insertion of redundant cast nodes as part of receiver subtype check.
>
> Also, interface casts on receiver temporarily don't get a `CheckCastPP` irrespective of whether the subtype check is redundant or not.
>
> Though the assertion failures showed up after JDK-8267807, the bug was there long before.
>
> Testing:
> - [x] hs-tier1 - hs-tier4
Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
Add -XX:+UnlockDiagnosticVMOptions
-------------
Changes:
- all: https://git.openjdk.java.net/jdk17/pull/55/files
- new: https://git.openjdk.java.net/jdk17/pull/55/files/156be6bd..9ffdcd9d
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk17&pr=55&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk17&pr=55&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk17/pull/55.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/55/head:pull/55
PR: https://git.openjdk.java.net/jdk17/pull/55
More information about the hotspot-compiler-dev
mailing list