RFR: 8308660: C2 compilation hits 'node must be dead' assert [v2]
Andrey Turbanov
aturbanov at openjdk.org
Sat Mar 16 22:17:55 UTC 2024
On Thu, 14 Mar 2024 16:02:12 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.
>
> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>
> fix test
test/hotspot/jtreg/compiler/c2/TestFoldIfRemovesTopNode.java line 64:
> 62: if (flag) {
> 63: k = new int[k].length;
> 64: int j = k + 3;
Suggestion:
int j = k + 3;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18305#discussion_r1527142590
More information about the hotspot-compiler-dev
mailing list