Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-25 Thread Jatin Bhateja
On Thu, 24 Oct 2024 13:38:12 GMT, Emanuel Peter wrote: >> Hand crafter cases contains delimiting and general cases, in short they >> sufficiently cover entire value range. > > @PaulSandoz do you think this is sufficient coverage? Please note this test was added just to cover scalar operation va

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-25 Thread Emanuel Peter
On Thu, 24 Oct 2024 13:30:20 GMT, Jatin Bhateja wrote: >> Also: all of these cases load, and directly store again. Does that not mean >> all tests will probably pick the "..._mem" backend operations? Or do we >> actually end up testing all backend operations with the tests we have here? > > To

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-25 Thread Paul Sandoz
On Thu, 24 Oct 2024 14:07:34 GMT, Jatin Bhateja wrote: >> @PaulSandoz do you think this is sufficient coverage? > > Please note this test was added just to cover scalar operation validation in > VectorMath, automated tests exercise these APIs in fallback implementation > anyways. I think the c

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-25 Thread Emanuel Peter
On Thu, 24 Oct 2024 13:30:25 GMT, Jatin Bhateja wrote: >> test/jdk/jdk/incubator/vector/VectorMathTest.java line 70: >> >>> 68: public static short[] INPUT_SS = {Short.MIN_VALUE, >>> (short)(Short.MIN_VALUE + TEN_S), ZERO_S, (short)(Short.MAX_VALUE - TEN_S), >>> Short.MAX_VALUE}; >>> 69:

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Jatin Bhateja
On Thu, 24 Oct 2024 13:41:13 GMT, Emanuel Peter wrote: >> To exercise non memory operand pattern we need a vector operation padding >> layer after load vector, this will always ensure that selector pick all >> register operands flavor of instruction. Since its a generic limitation, do >> you t

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Paul Sandoz
On Thu, 24 Oct 2024 13:41:13 GMT, Emanuel Peter wrote: >> To exercise non memory operand pattern we need a vector operation padding >> layer after load vector, this will always ensure that selector pick all >> register operands flavor of instruction. Since its a generic limitation, do >> you t

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Paul Sandoz
On Thu, 24 Oct 2024 13:31:00 GMT, Jatin Bhateja wrote: >> Also: why did we not add these `Long.minUnsigned` etc? I guess that was >> already discussed? >> Because we can easily also use this with the auto-vectorizer or more >> generally. Saturating and unsigned ops are generally useful I think.

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Jatin Bhateja
On Thu, 24 Oct 2024 06:31:00 GMT, Emanuel Peter wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMath.java >> line 32: >> >>> 30: * @since 24 >>> 31: */ >>> 32: public final class VectorMath { >> >> I think this class could have been split into a separate RFE, to

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Jatin Bhateja
On Thu, 24 Oct 2024 06:46:32 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Factor out IR tests and Transforms to follow-up PRs. > > src/hotspot/cpu/x86/x86.ad line 10790: > >> 10788: predic

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Emanuel Peter
On Mon, 21 Oct 2024 12:25:37 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-24 Thread Emanuel Peter
On Thu, 24 Oct 2024 06:44:36 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Factor out IR tests and Transforms to follow-up PRs. > > test/jdk/jdk/incubator/vector/templates/Kernel-SaturatingBin

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-23 Thread Emanuel Peter
On Thu, 24 Oct 2024 06:28:31 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Factor out IR tests and Transforms to follow-up PRs. > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-23 Thread Emanuel Peter
On Mon, 21 Oct 2024 12:25:37 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-23 Thread Emanuel Peter
On Mon, 21 Oct 2024 12:25:37 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-22 Thread Paul Sandoz
On Mon, 21 Oct 2024 12:25:37 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v31]

2024-10-21 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new vector operators. > > > . SUADD : Saturating unsigned addition. > . SADD: Saturating signed addition. > . SUSUB : Saturating unsigned subtraction. > . SSUB