RFR: 8266054: VectorAPI rotate operation optimization [v13]
Jatin Bhateja
jbhateja at openjdk.java.net
Tue Jul 27 08:20:35 UTC 2021
On Tue, 27 Jul 2021 00:24:52 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits:
>>
>> - 8266054: Re-designing benchmark to remove noise.
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8266054
>> - 8266054: Formal argument name change to be more appropriate.
>> - 8266054: Review comments resolution.
>> - 8266054: Incorporating styling changes based on reviews.
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8266054
>> - Merge http://github.com/openjdk/jdk into JDK-8266054
>> - Merge http://github.com/openjdk/jdk into JDK-8266054
>> - Merge http://github.com/openjdk/jdk into JDK-8266054
>> - Merge branch 'JDK-8266054' of http://github.com/jatin-bhateja/jdk into JDK-8266054
>> - ... and 9 more: https://git.openjdk.java.net/jdk/compare/a8f15427...b20404e2
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 1598:
>
>> 1596: cnt = elem_bt == T_LONG ? gvn().transform(new ConvI2LNode(cnt)) : cnt;
>> 1597: opd2 = gvn().transform(VectorNode::scalar2vector(cnt, num_elem, type_bt));
>> 1598: } else {
>
> Why conversion for only T_LONG and not for T_BYTE and T_SHORT? Is there an assumption here that only T_INT and T_LONG elem_bt are supported?
Correcting this, I2L may be needed in auto-vectorization flow since Integer/Long.rotate[Right/Left] APIs accept only integral shift, so for Long.rotate* operations integral shift value must be converted to long using I2L before broadcasting it. VectorAPI lanewise operations between vector-scalar, scalar type already matches with vector type. Since degeneration routine is common b/w both the flows so maintaining IR consistency here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3720
More information about the hotspot-compiler-dev
mailing list