RFR: 8331764: C2 SuperWord: refactor _align_to_ref/_mem_ref_for_main_loop_alignment

Emanuel Peter epeter at openjdk.org
Wed May 8 04:46:52 UTC 2024


On Wed, 8 May 2024 04:38:06 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/superword.cpp line 3407:
>> 
>>> 3405:     if (first == nullptr) { continue; }
>>> 3406: 
>>> 3407:     int vw = first->memory_size() * pack->size();
>> 
>> I assume `first` is verified already and `first->memory_size()` is reasonable (size of primitive type).
>
> Yes, it is. All of this code is run in `SuperWord::output`, and at this point we are committed to vectorization - everything is verified.

That is what I tried to say in the PR description:
> It makes more sense to pick a mem_ref directly in SuperWord::adjust_pre_loop_limit_to_align_main_loop_vectors, where we already know what packs are going to be vectorized.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19115#discussion_r1593376793


More information about the hotspot-compiler-dev mailing list