RFR(S): 8073670: TypeF::eq and TypeD::eq do not handle NaNs correctly
zoltan.majo at oracle.com
Thu Feb 26 21:49:07 UTC 2015
thank you for the review!
On 02/26/2015 07:49 PM, Vladimir Kozlov wrote:
> Hi, Zoltan
> The test misses copyright header otherwise changes look good.
I added the copyright header. Here is the new webrev:
> Please, acknowledge Stefan Anzinger as contributor in changeset. He
> identified the problem and proposed original fix.
Thanks for pointing that out. I will acknowledge Stefan in the changeset.
Thank you and best regards,
> On 2/26/15 1:32 AM, Zoltán Majó wrote:
>> please review the following patch.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8073670
>> Problem: The C2 compiler treats different NaN values as equivalent. As a
>> result, if there are multiple NaN values used in a single method, those
>> values can potentially be folded into a single value. That behavior is
>> not consistent with the behavior of C1 and the interpreter that always
>> treat different NaN values as different.
>> Solution: Change TypeF:eq and TypeD:eq to compare NaN values using a
>> bitwise comparison (instead of using the g_isnan() function).
>> Webrev: http://cr.openjdk.java.net/~zmajo/8073670/webrev.00/
>> Testing: Added compiler/c2/DifferentNaNFoldingTest.java. Test behaves as
>> expected if
>> - executed locally on linux_x64, solaris_sparc, solaris_x64 with/without
>> - executed in JPRT on all architectures targeted by the
>> hotspot_compiler_1 target with/without fix
>> Thank you and best regards,
More information about the hotspot-compiler-dev