On Fri, 23 Jan 2026 23:04:43 GMT, Mohamed Issa <[email protected]> wrote:

>> Intel&reg; AVX10 ISA [1] extensions added new floating point comparison 
>> instructions. They set the EFLAGS register so that relationships can be 
>> tested independently to avoid extra checks when one of the inputs is NaN.
>> 
>> Most of the work is covered in the architecture definition (`x86.ad`) file. 
>> A new comparison operand was created to be used by new CMove and JMP 
>> definitions with the APX specific portions of the CMove section being 
>> updated to rely on the new instructions because both sets of instructions 
>> are always expected to be available on the same platform. New floating point 
>> comparison definitions were also added.
>> 
>> This change uses the new AVX10.2 (UCOMXSS or UCOMXSD) instructions on 
>> supported platforms to avoid the extra handling required with existing 
>> (UCOMISS or UCOMISD) instructions. To make sure no new failures were 
>> introduced, tier1, tier2, and tier3 tests were run on builds with and 
>> without the changes. Additionally, the JTREG tests listed below were used to 
>> verify correctness with `-XX:-UseAPX` / `-XX:+UseAPX` options. The baseline 
>> build used is [OpenJDK 
>> v26-b26](https://github.com/openjdk/jdk/releases/tag/jdk-26%2B26).
>> 
>> 1. `jtreg:test/hotspot/jtreg/compiler/c2/irTests/CMoveLConstants.java`
>> 2. `jtreg:test/hotspot/jtreg/compiler/c2/irTests/TestFPComparison.java`
>> 3. 
>> `jtreg:test/hotspot/jtreg/compiler/intrinsics/math/TestSignumIntrinsic.java`
>> 4. `jtreg:test/hotspot/jtreg/compiler/vectorization/TestSignumVector.java`
>> 
>> Finally, the JMH micro-benchmark listed below was updated to separately 
>> exercise CMove and JMP code paths.
>> 
>> 1. `micro:test/micro/org/openjdk/bench/java/lang/FPComparison.java`
>> 
>> [1] 
>> https://www.intel.com/content/www/us/en/content-details/856721/intel-advanced-vector-extensions-10-2-intel-avx10-2-architecture-specification.html?wapkw=AVX10
>
> Mohamed Issa has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains 25 commits:
> 
>  - Merge branch 'master' into user/missa-prime/avx10_2
>  - Merge branch 'master' into user/missa-prime/avx10_2
>  - Change function names and extend IR encoding rules for CMove tests
>  - Merge remote-tracking branch 'origin/master' into user/missa-prime/avx10_2
>  - Remove unnecessary CMOV blocks and adjust predicates involving APX and 
> AVX10.2
>  - Remove extra jump instruction in signum floating point and unify three-way 
> floating point comparison logic in x86.ad
>  - Also update copyright year in IREncodingPrinter.java
>  - Include apx_f in list of verified CPU features for IR encoding
>  - Fix CMove IR tests to account for APX presence
>  - Merge branch 'master' into user/missa-prime/avx10_2
>  - ... and 15 more: https://git.openjdk.org/jdk/compare/44b74e16...09d1e44d

src/hotspot/cpu/x86/x86.ad line 6075:

> 6073: operand cmpOpUCF() %{
> 6074:   match(Bool);
> 6075:   predicate((!UseAPX || !VM_Version::supports_avx10_2()) &&

Is there a reason why the check is not an and like !UseAPX `&&` 
!VM_Version::supports_avx10_2() ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28337#discussion_r2729273938

Reply via email to