RFR: 8297549: RISC-V: Add support for Vector API vector load const operation

Fei Yang fyang at openjdk.org
Tue Nov 29 06:46:23 UTC 2022


On Tue, 29 Nov 2022 03:10:17 GMT, Dingli Zhang <dzhang at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/riscv_v.ad line 2091:
>> 
>>> 2089:     __ vid_v(as_VectorRegister($dst$$reg));
>>> 2090:     if (is_floating_point_type(bt)) {
>>> 2091:       __ vfcvt_f_x_v(as_VectorRegister($dst$$reg), as_VectorRegister($dst$$reg));
>> 
>> You might want to distinugish between float and double for 'bt' here. Since vfcvt.f.x.v only convert signed integer to float.
>
> Hi @RealFYang , thanks for the review! Since `vid.v` generates a sequence of integers, it should be converted and stored in each element of the vector if `bt` is floating point type.

Hi, I double checked the RVV spec and I think you are right here. Change looks good then.

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

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


More information about the hotspot-compiler-dev mailing list