RFR: 8279508: Auto-vectorize Math.round API [v15]
Quan Anh Mai
duke at openjdk.java.net
Sun Mar 13 00:10:46 UTC 2022
On Sat, 12 Mar 2022 23:22:16 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8279508: Creating separate test for round double under feature check.
>
> 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`
-------------
PR: https://git.openjdk.java.net/jdk/pull/7094
More information about the core-libs-dev
mailing list