RFR: 8285868: x86_64 intrinsics for floating point methods isNaN, isFinite, IsInfinite

Vladimir Kozlov kvn at openjdk.java.net
Fri Apr 29 00:39:52 UTC 2022


On Thu, 28 Apr 2022 23:02:47 GMT, Srinivas Vamsi Parasa <duke at openjdk.java.net> wrote:

> We develop optimized x86_64 intrinsics for the floating point class check methods isNaN(), isFinite() and IsInfinite() for Float and Double classes. JMH benchmarks show ~8x improvement for isNan(), ~3x improvement for isInfinite() and 15% gain for isFinite().

Impressive. Few comments.

You are testing performance of storing `boolean` results into array but usually these Java methods used in conditions. Measuring that will be more real word case. For both case: with `avx512dq` On and OFF.

And you need to post you perf results at least in RFE. Please, also show what instructions are currently generated vs your changes. I don't get how you made `isNaN()` faster - you generate more instructions is seems.

Instead of 3 new Ideal nodes per type you can use one and store instrinsic id (or other enum) in its field which you can read in `.ad` file instructions. Instead I suggest to split those mach instructions based on `avx512dq` support to avoid unused registers killing.

Why Double type support is limited to LP64? Why there is no `x86_32.ad` changes?

You can reuse `tmp1` in `double_class_check()`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8459


More information about the hotspot-compiler-dev mailing list