RFR: 8330213: RISC-V: C2: assert(false) failed: bad AD file after JDK-8316991

Feilong Jiang fjiang at openjdk.org
Sun Apr 14 08:12:03 UTC 2024


Hi, please review this fix that adds additional CMove match rules for the riscv port.
[JDK-8316991](https://bugs.openjdk.org/browse/JDK-8316991) introduces more conditional moves which reduce merges used by CmpP/CmpN. However, there is no match rule for CMove with CmpP/N on riscv, resulting in the `bad AD file` crash.

After this fix, the following five tests would pass without any crashes.

Testing:
- [x] compiler/eliminateAutobox/TestDoubleBoxing.java
- [x] compiler/eliminateAutobox/TestFloatBoxing.java
- [x] compiler/eliminateAutobox/TestLongBoxing.java
- [x] compiler/eliminateAutobox/TestIntBoxing.java
- [x] compiler/eliminateAutobox/TestShortBoxing.java 
- [ ] tier1~3  (linux-riscv64, release)

-------------

Commit messages:
 - RISC-V: Add extra match rule for CMoveI and CMove after JDK-8316991

Changes: https://git.openjdk.org/jdk/pull/18774/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18774&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8330213
  Stats: 68 lines in 1 file changed: 68 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/18774.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18774/head:pull/18774

PR: https://git.openjdk.org/jdk/pull/18774


More information about the hotspot-compiler-dev mailing list