RFR: 8348868: AArch64: Add backend support for SelectFromTwoVector [v15]

Bhavana Kilambi bkilambi at openjdk.org
Tue Jul 15 12:33:45 UTC 2025


On Tue, 15 Jul 2025 12:15:27 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Bhavana Kilambi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Addressed review comments to half the number of match rules
>
> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 2912:
> 
>> 2910:   // If control reaches here, then the Neon instructions would be executed and
>> 2911:   // one of these conditions must satisfy -
>> 2912:   // UseSVE == 0 || (UseSVE == 1 && length_in_bytes == 16)
> 
> Why? Can't you make this logic correct regardless of `UseSVE`?

So the Neon implementation gets kicked in when SVE is not available (UseSVE == 0) whether the vector length is 8 or 16 but we emit Neon instructions for UseSVE ==1 and vector length == 16 only. I am not sure how I can eliminate `UseSVE` here.

When the vector length == 8 with SVE1, we generate the SVE `tbl` instruction (with single input). This is done for `T_INT` and `T_FLOAT` types so that we avoid generating the `mulv`/`addv` instructions for the Neon `tbl` instruction.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23570#discussion_r2207349617


More information about the hotspot-compiler-dev mailing list