RFR: 8300258: C2: vectorization fails on simple ByteBuffer loop [v2]
Roland Westrelin
roland at openjdk.org
Tue Feb 21 13:05:26 UTC 2023
On Tue, 21 Feb 2023 12:22:20 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> Why are you not changing it here?
>
> https://github.com/openjdk/jdk/blob/6751978122afc5102db84c7f040a0b0ab76e70b6/src/hotspot/share/opto/superword.cpp#L728-L739
>
> If we just removed the memory slice where `best_align_to_mem_ref` was in, then should we not find a new `best`?
I didn't because for alignment heuristics what matters AFAIU is operand size so the same memory slice check doesn't seem correct. But you're right that there's a problem if `best_align_to_mem_ref` is not part of any pack.
> I fear there is now a way to trigger the assert:
Yes there must be.
I find the code quite confusing because it mixes correctness issues with best alignment heuristics. @vnkozlov I saw in the history that you made the changes that are discussed here. What do you think of this change?
-------------
PR: https://git.openjdk.org/jdk/pull/12440
More information about the hotspot-compiler-dev
mailing list