Re: RFR: 8279508: Auto-vectorize Math.round API [v18]

2022-03-24 Thread Jatin Bhateja
On Wed, 23 Mar 2022 06:55:50 GMT, Tobias Hartmann 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 22 commits: >> >> - 8279508: Using an explicit scratch register since rscratch1 is bound to >> r10 and

Re: RFR: 8279508: Auto-vectorize Math.round API [v18]

2022-03-23 Thread Tobias Hartmann
On Fri, 18 Mar 2022 20:19:08 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v18]

2022-03-22 Thread Tobias Hartmann
On Fri, 18 Mar 2022 20:19:08 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-21 Thread Quan Anh Mai
On Tue, 22 Mar 2022 02:52:07 GMT, Jatin Bhateja wrote: >>> A read from constant table will incur minimum of L1I access penalty to >>> access code blob or at worst even more if data is not present in first >>> level cache >> >> But your approach comes at a cost of frontend bandwidth and port

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-21 Thread Jatin Bhateja
On Tue, 22 Mar 2022 01:55:38 GMT, Quan Anh Mai wrote: >> A read from constant table will incur minimum of L1I access penalty to >> access code blob or at worst even more if data is not present in first level >> cache. Change was done for replace vpbroadcastd with vbroadcastss because of >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-21 Thread Quan Anh Mai
On Mon, 21 Mar 2022 18:25:36 GMT, Jatin Bhateja wrote: > A read from constant table will incur minimum of L1I access penalty to access > code blob or at worst even more if data is not present in first level cache But your approach comes at a cost of frontend bandwidth and port contention,

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-21 Thread Jatin Bhateja
On Mon, 21 Mar 2022 17:56:22 GMT, Quan Anh Mai wrote: >> constant and register to register moves are never issued to execution ports, >> rematerializing value rather than reading from memory will give better >> performance. > > I have come across this a little bit. While `movl r, i` may not

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-21 Thread Quan Anh Mai
On Sun, 13 Mar 2022 04:27:44 GMT, Jatin Bhateja wrote: >> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4178: >> >>> 4176: movl(scratch, 1056964608); >>> 4177: movq(xtmp1, scratch); >>> 4178: vbroadcastss(xtmp1, xtmp1, vec_enc); >> >> You could put the constant in the constant table

Re: RFR: 8279508: Auto-vectorize Math.round API [v17]

2022-03-18 Thread Jatin Bhateja
On Mon, 14 Mar 2022 10:35:58 GMT, Tobias Hartmann wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Windows build failure fix. > > `compiler/c2/cr6340864/TestFloatVect.java` and `TestDoubleVect.java` fail

Re: RFR: 8279508: Auto-vectorize Math.round API [v18]

2022-03-18 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v17]

2022-03-17 Thread Andrew Haley
On Sun, 13 Mar 2022 06:36:15 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-14 Thread Jatin Bhateja
On Mon, 14 Mar 2022 09:29:28 GMT, Andrew Haley wrote: >> Good suggestion, but as of now we are not using vector calling conventions >> for stubs. > > I don't understand this comment. If the stub is only to be used by you, then > you can determine your own calling convention. We are passing

Re: RFR: 8279508: Auto-vectorize Math.round API [v17]

2022-03-14 Thread Tobias Hartmann
On Sun, 13 Mar 2022 06:36:15 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-14 Thread Andrew Haley
On Sun, 13 Mar 2022 04:27:25 GMT, Jatin Bhateja wrote: >> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4024: >> >>> 4022: * the result is equal to the value of Integer.MAX_VALUE. >>> 4023: */ >>> 4024: void >>> C2_MacroAssembler::vector_cast_float_special_cases_avx(XMMRegister dst,

Re: RFR: 8279508: Auto-vectorize Math.round API [v17]

2022-03-12 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v16]

