RFR: 8357695: RISC-V: Move vector intrinsic condition checks into match_rule_supported_vector

Feilong Jiang fjiang at openjdk.org
Mon May 26 13:17:52 UTC 2025


On Mon, 26 May 2025 09:14:51 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:

>> Hi all,
>> Please take a look and review this PR, thanks!
>> 
>> Currently, the match_rule_supported function in riscv.ad contains checks for vector-related intrinsics (e.g., FmaVF, FmaVD, RoundVF, RoundVD). These checks can be centralized into the match_rule_supported_vector function in the riscv_v.ad file, ensuring consistent handling in their appropriate context.
>> 
>> ### Testing
>> * [x]  Linux riscv64 server release build on SG2042
>
> src/hotspot/cpu/riscv/riscv.ad line 1883:
> 
>> 1881:     case Op_CountPositives:    // fall through
>> 1882:     case Op_EncodeISOArray:
>> 1883:       return UseRVV;
> 
> Should we move this part to `riscv_v.ad` too?

Ah, turns out `Op_EncodeISOArray` and its friends are checked only in `match_rule_supported`, so we can not move them.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25438#discussion_r2107337885


More information about the hotspot-compiler-dev mailing list