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

Jatin Bhateja jbhateja at openjdk.org
Fri Jul 11 08:51:17 UTC 2025


On Thu, 10 Jul 2025 15:19:50 GMT, Bhavana Kilambi <bkilambi at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/vectorapi/TestSelectFromTwoVectorOp.java line 234:
>> 
>>> 232: 
>>> 233:     @Test
>>> 234:     @IR(counts = {IRNode.SELECT_FROM_TWO_VECTOR_VS, IRNode.VECTOR_SIZE_8, ">0"},
>> 
>> Hi @Bhavana-Kilambi ,
>> Kindly also include x86-specific feature checks in IR rules for this test.
>> 
>> You can directly integrate attached patch.
>> 
>> [select_from_ir_feature.txt](https://github.com/user-attachments/files/21034639/select_from_ir_feature.txt)
>
> Hi @jatin-bhateja , have you tested `jdk/incubator/vector` tests with your patch on x86?

Hi @Bhavana-Kilambi , 

x86 implementation favors vector sizes greater than 64-bit, since AVX512 has a direct two-vector permute instruction. For legacy targets, I lower the IR through **_LowerSelectFromTwoVectorOperation_**  to blend a pair of rearranges,  such that an exceptional index (above vector lane count) selects a lane from the second source vector, else from the first one.

Accidentally, my rough patch included an experimental change. Please update with the latest version.

Best Regards
[select_from_x86_patch.txt](https://github.com/user-attachments/files/21179211/select_from_x86_patch.txt)

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

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


More information about the hotspot-compiler-dev mailing list