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 [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 [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 [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 [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 [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 [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 [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 [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