[PATCH] 8217561 : X86: Add floating-point Math.min/max intrinsics

Nils Eliasson nils.eliasson at oracle.com
Tue Jan 29 10:43:33 UTC 2019


Hi again,

I can get the test to fail in the -XX:-TieredCompilation case:

java.lang.AssertionError: Unexpected result of double min/maxa = 4.823909266625017E17, b = -3.3333333333333331E17, result = (-3.333334338197927E17, 4.823908261760423E17), expected = (-3.3333333333333331E17, 4.823909266625017E17)
	at compiler.intrinsics.math.TestFpMinMaxIntrinsics.dTest(TestFpMinMaxIntrinsics.java:113)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at compiler.intrinsics.math.TestFpMinMaxIntrinsics.main(TestFpMinMaxIntrinsics.java:124)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:835)

Allow compilation of the methods in the test:

"-XX:CompileCommand=compileonly,compiler.intrinsics.math.TestFpMinMaxIntrinsics*"

And add a loop in the main method, so the test case is run multiple times.

Regards,

Nils


On 2019-01-29 11:02, Nils Eliasson wrote:
>
> Hi Jatin,
>
> The diffs in your webrev have the wrong permissions - they return "403 
> - Forbidden".
>
> The patch is readable though, so I will have a look.
>
> Regards,
>
> Nils
>
> On 2019-01-29 05:18, Bhateja, Jatin wrote:
>>
>> Hi All,
>>
>> Please find attached a patch for intrinsification for java library 
>> methods Math.max and Math.min  for scalar floating point types (float 
>> and double).
>>
>> New intrinsics match the semantics of java library function and takes 
>> care of NaN and signed zero operands.
>>
>> Webrev : http://cr.openjdk.java.net/~sviswanathan/8217561/webrev.01/ 
>> <http://cr.openjdk.java.net/~sviswanathan/8217561/webrev.01/>
>>
>> Kindly review.
>>
>> Regards,
>>
>> Jatin
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20190129/06d5a98e/attachment.html>


More information about the hotspot-compiler-dev mailing list