RFR: 8354348: Enable Extended EVEX to REX2/REX demotion for commutative operations with same dst and src2 [v3]

Srinivas Vamsi Parasa sparasa at openjdk.org
Mon Sep 8 21:44:52 UTC 2025


On Tue, 2 Sep 2025 02:21:44 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Srinivas Vamsi Parasa has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - refactor emit_eevex_prefix_or_demote_arith_ndd to use size instead of passing attribute
>>  - undo swap in emit_arith and refactor accordinly
>
> src/hotspot/cpu/x86/assembler_x86.cpp line 12932:
> 
>> 12930:   if (is_commutative && is_demotable(no_flags, dst->encoding(), src2->encoding())) {
>> 12931:     if (size == EVEX_64bit) {
>> 12932:       emit_prefix_and_int8(get_prefixq(src1, dst, is_map1), opcode_byte + 2);
> 
> It will be good to write a comment on top of opcode_byte adjustment on account of opcode mismatch b/w NDD and equivalent demotable variant.
> 
> 
> EVEX.LLZ.NP.MAP4.SCALABLE 21 /r      AND {NF} {ND=1} rv, rv/mv, rv
> 
> 
> `REX.W + 23 /r      AND r64, r/m64 | RM | Valid | N.E. | r64 AND r/m64
> `

Please see a comment added as suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26997#discussion_r2331439482


More information about the hotspot-compiler-dev mailing list