RFR: 8361582: AArch64: Some ConH values cannot be replicated with SVE [v6]
Bhavana Kilambi
bkilambi at openjdk.org
Fri Aug 15 08:51:15 UTC 2025
On Thu, 14 Aug 2025 20:11:12 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Bhavana Kilambi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Modify loadConH to use a mov and fmov instead
>
> src/hotspot/cpu/aarch64/aarch64.ad line 7100:
>
>> 7098: } else {
>> 7099: __ movw(rscratch1, imm);
>> 7100: }
>
> Is this a Neoverse-specific optimization? On Apple M1, `mov x0, #0` is handled by renaming (so never issues) but `mov x0, xzr` is not eliminated. Let's go for the simplest here, this is too fussy.
>
> Suggestion:
>
> __ movw(rscratch1, (uint32_t)$con$$constant);
Thanks for letting me know about the optimization on Apple. After consulting the Software optimization guide, it looks like a `mov w, #0` is also a zero cycle move along with the `movw w, zr` instruction on V1/N2/V2 and is a normal ALU op on N1. Makes sense to eliminate the instruction. I will make the changes you suggested in next PS.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26589#discussion_r2278556597
More information about the hotspot-compiler-dev
mailing list