RFR: 8352585: Add special case handling for Float16.max/min x86 backend [v2]
Sandhya Viswanathan
sviswanathan at openjdk.org
Tue Mar 25 20:23:25 UTC 2025
On Tue, 25 Mar 2025 08:31:09 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/cpu/x86/assembler_x86.cpp line 13758:
>>
>>> 13756: attributes.set_is_evex_instruction();
>>> 13757: attributes.set_embedded_opmask_register_specifier(mask);
>>> 13758: attributes.reset_is_clear_context();
>>
>> Why do we do reset_is_clear_context here? We want kdst bits to be set/reset and no merge context.
>
> Actually, its not relevant in this case. EVEX.Z bit is used to select b/w merging and zeroing semantics w.r.t to vector destination. for opmask destination we always set the [bits corresponding to masked out lanes to zero](https://www.felixcloutier.com/x86/vcmpph#:~:text=CMP_OPERATOR%20tsrc2%0A%20%20%20%20ELSE-,DEST.bit%5Bj%5D%20%3A%3D%200,-DEST%5BMAXKL%2D1)
I went through the manual and it does look like EVEX.Z bit should be set to 0 for instructions that set opmask as destination. So we do need to have the reset_is_clear_context() in this instruction.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24169#discussion_r2012876635
More information about the hotspot-compiler-dev
mailing list