On Sun, 13 Mar 2022 00:06:07 GMT, Quan Anh Mai <d...@openjdk.java.net> wrote:
>> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4161: >> >>> 4159: movl(scratch, 1056964608); >>> 4160: movq(xtmp1, scratch); >>> 4161: vbroadcastss(xtmp1, xtmp1, vec_enc); >> >> An `evpbroadcastd` would reduce this by one instruction I guess? > > Anyway an `evpbroadcastd xmm, r` has around 5 latency on the gpr so I think > you could just put the constant in the constant table and use `vbroadcastsd` It was done to save redundant floating point to integer domain switch over penalties. ------------- PR: https://git.openjdk.java.net/jdk/pull/7094