RFR: 8271366: [REDO] JDK-8266054 VectorAPI rotate operation optimization
Vladimir Kozlov
kvn at openjdk.java.net
Sat Jul 31 19:26:34 UTC 2021
On Sat, 31 Jul 2021 18:50:31 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>>> Hi @vnkozlov , @PaulSandoz
>>> Can you kindly run this through your test infra and share the results.
>>>
>>> Also reported test case only handles the scalar (constant / non-constant ) rotate shifts.
>>> **test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVectRotate.java**
>>>
>>> Following case will result into a crash on JDK-17
>>> for(int i ; i < LEN ; i++) {
>>> a[i] = Integer.RotateLeft(b[i], c[i]);
>>> }
>>> Where a, b and c all are integral arrays.
>>>
>>> Current patch fixes this issue in entirety.
>>>
>>> I have restrictive fix for JDK-17 where we can prevent SLP from vectorizing rotate operation if target platform does not support variable shifts. Following will prevent this bug with minimal set of changes since JDK-17 is near RC1.
>>> https://github.com/openjdk/jdk/pull/4924/files#diff-692826251cae892bc4737919579c6afbd317551cd507f99c7bd29d585c1282e2R312
>>>
>>> Kindly let me know your thoughts on this.
>>>
>>> Thanks
>>
>> If the failure is regression of some changes in JDK 17 then we have to fix it there.
>> If the problem exists before JDK 17 we can fix it later in 17 update release.
>> Anyway file separate bug with failing test case. If it is regression in JDK 17 make it P2 and file PR ASAP. We have few days before RC so we can try to push it. But since we did not see the problem before we may as well fix it in 17 update release.
>
>> > Hi @vnkozlov , @PaulSandoz
>> > Can you kindly run this through your test infra and share the results.
>> > Also reported test case only handles the scalar (constant / non-constant ) rotate shifts.
>> > **test/hotspot/jtreg/compiler/c2/cr6340864/TestIntVectRotate.java**
>> > Following case will result into a crash on JDK-17
>> > for(int i ; i < LEN ; i++) {
>> > a[i] = Integer.RotateLeft(b[i], c[i]);
>> > }
>> > Where a, b and c all are integral arrays.
>> > Current patch fixes this issue in entirety.
>> > I have restrictive fix for JDK-17 where we can prevent SLP from vectorizing rotate operation if target platform does not support variable shifts. Following will prevent this bug with minimal set of changes since JDK-17 is near RC1.
>> > https://github.com/openjdk/jdk/pull/4924/files#diff-692826251cae892bc4737919579c6afbd317551cd507f99c7bd29d585c1282e2R312
>> > Kindly let me know your thoughts on this.
>> > Thanks
>>
>> If the failure is regression of some changes in JDK 17 then we have to fix it there.
>> If the problem exists before JDK 17 we can fix it later in 17 update release.
>> Anyway file separate bug with failing test case. If it is regression in JDK 17 make it P2 and file PR ASAP. We have few days before RC so we can try to push it. But since we did not see the problem before we may as well fix it in 17 update release.
>
> Hi @vnkozlov ,
> JBS entry created for JDK-17 crash [https://bugs.openjdk.java.net/browse/JDK-8271589](https://bugs.openjdk.java.net/browse/JDK-8271589,) problem existed since JDK-16.
> Can you kindly validate this patch though your testing framework.
>
> Thanks
Hi @jatin-bhateja,
[8271589](https://bugs.openjdk.java.net/browse/JDK-8271589) It is not new regression since it failed in JDK 16.
I suggest to fix it first in JDK 18 (file PR for latest /jdk) and then we back port the fix in to 17 update.
Don't make the fix as part of these changes - file separate JDK 18 PR for 8271589.
Meanwhile I am starting testing of this [REDO] changes.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4924
More information about the hotspot-compiler-dev
mailing list