RFR: 8348868: AArch64: Add backend support for SelectFromTwoVector

Bhavana Kilambi bkilambi at openjdk.org
Wed Feb 19 09:55:55 UTC 2025


On Wed, 19 Feb 2025 09:28:15 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/aarch64_vector.ad line 6748:
>> 
>>> 6746: %}
>>> 6747: 
>>> 6748: instruct vselect_from_two_vectors(vReg dst, vReg_V17 src1, vReg_V18 src2, vReg index) %{
>> 
>> Could you please add comment before the rule why `v17` and `v18` are used explicitly here?
>
> I'm still curious.

Hi @theRealAph , apologies for the late response. The tbl instruction needs both the source registers to be consecutive and I could not find a way to make the register allocator choose two consecutive registers for this operation and decided to hard code them. As v0-v7 are used for function arguments, v8-v15 are non-volatile which are not needed for this purpose (as we dont want to be preserving these values across function calls), I chose two of the volatile registers from v16-v31 for the source registers. Please let me know if this is the right way to approach.

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

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


More information about the hotspot-compiler-dev mailing list