RFR: 8357982: Fix several failing BMI tests with -XX:+UseAPX [v6]

Sandhya Viswanathan sviswanathan at openjdk.org
Wed Jun 4 21:14:59 UTC 2025


On Wed, 4 Jun 2025 09:51:03 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> A) Patch extends the following tests with hard-coded encoding checks for various BMI instructions to cover REX2 or extended EVEX encodings supported by APX. 
>> 
>> 
>>      compiler/intrinsics/bmi/verifycode/AndnTestI.java
>>      compiler/intrinsics/bmi/verifycode/AndnTestL.java
>>      compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java
>>      compiler/intrinsics/bmi/verifycode/LZcntTestL.java
>>      compiler/intrinsics/bmi/verifycode/TZcntTestL.java
>> 
>> 
>> B) After integration of JDK-8349582, which added APX NDD support, AndN instruction selection patterns that expect (Xor SRC, -1) as one of its operands were not getting selected because of a lower-cost generic immediate pattern match; patch fixes this issue through strict predicate checks.
>> 
>> Above tests are now passing, validations were carried out using Intel Software Development emulator.
>> 
>> Kindly review and share your feedback.
>> 
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adding comments.

test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsiTestI.java line 78:

> 76:                 (byte) 0x00,
> 77:                 (byte) 0xF3,
> 78:                 (byte) 0x3};

The line 78 should be same as line 61.

test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java line 77:

> 75:                 (byte) 0x00,
> 76:                 (byte) 0xF3,
> 77:                 (byte) 0x2};

This line 77 should be same as line 60.

test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BlsrTestI.java line 78:

> 76:                 (byte) 0x00,
> 77:                 (byte) 0xF3,
> 78:                 (byte) 0x1};

The line 78 should be same as line 61.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25501#discussion_r2127042159
PR Review Comment: https://git.openjdk.org/jdk/pull/25501#discussion_r2127043141
PR Review Comment: https://git.openjdk.org/jdk/pull/25501#discussion_r2127043645


More information about the hotspot-compiler-dev mailing list