[JBS] {New} (JDK-8170430) x86 pow() stub from Intel libm is inconsistent with pow() from fdlib
Deshpande, Vivek R
vivek.r.deshpande at intel.com
Wed Nov 30 01:26:59 UTC 2016
Hi
I have bug fix for avx512 8170430.
http://cr.openjdk.java.net/~vdeshpande/8170430/webrev.00/
I have also updated the JBS entry.
https://bugs.openjdk.java.net/browse/JDK-8170430
I have tested it with other libm stubs too along with pow.
Would you please review and sponsor it.
Regards,
Vivek
From: Vladimir Kozlov (JBS) [mailto:do-not-reply at openjdk.java.net]
Sent: Monday, November 28, 2016 5:58 PM
To: Deshpande, Vivek R
Subject: [JBS] {New} (JDK-8170430) x86 pow() stub from Intel libm is inconsistent with pow() from fdlib
[cid:jira-generated-image-avatar-38b45136-a878-4c0c-b3fb-5e67aefca21f]
Vladimir Kozlov<https://bugs.openjdk.java.net/secure/ViewProfile.jspa?name=kvn> created an issue
JDK<https://bugs.openjdk.java.net/browse/JDK> / [Bug] <https://bugs.openjdk.java.net/browse/JDK-8170430> JDK-8170430<https://bugs.openjdk.java.net/browse/JDK-8170430>
x86 pow() stub from Intel libm is inconsistent with pow() from fdlib<https://bugs.openjdk.java.net/browse/JDK-8170430>
Issue Type:
[Bug]Bug
Affects Versions:
9
Assignee:
Vivek Deshpande<https://bugs.openjdk.java.net/secure/ViewProfile.jspa?name=vdeshpande>
Attachments:
PowTests1.java
Components:
hotspot
Subcomponent:
compiler
Created:
2016-11-28 17:57
Priority:
[P3]P3
Reporter:
Vladimir Kozlov<https://bugs.openjdk.java.net/secure/ViewProfile.jspa?name=kvn>
There is way to prevent Interpreter to use math intrinsics: -XX:-InlineIntrinsics
In such case it will call C code through JNI. But JIT compilers will still use pow() stub from libm.
As result produced result java/lang/Math/PowTests.java may fail.
java -Xcomp -XX:-TieredCompilation -XX:-InlineIntrinsics PowTests1
a: 0.3678794411714423 b: 0.36787944117144233
failed
Attached PowTests1.java test is shortened PowTests.java test prepared by Oleg Pliss.
One way to fix it (to get consistent results) is to not use libm stubs when InlineIntrinsics switched off:
- if (VM_Version::supports_sse2() && UseLibmIntrinsic) {
+ if (VM_Version::supports_sse2() && UseLibmIntrinsic && InlineIntrinsics) {
if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dsin) ||
But it would be better if code in macroAssembler_x86_pow.cpp could be fixed.
It would be also nice to verify other libm stubs with -XX:-InlineIntrinsics
[Add Comment]<https://bugs.openjdk.java.net/browse/JDK-8170430#add-comment>
Add Comment<https://bugs.openjdk.java.net/browse/JDK-8170430#add-comment>
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
[Atlassian logo]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161130/e9e64609/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1017 bytes
Desc: image001.png
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161130/e9e64609/image001-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 3207 bytes
Desc: image002.png
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161130/e9e64609/image002-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1084 bytes
Desc: image003.png
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161130/e9e64609/image003-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 2983 bytes
Desc: image004.png
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161130/e9e64609/image004-0001.png>
More information about the hotspot-compiler-dev
mailing list