On Thu, 15 Jan 2026 23:57:58 GMT, Sandhya Viswanathan 
<[email protected]> wrote:

>> Mohamed Issa has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Remove extra jump instruction in signum floating point and unify three-way 
>> floating point comparison logic in x86.ad
>
> src/hotspot/cpu/x86/x86.ad line 1706:
> 
>> 1704:   Label done;
>> 1705:   __ setcc(Assembler::above, dst);
>> 1706:   __ jcc(Assembler::aboveEqual, done);
> 
> It would be better to keep the original sequence with optimization:
>   __ movl(dst, -1);
>   __ jcc(Assembler::below, done);
>   __ setcc(Assembler::notEqual, dst);
> This would work for both AVX10_2 and prior as the Assembler::below covers 
> both unordered and less.

Updated.

> src/hotspot/cpu/x86/x86.ad line 9186:
> 
>> 9184: %}
>> 9185: 
>> 9186: instruct cmovI_regUCFE(cmpOpUCFE cop, rFlagsRegUCFE cr, rRegI dst, 
>> rRegI src) %{
> 
> The following instructs could be removed and only the ndd version need to be 
> kept:
> cmovI_regUCFE
> cmovI_memUCFE
> cmovN_regUCFE
> cmovP_regUCFE
> cmovL_regUCFE
> cmovL_memUCFE
> cmpOpUCFE/rFlagsRegUCFE should only match when both AVX10_2 and APX is 
> available otherwise fallback to cmpOpUCF/cmpOfUCF2/rFlagsRegUCF.
> We can then remove the predicates from cmovI_reg/cmovI_regUCFE_ndd etc.
> This is to avoid explosion of ad file instructs for various combination of 
> APX and AVX10_2.

Updated

> src/hotspot/cpu/x86/x86.ad line 14609:
> 
>> 14607:   ins_encode %{
>> 14608:     __ ucomxss($src1$$XMMRegister, $src2$$XMMRegister);
>> 14609:     emit_cmpfp3(masm, $dst$$Register);
> 
> It looks to me that the only difference between cmpF_reg and cmpF_regE is 
> ucomxss vs ucomiss. In which case it is better to keep only the original 
> cmpF_reg and remove cmpF_regE. Likewise for cmpF_memE, cmpF_immE, cmpD_regE, 
> cmpD_memE, cmpD_immE.

Updated

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28337#discussion_r2696513365
PR Review Comment: https://git.openjdk.org/jdk/pull/28337#discussion_r2696513175
PR Review Comment: https://git.openjdk.org/jdk/pull/28337#discussion_r2696512969

Reply via email to