RFR(S): 8073670: TypeF::eq and TypeD::eq do not handle NaNs correctly
vladimir.kozlov at oracle.com
Thu Feb 26 18:49:34 UTC 2015
The test misses copyright header otherwise changes look good.
Please, acknowledge Stefan Anzinger as contributor in changeset. He
identified the problem and proposed original fix.
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