Integrated: 8255058: C1: assert(is_virtual()) failed: type check
Christian Hagedorn
chagedorn at openjdk.java.net
Tue Nov 17 09:19:10 UTC 2020
On Fri, 13 Nov 2020 11:59:14 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> The following code for handling phi functions of an exception entry block in the method `LinearScan::resolve_exception_edge` assumes that pinned `Constant` instructions (executing the else case) have a virtual operand and therefore an interval assigned:
> https://github.com/openjdk/jdk/blob/05b824567c346a7d136c01d23f56a908e7efc6d7/src/hotspot/share/c1/c1_LinearScan.cpp#L1944-L1952
> In the testcase, however, this is not the case: A `Constant` instruction with a constant operand that is part of the long addition chain in the assignment for `iFld` (starting on L52) is pinned in `UseCountComputer::block_do`because it recursed too deeply:
> https://github.com/openjdk/jdk/blob/05b824567c346a7d136c01d23f56a908e7efc6d7/src/hotspot/share/c1/c1_IR.cpp#L388-L392
> https://github.com/openjdk/jdk/blob/05b824567c346a7d136c01d23f56a908e7efc6d7/src/hotspot/share/c1/c1_IR.cpp#L414-L423
> As a result, the else case is executed in `LinearScan::resolve_exception_edge` which results in this assertion failure because `vreg_num()` only works on virtual operands that belong to an interval.
>
> The fix is straight forward to also do a mapping to an interval for pinned `Constant` instructions with constant operands as we already do for non-pinned `Constant` instructions.
>
> Thanks,
> Christian
This pull request has now been integrated.
Changeset: 5dbfae01
Author: Christian Hagedorn <chagedorn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/5dbfae01
Stats: 74 lines in 2 files changed: 71 ins; 1 del; 2 mod
8255058: C1: assert(is_virtual()) failed: type check
Reviewed-by: neliasso, kvn
-------------
PR: https://git.openjdk.java.net/jdk/pull/1202
More information about the hotspot-compiler-dev
mailing list