RFR: 8284863: riscv: missing side effect for result in instruct vcount_positives
Feilong Jiang
fjiang at openjdk.java.net
Fri Apr 15 06:09:41 UTC 2022
On Thu, 14 Apr 2022 11:09:14 GMT, Fei Yang <fyang 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.
@RealFYang @shipilev -- Thank you for the reviews!
-------------
PR: https://git.openjdk.java.net/jdk/pull/8239
More information about the hotspot-compiler-dev
mailing list