[PATCH] Fix up testcase.

Hongtao Liu crazylht@gmail.com
Wed Dec 9 10:24:55 GMT 2020


On Wed, Dec 9, 2020 at 5:22 PM Prathamesh Kulkarni via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On Wed, 9 Dec 2020 at 00:29, sunil.k.pandey <skpandey@sc.intel.com> wrote:
> >
> > On Linux/x86_64,
> >
> > 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1 is the first bad commit
> > commit 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1
> > Author: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
> > Date:   Tue Dec 8 14:30:04 2020 +0530
> >
> >     gimple-isel: Fold x CMP y ? -1 : 0 to x CMP y [PR97872]
> >
> > caused
> >
> > FAIL: gcc.target/i386/pr78102.c scan-assembler-times pcmpeqq 3
> Hi,
> This is a known issue with the patch, and discussed here:
> https://gcc.gnu.org/pipermail/gcc/2020-December/234438.html
> I guess Hongtao will check in a fix for that soon.
>

According to https://uops.info/table.html,
both pcmpeqq and pcmpeqd use only port 1, so i think there's no
performance difference between

vpcmpeqq %xmm1, %xmm0, %xmm0
vpxor %xmm1, %xmm1, %xmm1
vpcmpeqq %xmm1, %xmm0, %xmm0

and

vpcmpeqq %xmm1, %xmm0, %xmm0
vpcmpeqd %xmm1, %xmm1, %xmm1
vpandn %xmm1, %xmm0, %xmm0

So fix up testcase as below.

gcc/testsuite

        * gcc.target/i386/i386/pr78102.c: Adjust testcase.

1 file changed, 1 insertion(+), 1 deletion(-)
gcc/testsuite/gcc.target/i386/pr78102.c | 2 +-

modified   gcc/testsuite/gcc.target/i386/pr78102.c
@@ -1,7 +1,7 @@
 /* PR target/78102 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-sse4.2 -msse4.1" } */
-/* { dg-final { scan-assembler-times "pcmpeqq" 3 } } */
+/* { dg-final { scan-assembler-times "pcmpeq" 4 } } */

Ok for trunk?



-- 
BR,
Hongtao


More information about the Gcc-patches mailing list