RFR: 8296638: RISC-V: NegVI node emits wrong code when vector element basic type is T_BYTE/T_SHORT [v2]

Gui Cao gcao at openjdk.org
Thu Nov 10 02:50:31 UTC 2022


On Thu, 10 Nov 2022 02:25:23 GMT, Dingli Zhang <dzhang at openjdk.org> wrote:

>> Hi,
>> 
>> test/jdk/jdk/incubator/vector/Byte256VectorTests.java fails on riscv with the following error:
>> 
>> test Byte256VectorTests.negByte256VectorTests (byte [i * 5]): failure
>> java.lang.AssertionError: at index #2, input = 10 expected [-10] but found [-11]
>> 
>> 
>> Currently, `NegVI` can only handle the vector element basic type `T_INT` with`vsetvli(t0, x0, Assembler::e32)` but `T_SHORT/T_BYTE` can also be matched with `NegVI`, so these two types of tests are currently failing:
>> 
>> test/jdk/jdk/incubator/vector/Byte*VectorTests.java
>> test/jdk/jdk/incubator/vector/Short*VectorTests.java
>> 
>> 
>> Meanwhile, I removed some useless trailing whitespace.
>> 
>> Please take a look and have some reviews. Thanks a lot.
>> 
>> ## Testing:
>> 
>> - test/jdk/jdk/incubator/vector (fastdebug/release with UseRVV on QEMU)
>
> Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove useless predicate

LGTM, Thanks!

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

Marked as reviewed by gcao (Author).

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


More information about the hotspot-compiler-dev mailing list