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

Jatin Bhateja jbhateja at openjdk.org
Fri Jun 6 06:56:52 UTC 2025


On Thu, 5 Jun 2025 23:48:03 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review resolutions
>
> test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/LZcntTestI.java line 57:
> 
>> 55:         // REX2 variant
>> 56:         instrMaskAPX = new byte[]{(byte) 0xFF, (byte)0x80, (byte) 0xFF};
>> 57:         instrPatternAPX = new byte[]{(byte) 0xD5, (byte) 0x80, (byte) 0xBD};
> 
> I think we should check for 0xF3 as well here for lzcnt to differentiate it from bsr:
> instrMaskAPX = new byte[]{(byte) 0xFF, (byte) 0xFF, (byte)0x80, (byte) 0xFF};
> instrPatternAPX = new byte[]{(byte) 0xF3, (byte) 0xD5, (byte) 0x80, (byte) 0xBD};

Mask 0xFF is against the legacy prefix byte, which should be checked in entirety i.e. 0xF3

> test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/TZcntTestI.java line 56:
> 
>> 54:         // REX2 variant
>> 55:         instrMaskAPX = new byte[]{(byte) 0xFF, (byte)0x80, (byte) 0xFF};
>> 56:         instrPatternAPX = new byte[]{(byte) 0xD5, (byte) 0x80, (byte) 0xBC};
> 
> I think we should check for 0xF3 as well here for tzcnt to differentiate it from bsf:
>        instrMaskAPX = new byte[]{(byte) 0xFF, (byte) 0xFF,  (byte)0x80, (byte) 0xFF};
>        instrPatternAPX = new byte[]{(byte) 0xF3, (byte) 0xD5, (byte) 0x80, (byte) 0xBC};

Mask 0xFF is against the legacy prefix byte, which should be checked in entirety i.e. 0xF3

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25501#discussion_r2131620708
PR Review Comment: https://git.openjdk.org/jdk/pull/25501#discussion_r2131620781


More information about the hotspot-compiler-dev mailing list