Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-28 Thread Sandhya Viswanathan
On Wed, 28 Jul 2021 04:48:35 GMT, Vladimir Kozlov wrote: >> Looks good to me. > > @sviswa7 and @jatin-bhateja jatin-bhateja > The push caused https://bugs.openjdk.java.net/browse/JDK-8271366 > I am strongly suggest in a future to ask an Oracle's engineer to test Intel's > changes before pushing.

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-28 Thread Paul Sandoz
On Tue, 27 Jul 2021 18:31:20 GMT, Sandhya Viswanathan 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 ht

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-27 Thread Vladimir Kozlov
On Tue, 27 Jul 2021 18:31:20 GMT, Sandhya Viswanathan 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 ht

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-27 Thread Weijun Wang
On Tue, 20 Jul 2021 09:57:07 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-27 Thread Sandhya Viswanathan
On Tue, 27 Jul 2021 18:05:49 GMT, Sandhya Viswanathan wrote: >> 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 >> I2

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-27 Thread Sandhya Viswanathan
On Tue, 20 Jul 2021 09:57:07 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-27 Thread Sandhya Viswanathan
On Tue, 27 Jul 2021 08:17:55 GMT, Jatin Bhateja wrote: >> 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, >>> typ

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-27 Thread Jatin Bhateja
On Tue, 27 Jul 2021 00:24:52 GMT, Sandhya Viswanathan 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 ht

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-27 Thread Jatin Bhateja
On Tue, 27 Jul 2021 02:52:13 GMT, Eric Liu wrote: >> @sviswa7, SLP flow will either have a constant 8bit shift value or a >> variable shift present in vector, this also include broadcasted non-constant >> shift value or a shift value beyond 8 bit. > > It would be better comment here, since the

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-26 Thread Jatin Bhateja
On Tue, 27 Jul 2021 01:54:01 GMT, Sandhya Viswanathan 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 ht

Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-26 Thread Sandhya Viswanathan
On Tue, 20 Jul 2021 09:57:07 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Eric Liu
On Mon, 26 Jul 2021 18:56:01 GMT, Jatin Bhateja wrote: >> @jatin-bhateja This question is still pending. > > @sviswa7, SLP flow will either have a constant 8bit shift value or a variable > shift present in vector. So non constant scalar case will not be hit through > this route. It would be b

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Jatin Bhateja
On Mon, 26 Jul 2021 17:19:07 GMT, Sandhya Viswanathan wrote: >> And'ing with shift_mask is already done on Java API side implementation >> before making a call to intrinsic rountine. > > @jatin-bhateja This question is still pending. @sviswa7, SLP flow will either have a constant 8bit shift v

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Jatin Bhateja
On Mon, 26 Jul 2021 17:19:07 GMT, Sandhya Viswanathan wrote: >> And'ing with shift_mask is already done on Java API side implementation >> before making a call to intrinsic rountine. > > @jatin-bhateja This question is still pending. Other than VectorAPI , SLP also infers vector rotates where

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Sandhya Viswanathan
On Sun, 18 Jul 2021 20:22:18 GMT, Jatin Bhateja wrote: >> src/hotspot/share/opto/vectornode.cpp line 1180: >> >>> 1178: cnt = cnt->in(1); >>> 1179: } >>> 1180: shiftRCnt = cnt; >> >> Why do we remove the And with mask here? > > And'ing with shift_mask is already done on Java API s

Re: RFR: 8266054: VectorAPI rotate operation optimization [v12]

2021-07-18 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v11]

2021-07-18 Thread Jatin Bhateja
On Sun, 18 Jul 2021 20:28:34 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-18 Thread Jatin Bhateja
On Fri, 16 Jul 2021 00:52:21 GMT, Sandhya Viswanathan 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 15 commits: >> >> - 8266054: Incorporating styling changes based on reviews. >> - Merge branch 'maste

Re: RFR: 8266054: VectorAPI rotate operation optimization [v11]

2021-07-18 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-15 Thread Sandhya Viswanathan
On Thu, 15 Jul 2021 08:34:42 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-15 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v9]

2021-07-14 Thread Eric Liu
On Wed, 30 Jun 2021 11:02:41 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v9]

2021-06-30 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v8]

2021-06-18 Thread Jatin Bhateja
On Tue, 8 Jun 2021 10:29:44 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lane

Re: RFR: 8266054: VectorAPI rotate operation optimization [v8]

2021-06-09 Thread Jatin Bhateja
On Tue, 8 Jun 2021 10:29:44 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lane

Re: RFR: 8266054: VectorAPI rotate operation optimization [v8]

2021-06-08 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v7]

2021-06-01 Thread Jatin Bhateja
On Mon, 24 May 2021 05:50:44 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v7]

2021-05-23 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v6]

2021-05-17 Thread Jatin Bhateja
On Mon, 17 May 2021 12:06:33 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v6]

2021-05-17 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v5]

2021-05-10 Thread Jatin Bhateja
On Sat, 8 May 2021 15:40:53 GMT, Paul Sandoz wrote: > Looks good. Someone from the HotSpot side needs to review related changes. > > The way i read the perf numbers is that on non AVX512 systems the numbers are > in the noise (no worse, no better), with significant improvement on AVX512. Hi @P

Re: RFR: 8266054: VectorAPI rotate operation optimization [v5]

2021-05-08 Thread Paul Sandoz
On Sat, 8 May 2021 05:54:38 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lane

Re: RFR: 8266054: VectorAPI rotate operation optimization [v4]

2021-05-07 Thread Jatin Bhateja
On Fri, 7 May 2021 18:31:15 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lane

Re: RFR: 8266054: VectorAPI rotate operation optimization [v5]

2021-05-07 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v4]

2021-05-07 Thread Paul Sandoz
On Fri, 7 May 2021 18:31:15 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lane

Re: RFR: 8266054: VectorAPI rotate operation optimization [v4]

2021-05-07 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v3]

2021-05-03 Thread Paul Sandoz
On Mon, 3 May 2021 06:51:29 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lane

Re: RFR: 8266054: VectorAPI rotate operation optimization [v2]

2021-05-02 Thread Jatin Bhateja
On Fri, 30 Apr 2021 15:44:41 GMT, Paul Sandoz wrote: >> Jatin Bhateja has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional >> commits

Re: RFR: 8266054: VectorAPI rotate operation optimization [v3]

2021-05-02 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization [v3]

2021-05-02 Thread Jatin Bhateja
On Tue, 27 Apr 2021 18:43:11 GMT, Paul Sandoz wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8266054: Review comments resolution. > > I noticed the tests are only updated for int and long, is that intentional? >

Re: RFR: 8266054: VectorAPI rotate operation optimization [v2]

2021-04-30 Thread Paul Sandoz
On Fri, 30 Apr 2021 12:59:34 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

Re: RFR: 8266054: VectorAPI rotate operation optimization [v2]

2021-04-30 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266054: VectorAPI rotate operation optimization

2021-04-27 Thread Paul Sandoz
On Tue, 27 Apr 2021 17:56:04 GMT, Jatin Bhateja wrote: > Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(

RFR: 8266054: VectorAPI rotate operation optimization

2021-04-27 Thread Jatin Bhateja
Current VectorAPI Java side implementation expresses rotateLeft and rotateRight operation using following operations:- vec1 = lanewise(VectorOperators.LSHL, n) vec2 = lanewise(VectorOperators.LSHR, n) res = lanewise(VectorOperations.OR, vec1 , vec2) This patch moves above handling fr