RFR: 8351994: Enable Extended EVEX to REX2/REX demotion when src and dst are the same [v18]

Srinivas Vamsi Parasa sparasa at openjdk.org
Tue May 6 18:08:31 UTC 2025


On Mon, 5 May 2025 18:39:14 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove unused functions: orw and evex_prefix_int8_operand_ndd
>
> src/hotspot/cpu/x86/assembler_x86.cpp line 12976:
> 
>> 12974:     if (pre == VEX_SIMD_66) {
>> 12975:       emit_int8(0x66);
>> 12976:     }
> 
> We could do this based on size instead: if (size == EVEX_16bit).

Please see updated code using size == EVEX_16bit

> src/hotspot/cpu/x86/assembler_x86.cpp line 13044:
> 
>> 13042:   bool demote = is_demotable(no_flags, dst_enc, nds_enc);
>> 13043:   if (demote) {
>> 13044:     (size == EVEX_64bit) ? prefixq_and_encode(dst_enc) : prefix_and_encode(dst_enc);
> 
> This could be:
> (size == EVEX_64bit) ? prefixq(dst_enc) : prefix(dst_enc);

The code was updated as (size == EVEX_64bit) ? (void) prefixq_and_encode(dst_enc) : (void) prefix_and_encode(dst_enc);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24431#discussion_r2076004105
PR Review Comment: https://git.openjdk.org/jdk/pull/24431#discussion_r2076004952


More information about the hotspot-compiler-dev mailing list