Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-16 Thread Chen Liang
On Sun, 13 Oct 2024 11:18:01 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-16 Thread Sandhya Viswanathan
On Sun, 13 Oct 2024 11:18:01 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-15 Thread Jatin Bhateja
On Tue, 15 Oct 2024 20:57:05 GMT, Paul Sandoz wrote: >>> I gave it a quick scan, and I have no further comments. LGTM. >> >> Thank you, i will kick off an internal test. > >> > I gave it a quick scan, and I have no further comments. LGTM. >> >> Thank you, i will kick off an internal test. > >

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-15 Thread Paul Sandoz
On Tue, 15 Oct 2024 16:03:13 GMT, Paul Sandoz wrote: > > I gave it a quick scan, and I have no further comments. LGTM. > > Thank you, i will kick off an internal test. Tier 1 to 3 tests pass. - PR Comment: https://git.openjdk.org/jdk/pull/20508#issuecomment-2415121395

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-15 Thread Paul Sandoz
On Tue, 15 Oct 2024 09:35:23 GMT, Emanuel Peter wrote: > I gave it a quick scan, and I have no further comments. LGTM. Thank you, i will kick off an internal test. - PR Comment: https://git.openjdk.org/jdk/pull/20508#issuecomment-2414431367

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-15 Thread Emanuel Peter
On Sun, 13 Oct 2024 11:18:01 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-14 Thread Paul Sandoz
On Sun, 13 Oct 2024 11:18:01 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-13 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v16]

2024-10-08 Thread Paul Sandoz
On Thu, 3 Oct 2024 19:05:14 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v16]

2024-10-03 Thread Sandhya Viswanathan
On Thu, 3 Oct 2024 19:05:14 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v16]

2024-10-03 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-03 Thread Sandhya Viswanathan
On Thu, 3 Oct 2024 05:04:35 GMT, Jatin Bhateja wrote: >> I see the problem with float/double vectors. Let us do the rearrange form >> only for Integral (byte, short, int, long) vectors then. For float/double >> vector we could keep the code that you have currently. > > You will also need additi

Re: RFR: 8338023: Support two vector selectFrom API [v15]

2024-10-03 Thread Sandhya Viswanathan
On Thu, 3 Oct 2024 05:09:22 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-03 Thread Sandhya Viswanathan
On Thu, 3 Oct 2024 05:04:35 GMT, Jatin Bhateja wrote: >> I see the problem with float/double vectors. Let us do the rearrange form >> only for Integral (byte, short, int, long) vectors then. For float/double >> vector we could keep the code that you have currently. > > You will also need additi

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-02 Thread Jatin Bhateja
On Tue, 1 Oct 2024 18:03:06 GMT, Sandhya Viswanathan wrote: >>> This could instead be: src1.rearrange(this.lanewise(VectorOperators.AND, 2 >>> * VLENGTH - 1).toShuffle(), src2); Or even simplified to: >>> src1.rearrange(this.toShuffle(), src2); >> >> Yes, this may save additional allocation p

Re: RFR: 8338023: Support two vector selectFrom API [v14]

2024-10-02 Thread Jatin Bhateja
On Tue, 1 Oct 2024 18:10:10 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review comments resolutions. > > src/hotspot/share/opto/vectorIntrinsics.cpp line 2797: > >> 2795: >> 2796:

Re: RFR: 8338023: Support two vector selectFrom API [v15]

2024-10-02 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v14]

