RFR: 8324751: C2 SuperWord: Aliasing Analysis runtime check [v6]

Manuel Hässig mhaessig at openjdk.org
Tue Aug 12 16:22:23 UTC 2025


On Tue, 12 Aug 2025 15:49:15 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/vectorization.cpp line 1026:
>> 
>>> 1024:     if (vp1.iv_scale() > vp2.iv_scale()) {
>>> 1025:       swap(p1_init, p2_init);
>>> 1026:       swap(size1, size2);
>> 
>> Shouldn't we perform this swap before calling `make_last()`, since `make_last()` assumes `iv_scale1 < iv_scale2`?
>
> I don't think that `make_last` makes any assumptions about `iv_scale1 < iv_scale2`.
> But I could consider moving it earlier anyway. Do you think that is worth it?

I would do it because the proof states that if `iv_scale2 < iv_scale1` we swap them. It would keep it consistent. Also, you won't have to swap the spans.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24278#discussion_r2270482568


More information about the hotspot-compiler-dev mailing list