RFR: 8279282: [vectorapi] Matcher::supports_vector_comparison_unsigned is not needed on x86 [v3]

Quan Anh Mai duke at openjdk.java.net
Sun Jan 16 08:07:38 UTC 2022


On Fri, 14 Jan 2022 23:23:20 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use movddup for 128-bit vectors
>
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 3254:
> 
>> 3252:     vpcmpCC(dst, nds, src, eq_cond_enc, width, vector_len);
>> 3253:     vallones(xtmp, vector_len);
>> 3254:     vpxor(dst, xtmp, dst, vector_len);
> 
> This would add extra overhead of doing vallones every time versus what we had before.

Thanks a lot for the review.
uiCA shows that both result in 3 uops being executed if the all ones is reachable. If the external address is not reachable however, an extra `mov` instruction would need to be emitted in the current approach, leading to 1 extra uop.
Trying `_mm256_xor_si256(src, _mm256_set1_epi32(-1))` it seems that both gcc and clang use `vcmpeqd`.

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

PR: https://git.openjdk.java.net/jdk/pull/6966


More information about the hotspot-compiler-dev mailing list