2022-03-12 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-12 Thread Jatin Bhateja
On Sun, 13 Mar 2022 00:06:07 GMT, Quan Anh Mai wrote: >> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4161: >> >>> 4159: movl(scratch, 1056964608); >>> 4160: movq(xtmp1, scratch); >>> 4161: vbroadcastss(xtmp1, xtmp1, vec_enc); >> >> An `evpbroadcastd` would reduce this by one

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-12 Thread Jatin Bhateja
On Sat, 12 Mar 2022 23:20:58 GMT, Quan Anh Mai wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Creating separate test for round double under feature check. > >

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-12 Thread Quan Anh Mai
On Sat, 12 Mar 2022 23:22:16 GMT, Quan Anh Mai wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Creating separate test for round double under feature check. > >

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-12 Thread Quan Anh Mai
On Sat, 12 Mar 2022 19:58:37 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v15]

2022-03-12 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-03-11 Thread Sandhya Viswanathan
On Thu, 3 Mar 2022 05:42:23 GMT, Jatin Bhateja wrote: >> The testing for this PR doesn't look adequate to me. I don't see any testing >> for the values where the behavior of round has been redefined at points in >> the last decade. See JDK-8010430 and JDK-6430675, both of which have >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v14]

2022-03-11 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-11 Thread Jatin Bhateja
On Thu, 10 Mar 2022 14:29:36 GMT, Joe Darcy wrote: >> Hi @jddarcy , >> >> Test has been modified on the same lines using generic options which >> manipulate compilation thresholds and agnostic to target platforms. >> >> * @run main/othervm -XX:Tier3CompileThreshold=100 >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v13]

2022-03-10 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-10 Thread Joe Darcy
On Fri, 4 Mar 2022 19:04:40 GMT, Jatin Bhateja wrote: >> IMO RoundTests should have a explicit @run tag without any VM options as >> well. >> >> Do the added VM options run on all platforms in question? What is the >> approximate time to run the test run compared to before? > > Hi @jddarcy ,

Re: RFR: 8279508: Auto-vectorize Math.round API [v12]

2022-03-10 Thread Andrew Haley
On Wed, 9 Mar 2022 11:38:34 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v12]

2022-03-10 Thread Andrew Haley
On Wed, 9 Mar 2022 11:38:34 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v12]

2022-03-09 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v11]

2022-03-06 Thread Andrew Haley
On Wed, 2 Mar 2022 02:44:41 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v11]

2022-03-06 Thread Jatin Bhateja
On Sun, 6 Mar 2022 09:31:27 GMT, Andrew Haley wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Removing +LogCompilation flag. > > src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4157: > >> 4155:

Re: RFR: 8279508: Auto-vectorize Math.round API [v11]

2022-03-06 Thread Andrew Haley
On Wed, 2 Mar 2022 02:44:41 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-04 Thread Jatin Bhateja
On Fri, 4 Mar 2022 06:06:52 GMT, Joe Darcy wrote: >> test/jdk/java/lang/Math/RoundTests.java line 32: >> >>> 30: public static void main(String... args) { >>> 31: int failures = 0; >>> 32: for (int i = 0; i < 10; i++) { >> >> Is there an idiom to trigger the

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-03 Thread Joe Darcy
On Tue, 1 Mar 2022 06:17:06 GMT, Joe Darcy wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding descriptive comments. > > test/jdk/java/lang/Math/RoundTests.java line 32: > >> 30: public static

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-03-02 Thread Jatin Bhateja
On Wed, 19 Jan 2022 22:09:26 GMT, Joe Darcy wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding a test for scalar intrinsification. > > The testing for this PR doesn't look adequate to me. I don't see

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-02 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 01:07:47 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding descriptive comments. > > src/hotspot/cpu/x86/x86.ad line 7295: > >> 7293: __

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-02 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 04:55:08 GMT, Jatin Bhateja wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding descriptive comments. > > As per SDM, if post conversion a floating point number is

Re: RFR: 8279508: Auto-vectorize Math.round API [v11]

2022-03-02 Thread Sandhya Viswanathan
On Wed, 2 Mar 2022 02:44:41 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-03-02 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 03:38:32 GMT, Quan Anh Mai wrote: >> I believe the indefinite value should be 2^(w - 1) (a.k.a 0x8000) and >> the documentation is typoed. If you look at `cvtss2si`, the indefinite value >> is also written as 2^w - 1 but yet in `MacroAssembler::convert_f2i` we >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v11]

2022-03-01 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v10]

