RFR: 8308660: C2 compilation hits 'node must be dead' assert
Christian Hagedorn
chagedorn at openjdk.org
Thu Mar 14 15:16:40 UTC 2024
On Thu, 14 Mar 2024 14:12:09 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> In `IfNode::fold_compares_helper()`, `adjusted_val` is:
>
>
> (SubI (AddI top constant) 0)
>
>
> which is then transformed to the `top` node. The code, next, tries to
> destroy the `adjusted_val` node i.e. the `top` node. That results in
> the assert failure. Given We're trying to fold 2 ifs in a dying part
> of the graph, the fix is straightforward: test `adjusted_val` for top
> and bail out from the transformation if that's the case.
Otherwise, looks good!
test/hotspot/jtreg/compiler/c2/TestFoldIfRemovesTopNode.java line 29:
> 27: * @summary C2 compilation hits 'node must be dead' assert
> 28: * @run main/othervm -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:+StressIGVN -XX:StressSeed=242006623 TestFoldIfRemovesTopNode
> 29: * @run main/othervm -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:+StressIGVN TestFoldIfRemovesTopNode
You should add `-XX:+UnlockDiagnosticVMOptions` to run with product and either add an `-XX:+IgnoreUnrecognizedVMOptions` or `@requires vm.compiler2.enabled` since `StressIGVN` is a C2 flag.
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18305#pullrequestreview-1937005031
PR Review Comment: https://git.openjdk.org/jdk/pull/18305#discussion_r1525053127
More information about the hotspot-compiler-dev
mailing list