RFR: 8256054: C2: Floating-point min/max operations on vectors intermittently produce wrong results for NaN values

Vladimir Ivanov vlivanov at openjdk.java.net
Mon Nov 9 15:07:02 UTC 2020


Floating-point min/max operations on vectors intermittently produce wrong results for NaN values.

The problem boils down to a missing "TEMP dst" declaration on AVX512-related AD instruction. Without it`dst` vector register may match one of the input registers and it breaks the computation since it assumes all the used registers are different.

The fix adds missing effect and also introduces additional asserts to catch similar problems in the future.  

Testing:
- [x] jdk/incubator/vector w/ -XX:+DeoptimizeALot on AVX512-capable hardware
- [x] hs-precheckin-comp, hs-tier1, hs-tier2

Thanks!

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

Commit messages:
 - Fix EVEX variants of MinV/MaxV on x86.

Changes: https://git.openjdk.java.net/jdk/pull/1128/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1128&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256054
  Stats: 8 lines in 2 files changed: 7 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1128.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1128/head:pull/1128

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


More information about the hotspot-compiler-dev mailing list