> Although the scalar AVX10 floating point min/max instructions (VMINMAXSD, 
> VMINMAXSS, VMINMAXSH) are compact, it's better not to use them in reduction 
> loops. This is because of serial data dependencies that get triggered across 
> loop iterations. An alternate implementation using comparisons and jumps 
> leverages branch prediction and limits the effects of data dependencies to 
> cheaper instructions (e.g, MOV). Please note that this method is already used 
> for non-AVX10 min/max reduction loop scenarios.
> 
> With that background provided, these changes remove AVX10 floating point 
> min/max instructions from single and double precision floating point 
> reduction loops. They are replaced by the separate instruction sequence 
> described above. Currently, min/max half precision floating point reduction 
> loops aren't detectable, so they will be handled in a separate PR. There is 
> also some code cleanup to remove unused instruction definitions while also 
> adding necessary supporting infrastructure. The JTREG tests listed below were 
> used to verify correctness with the recommended JVM options mentioned in 
> corresponding source files. All modifications and tests used [OpenJDK 
> v27-b12](https://github.com/openjdk/jdk/releases/tag/jdk-27%2B12) as the 
> baseline build.
> 
> 1. `jtreg:test/jdk/jdk/incubator/vector/DoubleVector64Tests.java`
> 2. `jtreg:test/jdk/jdk/incubator/vector/DoubleVector128Tests.java`
> 3. `jtreg:test/jdk/jdk/incubator/vector/DoubleVector256Tests.java`
> 4. `jtreg:test/jdk/jdk/incubator/vector/DoubleVector512Tests.java`
> 5. `jtreg:test/jdk/jdk/incubator/vector/DoubleVectorMaxTests.java`
> 6. `jtreg:test/jdk/jdk/incubator/vector/FloatVector64Tests.java`
> 7. `jtreg:test/jdk/jdk/incubator/vector/FloatVector128Tests.java`
> 8. `jtreg:test/jdk/jdk/incubator/vector/FloatVector256Tests.java`
> 9. `jtreg:test/jdk/jdk/incubator/vector/FloatVector512Tests.java`
> 10. `jtreg:test/jdk/jdk/incubator/vector/FloatVectorMaxTests.java`
> 11. 
> `jtreg:test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorOperations.java`
> 12. 
> `jtreg:test/hotspot/jtreg/compiler/c2/irTests/TestFloat16ScalarOperations.java`
> 13. `jtreg:test/hotspot/jtreg/compiler/igvn/TestMinMaxIdentity.java`
> 14. 
> `jtreg:test/hotspot/jtreg/compiler/intrinsics/float16/TestFloat16MaxMinSpecialValues.java`
> 15. 
> `jtreg:test/hotspot/jtreg/compiler/intrinsics/math/TestFpMinMaxReductions.java`
> 
> Finally, the JMH micro-benchmarks listed below were updated to ensure all 
> code paths are exercised.
> 
> 1. `micro:test/micro/org/openjdk/bench/jdk/incubator/vector/F...

Mohamed Issa has updated the pull request incrementally with one additional 
commit since the last revision:

  Rename IR match nodes in tests to account for merging of scalar min/max 
definitions in x86.ad file.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29831/files
  - new: https://git.openjdk.org/jdk/pull/29831/files/d086ec77..3db7bbf8

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29831&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29831&range=02-03

  Stats: 44 lines in 2 files changed: 0 ins; 20 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/29831.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29831/head:pull/29831

PR: https://git.openjdk.org/jdk/pull/29831

Reply via email to