RFR: 8357982: Fix several failing BMI tests with -XX:+UseAPX [v2]
Emanuel Peter
epeter at openjdk.org
Wed Jun 4 06:38:22 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 :)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25501#issuecomment-2938775593
More information about the hotspot-compiler-dev
mailing list