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

Fei Yang fyang at openjdk.java.net
Thu Apr 14 11:12:32 UTC 2022


On Thu, 14 Apr 2022 08:40:06 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:

> [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.

Changes looks good to me. (Not a JDK Reviewer)
Thanks for fixing this.

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

Marked as reviewed by fyang (Committer).

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


More information about the hotspot-compiler-dev mailing list