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

Jatin Bhateja jbhateja at openjdk.org
Wed Jun 4 09:51:03 UTC 2025


On Wed, 4 Jun 2025 06:35:50 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>>> @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, please initiate your test runs, we can have a second review from @sviswa7 once she is online.

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

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


More information about the hotspot-compiler-dev mailing list