RFR: 8306966: RISC-V: Support vector cast node for Vector API [v8]

Gui Cao gcao at openjdk.org
Sat May 6 13:20:24 UTC 2023


On Sat, 6 May 2023 03:01:38 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Gui Cao has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into JDK-8306966
>>  - rename rvv_vsetvli to vsetvli_helper
>>  - Fix round mode and optimize widen/narrow vcast
>>  - Small refactoring of rvv_vsetvli
>>  - Fix VectorCastF2X
>>  - During the conversion, specify the number of vectors
>>  - Use zr register instead of x0
>>  - 8306966: RISC-V: Support vector cast node for Vector API
>
> src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp line 1823:
> 
>> 1821: // High part of dst vector will be filled with zero.
>> 1822: void C2_MacroAssembler::integer_narrow_v(VectorRegister dst, BasicType dst_bt, int vector_length,
>> 1823:                                          VectorRegister src, BasicType src_bt, VectorRegister tmp) {
> 
> If you allocate different vector registers for 'dst' and 'src' on the callsite, then we should be able to eliminate the 'tmp' register parameter for this function. That is saving the intermediate result in 'dst' instead.

Fixed.

> src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.hpp line 239:
> 
>> 237:                         VectorRegister src, BasicType src_bt, VectorRegister tmp);
>> 238: 
>> 239:   void vfcvt_rtz_xu_f_v_safe(VectorRegister dst, VectorRegister src);
> 
> I don't think we need the unsigned version. Could you please remove them?

Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13684#discussion_r1186696455
PR Review Comment: https://git.openjdk.org/jdk/pull/13684#discussion_r1186696488


More information about the hotspot-compiler-dev mailing list