RFR: 8323582: C2 SuperWord AlignVector: misaligned vector memory access with unaligned native memory [v2]

Emanuel Peter epeter at openjdk.org
Wed Feb 19 15:25:56 UTC 2025


On Wed, 19 Feb 2025 13:26:37 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> So the overhead in the final code is 2x: we can expect the fast and slow paths to be about the same size so the section of code for the loop would see its size grow by 2x.

Yes, if you get to the point where you add a multi-version-if condition, i.e. where SuperWord has decided it needs a speculative assumption (here for alignment, later for aliasing), then we get the whole loop 2x. I suppose we could try to make the pre-main-post loop more complicated and just multi-version the main-loop, but that sounds much more complicated.

Do you see any better way than having the 2x code size if we need both a slow and fast loop?

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

PR Comment: https://git.openjdk.org/jdk/pull/22016#issuecomment-2668974247


More information about the hotspot-dev mailing list