RFR: 8285868: x86 intrinsics for floating point method isInfinite [v14]

Vladimir Kozlov kvn at openjdk.java.net
Thu Jun 2 01:33:39 UTC 2022


On Wed, 1 Jun 2022 23:16:35 GMT, Srinivas Vamsi Parasa <duke at openjdk.java.net> wrote:

>> We develop optimized x86 intrinsics for the floating point class check methods `isNaN()`, `isFinite()` and `IsInfinite()` for Float and Double classes. JMH benchmarks show upto `~70% `improvement using` vfpclasss(s/d)` instructions.
>> 
>> 
>> Benchmark (ns/op)	        Baseline Intrinsic(vfpclasss/d)	Speedup(%)
>> FloatClassCheck.testIsFinite	0.562	          0.406	         28%
>> FloatClassCheck.testIsInfinite	0.815	          0.383	         53%
>> FloatClassCheck.testIsNaN	0.63	          0.382	         39%
>> DoubleClassCheck.testIsFinite	0.565	          0.409	         28%
>> DoubleClassCheck.testIsInfinite	0.812	          0.375	         54%
>> DoubleClassCheck.testIsNaN	0.631	          0.38	         40%
>> FPComparison.isFiniteDouble	332.638	          272.577	 18%
>> FPComparison.isFiniteFloat	413.217	          331.825	 20%
>> FPComparison.isInfiniteDouble	874.897	          240.632	 72%
>> FPComparison.isInfiniteFloat	872.279	          321.269	 63%
>> FPComparison.isNanDouble	286.566	          240.36	 16%
>> FPComparison.isNanFloat	        346.123	          316.923	  8%
>
> Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision:
> 
>   eliminate redundate macros

compiler/c2/irTests/TestScheduleSmallMethod.java failed in Tier1 (case #1 is run with "-XX:-OptoScheduling"):


compiler.lib.ir_framework.shared.TestRunException: The following scenarios have failed: #1. Please check stderr for more information.
	at compiler.lib.ir_framework.TestFramework.reportScenarioFailures(TestFramework.java:617)
	at compiler.lib.ir_framework.TestFramework.startWithScenarios(TestFramework.java:578)
	at compiler.lib.ir_framework.TestFramework.start(TestFramework.java:335)
	at compiler.c2.irTests.TestScheduleSmallMethod.main(TestScheduleSmallMethod.java:44)


The test use Doube arithmetic.

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

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


More information about the hotspot-compiler-dev mailing list