RFR: 8284863: riscv: missing side effect for result in instruct vcount_positives

Feilong Jiang fjiang at openjdk.java.net
Thu Apr 14 08:55:36 UTC 2022


[JDK-8283364](https://bugs.openjdk.java.net/browse/JDK-8283364) replaces `StringCoding.hasNegatives` with `countPositives`.
But the TEMP_DEF for result in vcount_positives was missing, without which `result != tmp` could not be guaranteed.
If we add `assert_different_registers(result, tmp)` in `C2_MacroAssembler::count_positives_v`,
JVM will complain assertion error for some test in hotspot and langtools when UseRVV is enabled.

After is patch, failed tests in hotspot and langtools are passed.

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

Commit messages:
 - more assertion
 - missing side effect for result in instruct vcount_positives

Changes: https://git.openjdk.java.net/jdk/pull/8239/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8239&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8284863
  Stats: 5 lines in 2 files changed: 3 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8239.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8239/head:pull/8239

PR: https://git.openjdk.java.net/jdk/pull/8239


More information about the hotspot-compiler-dev mailing list