RFR: 8374349: [VectorAPI]: AArch64: Prefer merging mode SVE CPY instruction
Andrew Haley
aph at openjdk.org
Fri Jan 23 14:26:48 UTC 2026
On Fri, 23 Jan 2026 10:28:46 GMT, Eric Fang <erfang at openjdk.org> wrote:
> Maintaining microarchitecture-specific handling might be worthwhile.
Or not. :-)
> This provides some flexibility for different/future architectures.
We already have enough flexibility for the future. We can change the source code once we know what we need. We make new releases four times a year.
> Because we're unsure how the future microarchitecture will behave, from a performance and code size perspective, we generally prefer single instruction over multiple instructions. Is it fine to you ?
No. Please do the right thing for today's hardware. We don't know that some other SVE implementation will not benefit from this optimization, either,.
One thing you can do is add a flag to control this minor optimization, but make it `constexpr bool = true` until we know what other SVE implementations might do.
In general:
Dead code in HotSpot is dangerous. Over time it rots, leading to hard-to-diagnose bugs when if it does get exercised. If we don't _know_ that we need something, we shouldn't do it. Don't speculatively add code. We don't need the AArch64 to be come (even more of) a jungle of microarchitecture-specific tweaks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29359#issuecomment-3790481835
More information about the hotspot-dev
mailing list