Re: [PATCH] Improve memcmpeq for 512-bit vector with vpcmpeq + kortest.

2023-10-27 Thread Richard Biener
> Am 27.10.2023 um 09:13 schrieb Hongtao Liu : > > On Fri, Oct 27, 2023 at 2:49 PM Richard Biener > wrote: >> >> >> Am 27.10.2023 um 07:50 schrieb liuhongt : >>> >>> When 2 vectors are equal, kmask is allones and kortest will set CF, >>> else CF will be cleared. >>> >>> So CF bit c

Re: [PATCH] Improve memcmpeq for 512-bit vector with vpcmpeq + kortest.

2023-10-27 Thread Hongtao Liu
On Fri, Oct 27, 2023 at 3:21 PM Hongtao Liu wrote: > > On Fri, Oct 27, 2023 at 2:49 PM Richard Biener > wrote: > > > > > > > > > Am 27.10.2023 um 07:50 schrieb liuhongt : > > > > > > When 2 vectors are equal, kmask is allones and kortest will set CF, > > > else CF will be cleared. > > > > > > So

Re: [PATCH] Improve memcmpeq for 512-bit vector with vpcmpeq + kortest.

2023-10-27 Thread Hongtao Liu
On Fri, Oct 27, 2023 at 2:49 PM Richard Biener wrote: > > > > > Am 27.10.2023 um 07:50 schrieb liuhongt : > > > > When 2 vectors are equal, kmask is allones and kortest will set CF, > > else CF will be cleared. > > > > So CF bit can be used to check for the result of the comparison. > > > > Boots

Re: [PATCH] Improve memcmpeq for 512-bit vector with vpcmpeq + kortest.

2023-10-26 Thread Richard Biener
> Am 27.10.2023 um 07:50 schrieb liuhongt : > > When 2 vectors are equal, kmask is allones and kortest will set CF, > else CF will be cleared. > > So CF bit can be used to check for the result of the comparison. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? I

[PATCH] Improve memcmpeq for 512-bit vector with vpcmpeq + kortest.

2023-10-26 Thread liuhongt
When 2 vectors are equal, kmask is allones and kortest will set CF, else CF will be cleared. So CF bit can be used to check for the result of the comparison. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? Before: vmovdqu (%rsi), %ymm0 vpxorq (%rdi), %ymm