Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v2]

2024-04-10 Thread Vladimir Ivanov
On Fri, 5 Apr 2024 12:17:17 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review the patch? >> This pr is based on previous work and discussion in [pr >> 16234](https://github.com/openjdk/jdk/pull/16234), [pr >> 18294](https://github.com/openjdk/jdk/pull/18294). >> >> Compared with previous

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v16]

2023-10-26 Thread Vladimir Ivanov
On Thu, 26 Oct 2023 16:46:04 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-26 Thread Vladimir Ivanov
On Thu, 26 Oct 2023 10:39:04 GMT, Andrew Haley wrote: > do you have any suggestion about where to move the remaining code that's in > stubRoutines.cpp? As it is now, `globalDefinitions.hpp/cpp` looks the most appropriate one to me. You could create new header file for it (under `share/utiliti

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-19 Thread Vladimir Ivanov
On Thu, 19 Oct 2023 09:33:52 GMT, Andrew Haley wrote: > I took them out because of a potential backwards-compatibility breakage. Ok, I checked the removed code (https://github.com/openjdk/jdk/pull/10661/commits/b817d4757c78594be5960ee0be27013e2588d30a) and agree it is not needed here. `Resto

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v11]

2023-10-18 Thread Vladimir Ivanov
On Wed, 18 Oct 2023 08:50:13 GMT, Andrew Haley wrote: >> Meta-question and apologies if this was covered before, but why is this >> logic being added to stubRoutines.cpp? > Because tha'ts where @iwanowww asked me to put it. I don't much care. The constants were duplicated in multiple places (i

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v5]

2023-10-11 Thread Vladimir Ivanov
On Wed, 11 Oct 2023 20:58:23 GMT, Srinivas Vamsi Parasa wrote: >> The goal of this PR is to address the follow-up comments to the SIMD >> accelerated sort PR (#14227) which implemented AVX512 intrinsics for >> Arrays.sort() methods. >> The proposed changes are: >> >> 1) Restriction of the AVX

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-11 Thread Vladimir Ivanov
On Wed, 11 Oct 2023 23:38:05 GMT, Sandhya Viswanathan wrote: >> Also, for on-heap case the fallback implementation is equivalent to >> intrinsified case only when offset points at the 0th element of the array. > > @iwanowww Yes, you are late to the party :). The fallback implementation > could

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-11 Thread Vladimir Ivanov
On Wed, 11 Oct 2023 23:25:22 GMT, Vladimir Ivanov wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The pull request now contains 45 commits: >> >> - fix code style and formatting >> -

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-11 Thread Vladimir Ivanov
On Thu, 5 Oct 2023 23:36:48 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v5]

2023-10-11 Thread Vladimir Ivanov
On Wed, 11 Oct 2023 20:58:23 GMT, Srinivas Vamsi Parasa wrote: >> The goal of this PR is to address the follow-up comments to the SIMD >> accelerated sort PR (#14227) which implemented AVX512 intrinsics for >> Arrays.sort() methods. >> The proposed changes are: >> >> 1) Restriction of the AVX

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v9]

2023-10-11 Thread Vladimir Ivanov
On Wed, 11 Oct 2023 17:29:11 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v8]

2023-10-11 Thread Vladimir Ivanov
On Wed, 11 Oct 2023 18:43:31 GMT, Thomas Stuefe wrote: >> `thresh` is volatile. What more is needed? > > Argh, sorry, missed that volatile. And I was confused at first why there's a volatile on `tresh`. A short comment describing the intentions would definitely help here. - PR Rev

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v20]

2023-04-11 Thread Vladimir Ivanov
On Thu, 6 Apr 2023 10:54:18 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.htm

Re: RFR: 8304303: implement VirtualThread class notifyJvmti methods as C2 intrinsics [v4]

2023-03-17 Thread Vladimir Ivanov
On Fri, 17 Mar 2023 10:31:46 GMT, Serguei Spitsyn wrote: >> This is needed for performance improvements in support of virtual threads. >> The update includes the following: >> >> 1. Refactored the `VirtualThread` native methods: >> `notifyJvmtiMountBegin` and `notifyJvmtiMountEnd` =

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-26 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic

2022-10-26 Thread Vladimir Ivanov
On Wed, 26 Oct 2022 17:10:00 GMT, David Holmes wrote: > At most an expanded -Xcheck:jni check for FP-state manipulation, with an enhanced/fixed RestoreMXCSROnJNICalls is in order IMVHO. FTR both `-Xcheck:jni` and `-XX:+RestoreMXCSROnJNICalls` already catch the problematic case being discussed.

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-25 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-20 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-18 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-18 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-18 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-17 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-13 Thread Vladimir Ivanov
On Thu, 13 Oct 2022 07:47:20 GMT, Andrew Haley wrote: > The problem is that this bug is very insidious: the user probably doesn't > know that there's anything wrong, and almost certainly has no idea that it's > anything to do with JNI. I'm still trying to grasp why the current problem is somet

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-12 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 20:35:09 GMT, Maurizio Cimadamore wrote: > Note also that this specific problem is triggered by dlopen itself, because > certain libraries might have some "bad" (from the perspective of JVM) > initialization code. ... and it leads to another question whether the JVM itself

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-12 Thread Vladimir Ivanov
On Wed, 12 Oct 2022 17:00:15 GMT, Andrew Haley wrote: >> A bug in GCC causes shared libraries linked with -ffast-math to disable >> denormal arithmetic. This breaks Java's floating-point semantics. >> >> The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522 >> >> One solution is to sav