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

Jatin Bhateja jbhateja at openjdk.org
Wed Jun 4 07:10:16 UTC 2025


On Tue, 3 Jun 2025 17:28:07 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Thanks,  encoding logic is concentrated in integral instruction tests and is shared with corresponding long variants, extended APX coverage for BLS/R/MSK.
>
>> @jatin-bhateja Thanks for looking into this!
>> 
>> `predicate(!UseAPX && n->in(2)->bottom_type()->is_int()->get_con() != -1);`
>> 
>> The PR title seems to suggest the bug is only about -XX:+UseAPX. Why are you changing things for the case !UseAPX?
>> 
>> Are these not cases like a ^ -1, which basically flips all bits. What alternative does this end up using now?
>> 
>> A code comment would be helpful.
> 
> We are tightening the predicate check so that under no circumstances we pick this pattern during the reduction phase of instruction selection on account of having lower cost. There is a generic pattern (xorI_rReg_imm) for all integral immediate values, and then there is a special pattern for Xor with -1 (fxorI_rReg_im1), which is needed for AndN inferencing.

> @jatin-bhateja I'll wait with testing, until someone from Intel gives this the approval. Feel free to ping me for that once we are there :)

Hi @eme64 , I am process of updating this version with some more changes, please hold on your test runs for a while :-)

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

PR Comment: https://git.openjdk.org/jdk/pull/25501#issuecomment-2938870073


More information about the hotspot-compiler-dev mailing list