Integrated: 8293695: Implement isInfinite intrinsic for RISC-V
Aleksei Voitylov
avoitylov at openjdk.org
Thu Sep 15 09:48:33 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.
This pull request has now been integrated.
Changeset: b31a03c6
Author: Aleksei Voitylov <avoitylov at openjdk.org>
Committer: Dmitry Samersoff <dsamersoff at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b31a03c60a14e32304efe15fcd0031a752f4b4ab
Stats: 30 lines in 3 files changed: 26 ins; 0 del; 4 mod
8293695: Implement isInfinite intrinsic for RISC-V
Reviewed-by: yadongwang, fyang, dsamersoff
-------------
PR: https://git.openjdk.org/jdk/pull/10253
More information about the hotspot-compiler-dev
mailing list