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

Roland Westrelin roland at openjdk.org
Wed Feb 19 13:28:55 UTC 2025


On Wed, 19 Feb 2025 13:18:18 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> > > That is what I'm avoiding by `stalling` the slow-loop ;) I only `un-stall` the slow-loop if a we actually add a check to the multiversion-if, and at that point we do care about the slow-loop.
> > 
> > 
> > So if the slow loop is kept, it's fully optimized (other than what misaligned accesses prevent)?
> 
> Exactly. In a sense that would give you similar results as with unswitching, where we also possibly optimize both branches / loops.

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.

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

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


More information about the hotspot-dev mailing list