RFR: 8253588: C1: assert(false) failed: unknown register compiler on x86_32 only with -XX:+TraceLinearScanLevel=4
Christian Hagedorn
chagedorn at openjdk.java.net
Fri Sep 25 10:14:51 UTC 2020
[JDK-8251093](https://bugs.openjdk.java.net/browse/JDK-8251093) introduced some additional logging of intervals and its
registers in various places. On 32-bit only, we could have two registers for an interval. A hi-register is only used
when the interval has `_num_phys_regs` set to 2. In one such place
([L5448](https://github.com/chhagedorn/jdk/blob/29ed779487bad3c359fb13dfad3f41832637a470/src/hotspot/share/c1/c1_LinearScan.cpp#L5448)),
we log the hi-register `hint_regHi`. On
[L5441](https://github.com/chhagedorn/jdk/blob/29ed779487bad3c359fb13dfad3f41832637a470/src/hotspot/share/c1/c1_LinearScan.cpp#L5441),
however, we can assign it an invalid register number when `_num_phys_regs` is 1. That was not a problem before
JDK-8251093 as we only used `hint_regHi` later after a `_num_phys_regs == 2` check on
[L5484](https://github.com/chhagedorn/jdk/blob/29ed779487bad3c359fb13dfad3f41832637a470/src/hotspot/share/c1/c1_LinearScan.cpp#L5484).
But the additional logging is performed earlier resulting in this assertion failure when trying to log the invalid
`hint_regHi` register.
Thanks,
Christian
-------------
Commit messages:
- 8253588: C1: assert(false) failed: unknown register compiler on x86_32 only with -XX:+TraceLinearScanLevel=4
Changes: https://git.openjdk.java.net/jdk/pull/356/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=356&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253588
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/356.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/356/head:pull/356
PR: https://git.openjdk.java.net/jdk/pull/356
More information about the hotspot-compiler-dev
mailing list