2022-03-01 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-28 Thread Joe Darcy
On Fri, 25 Feb 2022 06:22:42 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-25 Thread Jatin Bhateja
On Fri, 25 Feb 2022 06:22:42 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-25 Thread Quan Anh Mai
On Sat, 26 Feb 2022 03:02:51 GMT, Sandhya Viswanathan wrote: >> src/hotspot/cpu/x86/x86.ad line 7263: >> >>> 7261: __ vector_round_float_avx($dst$$XMMRegister, $src$$XMMRegister, >>> $xtmp1$$XMMRegister, >>> 7262: $xtmp2$$XMMRegister, >>>

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-25 Thread Quan Anh Mai
On Sat, 26 Feb 2022 03:37:32 GMT, Quan Anh Mai wrote: >> Clarification, the number in my comments above is (2^w - 1). This is from >> Intel SDM >> (https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html). >> Also you will need to take care when the valid

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-25 Thread Sandhya Viswanathan
On Sat, 26 Feb 2022 01:06:21 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Adding descriptive comments. > > src/hotspot/cpu/x86/x86.ad line 7263: > >> 7261: __

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-25 Thread Sandhya Viswanathan
On Fri, 25 Feb 2022 06:22:42 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v9]

2022-02-24 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v7]

2022-02-24 Thread Jatin Bhateja
On Thu, 24 Feb 2022 00:43:27 GMT, Sandhya Viswanathan wrote: > Also curious, how does the performance look with all these changes. Updated new perf numbers. - PR: https://git.openjdk.java.net/jdk/pull/7094

Re: RFR: 8279508: Auto-vectorize Math.round API [v7]

2022-02-24 Thread Jatin Bhateja
On Thu, 24 Feb 2022 01:43:27 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Review comments resolved. > > src/hotspot/cpu/x86/macroAssembler_x86.cpp line 8984: > >> 8982: } >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v8]

2022-02-24 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v7]

2022-02-23 Thread Sandhya Viswanathan
On Wed, 23 Feb 2022 09:03:37 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v7]

2022-02-23 Thread Sandhya Viswanathan
On Wed, 23 Feb 2022 09:03:37 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v7]

2022-02-23 Thread Sandhya Viswanathan
On Wed, 23 Feb 2022 09:03:37 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v7]

2022-02-23 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v6]

2022-02-23 Thread Jatin Bhateja
On Wed, 23 Feb 2022 01:31:24 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8279508: Fixing for windows failure. > > src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4146: > >> 4144:

Re: RFR: 8279508: Auto-vectorize Math.round API [v6]

2022-02-22 Thread Sandhya Viswanathan
On Thu, 17 Feb 2022 17:43:43 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v6]

2022-02-17 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v5]

2022-02-16 Thread Jatin Bhateja
On Wed, 16 Feb 2022 12:30:27 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-02-16 Thread Joseph D. Darcy
On 2/12/2022 6:55 PM, Jatin Bhateja wrote: On Fri, 21 Jan 2022 00:49:04 GMT, Sandhya Viswanathan wrote: The JVM currently initializes the x86 mxcsr to round to nearest even, see below in stubGenerator_x86_64.cpp: // Round to nearest (even), 64-bit mode, exceptions masked

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-16 Thread Jatin Bhateja
On Wed, 16 Feb 2022 12:26:45 GMT, Jatin Bhateja wrote: >>> > Hi, IIRC for evex encoding you can embed the RC control bit directly in >>> > the evex prefix, removing the need to rely on global MXCSR register. >>> > Thanks. >>> >>> Hi @merykitty , You are correct, we can embed RC mode in

Re: RFR: 8279508: Auto-vectorize Math.round API [v5]

2022-02-16 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-16 Thread Jatin Bhateja
On Mon, 14 Feb 2022 17:14:10 GMT, Jatin Bhateja wrote: >> That pseudocode would make a very useful comment too. This whole patch is >> very thinly commented. > >> > Hi, IIRC for evex encoding you can embed the RC control bit directly in >> > the evex prefix, removing the need to rely on global

