public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [r11-5839 Regression] FAIL: gcc.target/i386/pr78102.c scan-assembler-times pcmpeqq 3 on Linux/x86_64
@ 2020-12-08 18:59 sunil.k.pandey
  2020-12-09  9:21 ` Prathamesh Kulkarni
  0 siblings, 1 reply; 7+ messages in thread
From: sunil.k.pandey @ 2020-12-08 18:59 UTC (permalink / raw)
  To: gcc-patches, gcc-regression, prathamesh.kulkarni

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

with GCC configured with

../../gcc/configure --prefix=/local/skpandey/gccwork/toolwork/gcc-bisect-master/master/r11-5839/usr --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl --enable-libmpx x86_64-linux --disable-bootstrap

To reproduce:

$ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m32}'"
$ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m32\ -march=cascadelake}'"
$ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m64}'"
$ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m64\ -march=cascadelake}'"

(Please do not reply to this email, for question about this report, contact me at skpgkp2 at gmail dot com)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [r11-5839 Regression] FAIL: gcc.target/i386/pr78102.c scan-assembler-times pcmpeqq 3 on Linux/x86_64
  2020-12-08 18:59 [r11-5839 Regression] FAIL: gcc.target/i386/pr78102.c scan-assembler-times pcmpeqq 3 on Linux/x86_64 sunil.k.pandey
@ 2020-12-09  9:21 ` Prathamesh Kulkarni
  2020-12-09 10:24   ` [PATCH] Fix up testcase Hongtao Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Prathamesh Kulkarni @ 2020-12-09  9:21 UTC (permalink / raw)
  To: sunil.k.pandey; +Cc: gcc Patches, gcc-regression

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.

Thanks,
Prathamesh
>
> with GCC configured with
>
> ../../gcc/configure --prefix=/local/skpandey/gccwork/toolwork/gcc-bisect-master/master/r11-5839/usr --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl --enable-libmpx x86_64-linux --disable-bootstrap
>
> To reproduce:
>
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m32}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m32\ -march=cascadelake}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m64}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="i386.exp=gcc.target/i386/pr78102.c --target_board='unix{-m64\ -march=cascadelake}'"
>
> (Please do not reply to this email, for question about this report, contact me at skpgkp2 at gmail dot com)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] Fix up testcase.
  2020-12-09  9:21 ` Prathamesh Kulkarni
@ 2020-12-09 10:24   ` Hongtao Liu
  2020-12-10 12:51     ` Prathamesh Kulkarni
  2020-12-13 15:58     ` Jeff Law
  0 siblings, 2 replies; 7+ messages in thread
From: Hongtao Liu @ 2020-12-09 10:24 UTC (permalink / raw)
  To: gcc Patches

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix up testcase.
  2020-12-09 10:24   ` [PATCH] Fix up testcase Hongtao Liu
@ 2020-12-10 12:51     ` Prathamesh Kulkarni
  2020-12-11  5:15       ` Hongtao Liu
  2020-12-13 15:58     ` Jeff Law
  1 sibling, 1 reply; 7+ messages in thread
From: Prathamesh Kulkarni @ 2020-12-10 12:51 UTC (permalink / raw)
  To: Hongtao Liu; +Cc: gcc Patches, H. J. Lu

On Wed, 9 Dec 2020 at 15:52, Hongtao Liu <crazylht@gmail.com> wrote:
>
> 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?
Thanks for the fix!
Just a small nit - Should it be "pcmpeqq" rather than "pcmpeq" in the
dg-final line ?

Thanks,
Prathamesh
>
>
>
> --
> BR,
> Hongtao

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix up testcase.
  2020-12-10 12:51     ` Prathamesh Kulkarni
@ 2020-12-11  5:15       ` Hongtao Liu
  2020-12-11  6:52         ` Prathamesh Kulkarni
  0 siblings, 1 reply; 7+ messages in thread
From: Hongtao Liu @ 2020-12-11  5:15 UTC (permalink / raw)
  To: Prathamesh Kulkarni; +Cc: gcc Patches, H. J. Lu

On Thu, Dec 10, 2020 at 8:52 PM Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> On Wed, 9 Dec 2020 at 15:52, Hongtao Liu <crazylht@gmail.com> wrote:
> >
> > 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?
> Thanks for the fix!
> Just a small nit - Should it be "pcmpeqq" rather than "pcmpeq" in the
> dg-final line ?
>

4 pcmpeq would cover both 4 pcmpeqq or 3 pcmpeqq + 1 pcmpeqd(original situation)

> Thanks,
> Prathamesh
> >
> >
> >
> > --
> > BR,
> > Hongtao



-- 
BR,
Hongtao

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix up testcase.
  2020-12-11  5:15       ` Hongtao Liu
@ 2020-12-11  6:52         ` Prathamesh Kulkarni
  0 siblings, 0 replies; 7+ messages in thread
From: Prathamesh Kulkarni @ 2020-12-11  6:52 UTC (permalink / raw)
  To: Hongtao Liu; +Cc: gcc Patches, H. J. Lu

On Fri, 11 Dec 2020 at 10:46, Hongtao Liu <crazylht@gmail.com> wrote:
>
> On Thu, Dec 10, 2020 at 8:52 PM Prathamesh Kulkarni
> <prathamesh.kulkarni@linaro.org> wrote:
> >
> > On Wed, 9 Dec 2020 at 15:52, Hongtao Liu <crazylht@gmail.com> wrote:
> > >
> > > 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?
> > Thanks for the fix!
> > Just a small nit - Should it be "pcmpeqq" rather than "pcmpeq" in the
> > dg-final line ?
> >
>
> 4 pcmpeq would cover both 4 pcmpeqq or 3 pcmpeqq + 1 pcmpeqd(original situation)
Ah indeed, thanks for pointing out.

Regards,
Prathamesh
>
> > Thanks,
> > Prathamesh
> > >
> > >
> > >
> > > --
> > > BR,
> > > Hongtao
>
>
>
> --
> BR,
> Hongtao

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix up testcase.
  2020-12-09 10:24   ` [PATCH] Fix up testcase Hongtao Liu
  2020-12-10 12:51     ` Prathamesh Kulkarni
@ 2020-12-13 15:58     ` Jeff Law
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff Law @ 2020-12-13 15:58 UTC (permalink / raw)
  To: Hongtao Liu, gcc Patches



On 12/9/20 3:24 AM, Hongtao Liu via Gcc-patches wrote:
> 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.
OK
jeff


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-13 15:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 18:59 [r11-5839 Regression] FAIL: gcc.target/i386/pr78102.c scan-assembler-times pcmpeqq 3 on Linux/x86_64 sunil.k.pandey
2020-12-09  9:21 ` Prathamesh Kulkarni
2020-12-09 10:24   ` [PATCH] Fix up testcase Hongtao Liu
2020-12-10 12:51     ` Prathamesh Kulkarni
2020-12-11  5:15       ` Hongtao Liu
2020-12-11  6:52         ` Prathamesh Kulkarni
2020-12-13 15:58     ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).