RFR: 8316594: C2 SuperWord: wrong result with hand unrolled loops

Vladimir Kozlov kvn at openjdk.org
Tue Oct 3 01:05:47 UTC 2023


On Fri, 22 Sep 2023 17:59:04 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Please read description in https://github.com/openjdk/jdk/pull/15864.
>> 
>> Currently, we only compare the first element of the load-pack with the StoreVector. This is not correct, we need to compare all elements of the load-pack with the StoreVector. Otherwise it may be that the first element lays below/before the memory region of the StoreVector (Less), but the last element of the load-pack for example could have overlap with the StoreVector (Equal).
>> 
>> Tier1-6 + stress-testing (Running)
>> Performance testing (Running)
>
> You still need to add description to this PR what you are changing.

> @vnkozlov I suggest we add those tests when we actually implement the detection of separate arrays. At that point, we can also create appropriate IR rules.
> Besides, I think the tests would be testing something somewhat different. The bug here happens because we have two method parameters which both reference to the same array, but we do not know that at compile time.
> Your suggested tests would exercise all sorts of combinations of different arrays on different parameters, if I understand correctly?

Not only on different parameters but also locally allocated, loaded from fields (instance and static), returned by a called method. In short, when EA may give you answer that arrays are different.

Anyway, as we discussed in #15864 it will be separate RFE. And current change is conservative - possible less vectorizations when arrays are different. But I am fine with that.

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

PR Comment: https://git.openjdk.org/jdk/pull/15866#issuecomment-1743999373


More information about the hotspot-compiler-dev mailing list