Re: RFR: 8279508: Auto-vectorize Math.round API [v4]

2022-02-16 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-14 Thread Jatin Bhateja
On Mon, 14 Feb 2022 09:12:54 GMT, Andrew Haley wrote: >>> What does this do? Comment, even pseudo code, would be nice. >> >> Thanks @theRealAph , I shall append the comments over the routine. >> BTW, entire rounding algorithm can also be implemented using Vector API >> which can perform

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-14 Thread Andrew Haley
On Sun, 13 Feb 2022 13:12:35 GMT, Jatin Bhateja wrote: >>> Hi, IIRC for evex encoding you can embed the RC control bit directly in the >>> evex prefix, removing the need to rely on global MXCSR register. Thanks. >> >> Hi @merykitty , You are correct, we can embed RC mode in instruction >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-13 Thread Jatin Bhateja
On Sun, 13 Feb 2022 13:08:41 GMT, Jatin Bhateja wrote: >> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4066: >> >>> 4064: } >>> 4065: >>> 4066: void >>> C2_MacroAssembler::vector_cast_double_special_cases_evex(XMMRegister dst, >>> XMMRegister src, XMMRegister xtmp1, >> >> What does

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-13 Thread Jatin Bhateja
On Sun, 13 Feb 2022 10:58:19 GMT, Andrew Haley 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 >>

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-13 Thread Andrew Haley
On Sun, 13 Feb 2022 03:09:43 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-13 Thread Quan Anh Mai
On Sun, 13 Feb 2022 03:09:43 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-12 Thread Quan Anh Mai
On Sun, 13 Feb 2022 03:09:43 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v3]

2022-02-12 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-02-12 Thread Jatin Bhateja
On Fri, 21 Jan 2022 00:49:04 GMT, Sandhya Viswanathan wrote: > The JVM currently initializes the x86 mxcsr to round to nearest even, see > below in stubGenerator_x86_64.cpp: // Round to nearest (even), 64-bit mode, > exceptions masked StubRoutines::x86::_mxcsr_std = 0x1F80; The above works

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-01-20 Thread Sandhya Viswanathan
On Wed, 19 Jan 2022 17:38:25 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-01-19 Thread Joe Darcy
On Wed, 19 Jan 2022 17:38:25 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-01-19 Thread Vladimir Ivanov
On Wed, 19 Jan 2022 17:38:25 GMT, Jatin Bhateja wrote: >> Summary of changes: >> - Intrinsify Math.round(float) and Math.round(double) APIs. >> - Extend auto-vectorizer to infer vector operations on encountering scalar >> IR nodes for above intrinsics. >> - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API [v2]

2022-01-19 Thread Jatin Bhateja
> Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing framework. > > Following are the performance number of a JMH

Re: RFR: 8279508: Auto-vectorize Math.round API

2022-01-16 Thread Quan Anh Mai
On Sat, 15 Jan 2022 02:21:38 GMT, Jatin Bhateja wrote: > Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing

Re: RFR: 8279508: Auto-vectorize Math.round API

2022-01-15 Thread Jatin Bhateja
On Sun, 16 Jan 2022 02:23:15 GMT, Quan Anh Mai wrote: > Hi, did we have tests for the scalar intrinsification already? Thanks. Verification is done against scalar rounding operation.

Re: RFR: 8279508: Auto-vectorize Math.round API

2022-01-15 Thread Quan Anh Mai
On Sat, 15 Jan 2022 02:21:38 GMT, Jatin Bhateja wrote: > Summary of changes: > - Intrinsify Math.round(float) and Math.round(double) APIs. > - Extend auto-vectorizer to infer vector operations on encountering scalar IR > nodes for above intrinsics. > - Test creation using new IR testing

RFR: 8279508: Auto-vectorize Math.round API

2022-01-14 Thread Jatin Bhateja
Summary of changes: - Intrinsify Math.round(float) and Math.round(double) APIs. - Extend auto-vectorizer to infer vector operations on encountering scalar IR nodes for above intrinsics. - Test creation using new IR testing framework. Following are the performance number of a JMH micro included