RFR: 8357982: Fix several failing BMI tests with -XX:+UseAPX [v2]
Sandhya Viswanathan
sviswanathan at openjdk.org
Fri Jun 6 18:31:50 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 :)
@eme64 This PR is now ready for your testing.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25501#issuecomment-2950110042
More information about the hotspot-compiler-dev
mailing list