2024-10-01 Thread Sandhya Viswanathan
On Tue, 1 Oct 2024 09:51:27 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-01 Thread Sandhya Viswanathan
On Tue, 1 Oct 2024 09:53:02 GMT, Jatin Bhateja wrote: >> Thanks for the example. Yes, you have a point there. So we would need to do: >>src1.rearrange(this.lanewise(VectorOperators.AND, 2 * VLENGTH - >> 1).toShuffle(), src2); > >> This could instead be: src1.rearrange(this.lanewise(VectorOp

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-10-01 Thread Jatin Bhateja
On Mon, 30 Sep 2024 22:39:09 GMT, Sandhya Viswanathan wrote: >> I think you have to do the masking before conversion - >> `vec.lanewise(VectorOperators.AND, 2 * VLENGTH - 1).toShuffle()` is not the >> same as `vec.toShuffle()` for all inputs. >> >> >> jshell> IntVector indexes = IntVector.fr

Re: RFR: 8338023: Support two vector selectFrom API [v14]

2024-10-01 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Mon, 30 Sep 2024 22:51:57 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handling NPOT vector length for AArch64 SVE with vector sizes varying b/w >> 128 and 2048 bits at 128 bit inc

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Mon, 30 Sep 2024 21:28:22 GMT, Paul Sandoz wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java >> line 551: >> >>> 549: return ((ByteVector)src1).vectorFactory(res); >>> 550: } >>> 551: >> >> This could instead be: >>src1.rearrange(this.lan

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Paul Sandoz
On Sat, 28 Sep 2024 17:37:10 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handling NPOT vector length for AArch64 SVE with vector sizes varying b/w >> 128 and 2048 bits at 128 bit inc

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-24 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v12]

2024-09-23 Thread Sandhya Viswanathan
On Wed, 18 Sep 2024 07:21:52 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-18 Thread Emanuel Peter
On Tue, 17 Sep 2024 07:02:20 GMT, Jatin Bhateja wrote: >> src/hotspot/share/opto/vectornode.cpp line 2122: >> >>> 2120: // index format by subsequent VectorLoadShuffle. >>> 2121: int cast_vopc = VectorCastNode::opcode(0, index_elem_bt, true); >>> 2122: Node* index_byte_vec = >>> phase->tr

Re: RFR: 8338023: Support two vector selectFrom API [v12]

2024-09-18 Thread Emanuel Peter
On Wed, 18 Sep 2024 07:21:52 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-18 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:49:01 GMT, Emanuel Peter wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java >> line 544: >> >>> 542: byte[] vpayload1 = ((ByteVector)v1).vec(); >>> 543: byte[] vpayload2 = ((ByteVector)v2).vec(); >>> 544: byte[] v

Re: RFR: 8338023: Support two vector selectFrom API [v12]

2024-09-18 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Paul Sandoz
On Tue, 17 Sep 2024 07:02:12 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template >> line 2974: >> >>> 2972: final $abstractvectortype$ selectFromTemplate(Class>> Vector<$Boxbitstype$>> indexVecClass, >>> 2973:

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Paul Sandoz
On Tue, 17 Sep 2024 07:02:15 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template >> line 561: >> >>> 559: for (int i = 0; i < vlen; i++) { >>> 560: int index = ((int)vecPayload1[i]); >>> 561: res[i] = in

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 07:40:33 GMT, Emanuel Peter wrote: >> Patch includes tests for all the species (combination of vector type and >> sizes), each vector kernel is validated against equivalent scalar >> implementation, scenario which you are referring is implicitly handled >> though tests. > >

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-17 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:43:42 GMT, Emanuel Peter wrote: >> Original API did throw IndexOutOfBoundsException, but later on we have moved >> away from exception throwing semantics to wrapping semantics. >> Please find details at following comment >> https://github.com/openjdk/jdk/pull/20508#issueco

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 18:35:42 GMT, Paul Sandoz wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Disabling VectorLoadShuffle bypassing optimization to comply with >> rearrange semantics at IR level. > > src/jdk.incu

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 07:27:44 GMT, Emanuel Peter wrote: >> Please at least add a comment why you are not following my suggestion. I >> feel like the work I put in to review is not being respected when comments >> are just silently resolved without any action or comment. > > I really do think tha

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-17 Thread Jatin Bhateja
On Mon, 16 Sep 2024 07:45:51 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Disabling VectorLoadShuffle bypassing optimization to comply with >> rearrange semantics at IR level. > > src/hotspo

Re: RFR: 8338023: Support two vector selectFrom API [v11]

2024-09-17 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-16 Thread Paul Sandoz
On Mon, 16 Sep 2024 02:58:41 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-16 Thread Paul Sandoz
On Mon, 16 Sep 2024 02:58:41 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-16 Thread Emanuel Peter
On Fri, 13 Sep 2024 17:38:29 GMT, Jatin Bhateja wrote: >> That does not answer my question. If the backend operations you implemented >> would have the wrong vector-length: do we have any tests that would catch >> that? Often that requires not just going "up" with a loop but also "counting >>

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-16 Thread Emanuel Peter
On Mon, 16 Sep 2024 07:35:46 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Disabling VectorLoadShuffle bypassing optimization to comply with >> rearrange semantics at IR level. > > src/hotspo

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-16 Thread Emanuel Peter
On Mon, 16 Sep 2024 07:27:06 GMT, Emanuel Peter wrote: >> src/hotspot/share/opto/vectornode.cpp line 2148: >> >>> 2146: >>> 2147: BoolTest::mask pred = BoolTest::lt; >>> 2148: ConINode* pred_node = >>> (ConINode*)phase->makecon(TypeInt::make(pred)); >> >> Would `as_ConI()` be a better alt

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-16 Thread Emanuel Peter
On Fri, 30 Aug 2024 14:44:05 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/hotspot/share/opto/vectornode.cpp line 2104: > >> 2102: // MASK) >> 21

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-16 Thread Emanuel Peter
On Mon, 16 Sep 2024 02:58:41 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v10]

2024-09-15 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-15 Thread Jatin Bhateja
On Sun, 15 Sep 2024 07:16:17 GMT, Emanuel Peter wrote: > > > Can you please **define** somewhere what it means to `prune indexes`? It > > > does not help me much more than the previous "massaging indexes" you had > > > before I asked you to change it. > > > > Also: I'm a little worried about th

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-15 Thread Emanuel Peter
On Fri, 13 Sep 2024 18:27:07 GMT, Jatin Bhateja wrote: > > Can you please **define** somewhere what it means to `prune indexes`? It > > does not help me much more than the previous "massaging indexes" you had > > before I asked you to change it. > > > Also: I'm a little worried about the semant

Re: RFR: 8338023: Support two vector selectFrom API [v9]

2024-09-13 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-13 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:53:18 GMT, Emanuel Peter wrote: > Can you please **define** somewhere what it means to `prune indexes`? It does > not help me much more than the previous "massaging indexes" you had before I > asked you to change it. > > > Also: I'm a little worried about the semantics c

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Jatin Bhateja
On Fri, 13 Sep 2024 14:45:29 GMT, Emanuel Peter wrote: >> Existing vectorAPI inline expansion entry points explicitly pass lane type >> and count as intrinsic arguments, this is used to create concrete ideal >> vector types. > > That does not answer my question. If the backend operations you im

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Paul Sandoz
On Fri, 6 Sep 2024 18:08:09 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java line >> 2770: >> >>> 2768: >>> 2769: /** >>> 2770: * Rearranges the lane elements of two vectors, selecting lanes >> >> I have a bit of a name concern here

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-13 Thread Emanuel Peter
On Fri, 6 Sep 2024 18:13:34 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Emanuel Peter
On Tue, 3 Sep 2024 11:45:53 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java > line 54

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-13 Thread Emanuel Peter
On Fri, 6 Sep 2024 18:08:04 GMT, Jatin Bhateja wrote: >> test/jdk/jdk/incubator/vector/ShortMaxVectorTests.java line 1048: >> >>> 1046: return >>> SHORT_GENERATOR_SELECT_FROM_TRIPLES.stream().map(List::toArray). >>> 1047: toArray(Object[][]::new); >>> 1048: } >> >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-06 Thread Jatin Bhateja
On Fri, 30 Aug 2024 14:57:31 GMT, Emanuel Peter wrote: >> src/hotspot/share/opto/vectornode.cpp line 2183: >> >>> 2181: }; >>> 2182: // Targets emulating unsupported permutation for certain vector >>> types >>> 2183: // may need to message the indexes to match the users intent. >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-06 Thread Jatin Bhateja
On Fri, 30 Aug 2024 14:40:35 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/hotspot/share/opto/vectornode.cpp line 2159: > >> 2157: >> 2158: vmask_type =

Re: RFR: 8338023: Support two vector selectFrom API [v8]

2024-09-06 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-03 Thread Emanuel Peter
On Thu, 29 Aug 2024 05:42:58 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-09-03 Thread Emanuel Peter
On Fri, 30 Aug 2024 14:02:46 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/hotspot/cpu/x86/x86.ad line 10490: > >> 10488: >> 10489: >> 10490: instruct se

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-08-30 Thread Emanuel Peter
On Fri, 30 Aug 2024 13:17:26 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/hotspot/cpu/x86/matcher_x86.hpp line 215: > >> 213: } >> 214: >> 215: stati

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-08-30 Thread Emanuel Peter
On Thu, 29 Aug 2024 05:42:58 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v6]

2024-08-28 Thread Jatin Bhateja
On Tue, 27 Aug 2024 20:00:56 GMT, Paul Sandoz wrote: > My comment was related to understanding what `SelectFromTwoVectorNode::Ideal` > and `VectorRearrangeNode::Ideal` are doing - the former lowers, if needed, > into the rearrange expression and the latter adjusts, if needed, the index > vecto

Re: RFR: 8338023: Support two vector selectFrom API [v7]

2024-08-28 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v5]

2024-08-27 Thread John Rose
On 23 Aug 2024, at 15:33, Paul Sandoz wrote: > The float/double conversion bothers me, not suggesting we do something about > it here, noting down for any future conversation on shuffles. Yes, it’s a pain which is noticeable in the vector/shuffle conversions. In the worst case it adds dynamic re

Re: RFR: 8338023: Support two vector selectFrom API [v6]

2024-08-27 Thread Paul Sandoz
On Tue, 27 Aug 2024 09:58:44 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v5]

2024-08-27 Thread Jatin Bhateja
On Fri, 23 Aug 2024 22:29:46 GMT, Paul Sandoz wrote: > API changes look good. (Note at the moment we are not proposing to change how > shuffles works - as you point out the two vector `selectFrom` and `rearrange` > differ in the index representation.) > > IIUC if the more direct two-table inst

Re: RFR: 8338023: Support two vector selectFrom API [v6]

2024-08-27 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v5]

2024-08-23 Thread Paul Sandoz
On Fri, 23 Aug 2024 06:09:48 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v5]

2024-08-22 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v4]

2024-08-22 Thread Jatin Bhateja
On Fri, 23 Aug 2024 05:46:29 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v4]

2024-08-22 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread Sandhya Viswanathan
On Wed, 21 Aug 2024 16:42:44 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread Sandhya Viswanathan
On Wed, 21 Aug 2024 18:27:09 GMT, Paul Sandoz wrote: > Is it possible for the intrinsic to be responsible for wrapping, if needed? > If was looking at > [`vpermi2b`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=vpermi2b&ig_expand=4917,4982,5004,5010,5014&techs=A

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread John Rose
On 21 Aug 2024, at 11:30, Paul Sandoz wrote: > Is it possible for the intrinsic to be responsible for wrapping, if needed? > If was looking at > [`vpermi2b`](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=vpermi2b&ig_expand=4917,4982,5004,5010,5014&techs=AVX_512) >

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread Paul Sandoz
On Wed, 21 Aug 2024 16:42:44 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread John Rose
On 21 Aug 2024, at 10:51, Sandhya Viswanathan wrote: > @jatin-bhateja Thanks, the PR ((https://github.com/openjdk/jdk/pull/20634) is > still work in progress and can be simplified much further. The changes I am > currently working on are do wrap by default for rearrange and selectFrom as > sugg

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread Sandhya Viswanathan
On Wed, 21 Aug 2024 16:49:40 GMT, Jatin Bhateja wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Pass explicit wrap argument to selectFrom API with default value set to >> true. > > Hi @rose00 , @sviswa7 , @PaulSa

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread Jatin Bhateja
On Wed, 21 Aug 2024 16:42:44 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v3]

2024-08-21 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v2]

2024-08-19 Thread Sandhya Viswanathan
On Mon, 19 Aug 2024 07:36:15 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v2]

2024-08-19 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-18 Thread Jatin Bhateja
On Thu, 8 Aug 2024 06:57:28 GMT, Jatin Bhateja wrote: > Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using in

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-17 Thread Andrey Turbanov
On Thu, 8 Aug 2024 06:57:28 GMT, Jatin Bhateja wrote: > Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using in

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-16 Thread John Rose
(Better late than never, although I wish I’d been more explicit about this on panama-dev.) I think we should be moving away from throwing exceptions on all reorder/shuffle/permute vector ops, and moving toward wrapping. These ops all operate on vectors (small arrays) of vector lane indexes (small

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-14 Thread Jatin Bhateja
On Mon, 12 Aug 2024 22:03:44 GMT, Paul Sandoz wrote: > The results look promising. I can provide guidance on the specification e.g., > we can specify the behavior in terms of rearrange, with the addition of > throwing on out of bounds indexes. > > Regarding the throwing of exceptions, some wid

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-12 Thread Paul Sandoz
On Thu, 8 Aug 2024 06:57:28 GMT, Jatin Bhateja wrote: > Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using in

RFR: 8338023: Support two vector selectFrom API

2024-08-08 Thread Jatin Bhateja
Hi All, As per the discussion on panama-dev mailing list[1], patch adds the support for following new two vector permutation APIs. Declaration:- Vector.selectFrom(Vector v1, Vector v2) Semantics:- Using index values stored in the lanes of "this" vector, assemble the values stored in