RFR: 8293695: Implement isInfinite intrinsic for RISC-V
Dmitry Samersoff
dsamersoff at openjdk.org
Thu Sep 15 09:40:39 UTC 2022
On Tue, 13 Sep 2022 15:48:38 GMT, Aleksei Voitylov <avoitylov at openjdk.org> wrote:
> RISC-V 64 intrinsic for isInfinite follows the logic of x86 intrinsic (introduced by 8285868). This patch adds C2 match for IsInfinite nodes. Existing test is modified to run on RISC-V and passes on both release and fastdebug builds. Benchmark results are below:
>
> before:
> Benchmark Mode Cnt Score Error Units
> DoubleClassCheck.testIsInfiniteBranch avgt 15 43.547 ± 6.843 ns/op
> DoubleClassCheck.testIsInfiniteCMov avgt 15 16.301 ± 1.386 ns/op
> DoubleClassCheck.testIsInfiniteStore avgt 15 16.230 ± 1.477 ns/op
> FloatClassCheck.testIsInfiniteBranch avgt 15 38.774 ± 3.572 ns/op
> FloatClassCheck.testIsInfiniteCMov avgt 15 15.064 ± 1.310 ns/op
> FloatClassCheck.testIsInfiniteStore avgt 15 14.967 ± 1.298 ns/op
>
> after:
> Benchmark Mode Cnt Score Error Units
> DoubleClassCheck.testIsInfiniteBranch avgt 15 39.987 ± 6.179 ns/op
> DoubleClassCheck.testIsInfiniteCMov avgt 15 13.477 ± 1.159 ns/op
> DoubleClassCheck.testIsInfiniteStore avgt 15 9.607 ± 0.834 ns/op
> FloatClassCheck.testIsInfiniteBranch avgt 15 36.265 ± 3.168 ns/op
> FloatClassCheck.testIsInfiniteCMov avgt 15 13.230 ± 1.100 ns/op
> FloatClassCheck.testIsInfiniteStore avgt 15 9.492 ± 0.807 ns/op
>
> According to 8285868 discussion, isNaN and isFinite methods intrinsification using the same approach might be not beneficial. I'm going to investigate it for RISC-V and propose methods intrinsification as part of further work in case it's profitable.
Marked as reviewed by dsamersoff (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/10253
More information about the hotspot-compiler-dev
mailing list