RFR: 8279282: [vectorapi] Matcher::supports_vector_comparison_unsigned is not needed on x86 [v3]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Fri Jan 14 23:31:28 UTC 2022
On Sun, 9 Jan 2022 01:48:04 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> Hi,
>>
>> Currently, unsigned comparison on AVX is implemented by zero extending elements and comparing the results. This leads to unnecessary complexity. This patch changes the implementation to use the identity existing in `Integer/Long.compareUnsigned`, that is `compareUnsigned(x, y) == compare(x ^ min_value, y ^ min_value)`.
>>
>> Thank you very much.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>
> use movddup for 128-bit vectors
@merykitty Very good work. I have only one comment above.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6966
More information about the hotspot-dev
mailing list