RFR: 8361582: AArch64: Some ConH values cannot be replicated with SVE [v3]

Bhavana Kilambi bkilambi at openjdk.org
Mon Aug 11 07:54:54 UTC 2025


On Thu, 7 Aug 2025 15:24:23 GMT, Bhavana Kilambi <bkilambi at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/assembler_aarch64.cpp line 439:
>> 
>>> 437: bool Assembler::operand_valid_for_sve_dup_immediate(int64_t imm) {
>>> 438:   return ((imm >= -128 && imm <= 127) ||
>>> 439:           (((imm & 0xff) == 0) && imm >= -32768 && imm <= 32767));
>> 
>> Hold up! The current predicate was:
>> 
>> 
>> predicate((n->get_long() <= 127 && n->get_long() >= -128) ||
>>             (n->get_long() <= 32512 && n->get_long() >= -32768 && (n->get_long() & 0xff) == 0));
>> 
>> 
>> So the upper bound is _not_ `32767`, but `32512`. Maybe that actually matches the `0xff` mask, I have not checked. But SVE spec talks about `+32512`, so it looks more straightforward just to match that.
>
> Sure I can do that. Yes, the SVE spec talks specifically about `+32512` but I used `32767` as the largest value divisible by 256 would be `32512` anyway (and `-32768` and `32767` looked a bit more logical for a 16-bit immediate). I don't have much of a preference on this though and will go by your suggestion. Thanks!

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26589#discussion_r2265940025


More information about the hotspot-compiler-dev mailing list