RFR: 8361582: AArch64: Some ConH values cannot be replicated with SVE
Bhavana Kilambi
bkilambi at openjdk.org
Mon Aug 11 10:16:12 UTC 2025
On Fri, 1 Aug 2025 14:29:47 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>>> I am still a bit confused what matches `Replicate` with `immH` that does _not_ fit `immH8_shift8` when `Matcher::vector_length_in_bytes(n) > 16`?
>>
>> Hi, thanks for your review. If the immediate value does not fit `immH8_shift8` for `Matcher::vector_length_in_bytes(n) > 16` , the compiler would generate `loadConH` [1] -> `replicateHF` [2] backend nodes instead. The constant would be loaded from the constant pool instead and then broadcasted/replicated to every lane of an SVE register.
>>
>> [1] https://github.com/openjdk/jdk/blob/8ac4a88f3c5ad57824dd192cb3f0af5e71cbceeb/src/hotspot/cpu/aarch64/aarch64.ad#L6963
>>
>> [2] https://github.com/openjdk/jdk/blob/8ac4a88f3c5ad57824dd192cb3f0af5e71cbceeb/src/hotspot/cpu/aarch64/aarch64_vector.ad#L4806
>
>> If the immediate value does not fit `immH8_shift8` for `Matcher::vector_length_in_bytes(n) > 16` , the compiler would generate `loadConH` [1] -> `replicateHF` [2] backend nodes instead.
>
> Ah OK, just checking. I ran this patch on the machine where I have originally found the issue, and it seems to work.
Thanks for your review comments and approval @shipilev. I will address your review comments in the next patchset along with any other comments.
@theRealAph Would you be able to take another look at the updated patch please? Thank you in advance!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26589#issuecomment-3174076977
More information about the hotspot-compiler-dev
mailing list