public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
@ 2020-06-08 11:07 zsojka at seznam dot cz
  2020-06-08 11:33 ` [Bug debug/95576] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2020-06-08 11:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

            Bug ID: 95576
           Summary: [11 Regression] -fcompare-debug failure with -O3
                    -fno-tree-forwprop -fvect-cost-model=unlimited
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
                CC: aoliva at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

Created attachment 48703
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48703&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-g++ -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
-fcompare-debug testcase.C
x86_64-pc-linux-gnu-g++: error: testcase.C: '-fcompare-debug' failure

$ diff -u *gkd
--- a-testcase.C.gkd    2020-06-08 13:05:48.719739159 +0200
+++ a-testcase.gk.C.gkd 2020-06-08 13:05:48.839739158 +0200
@@ -191,9 +191,9 @@
 3:   struct S * s;
 4:   int f;
 5:   void * d;
-1:   int (*) () * _vptr.S;
-2:   static int (*) () _ZTV1S[5] = <<< omitted >>>;
-0:   struct S D.xxxx;
+2:   int (*) () * _vptr.S;
+0:   static int (*) () _ZTV1S[5] = <<< omitted >>>;
+1:   struct S D.xxxx;

 ;; Function T::~T (_ZN1TD0Ev, funcdef_no=8, cgraph_uid=9, symbol_order=9)

$ x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r11-1029-20200608001623-g53d461e4e0f-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r11-1029-20200608001623-g53d461e4e0f-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200608 (experimental) (GCC)

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

* [Bug debug/95576] [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
  2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
@ 2020-06-08 11:33 ` jakub at gcc dot gnu.org
  2020-06-08 11:46 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-06-08 11:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-454-gcfaf0edbb123958e84d296354152294f167db9f3

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

* [Bug debug/95576] [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
  2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
  2020-06-08 11:33 ` [Bug debug/95576] " jakub at gcc dot gnu.org
@ 2020-06-08 11:46 ` jakub at gcc dot gnu.org
  2020-06-09  6:57 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-06-08 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The important difference in *.slp2 dumps is:
@@ -188,14 +201,17 @@ T::~T (struct T * const this)
   _15 = VIEW_CONVERT_EXPR<long unsigned int>(&MEM <int (*) ()[5]> [(void
*)&_ZTV1T + 16B]);
   _14 = {_15};
   vect_cst__13 = _14;
-  vectp.24_16 = &this_2(D)->D.2378._vptr.S;
-  MEM[(int (*) () * *)vectp.24_16] = vect_cst__13;
   _18 = VIEW_CONVERT_EXPR<long unsigned int>(&MEM <int (*) ()[5]> [(void
*)&_ZTV1S + 16B]);
   _19 = {_18};
   vect_cst__20 = _19;
+  # DEBUG this => this_2(D)
+  vectp.24_16 = &this_2(D)->D.2378._vptr.S;
+  MEM[(int (*) () * *)vectp.24_16] = vect_cst__13;
   _4 = &this_2(D)->D.2378;
+  # DEBUG this => _4
   vectp.26_21 = &_4->_vptr.S;
   MEM[(int (*) () * *)vectp.26_21] = vect_cst__20;
+  # DEBUG BEGIN_STMT
   _5 = _4->s;
   if (_5 != 0B)
     goto <bb 3>; [70.00%]
(the previous pass is ok and all other hunks are just about addition of # DEBUG
stmts).

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

* [Bug debug/95576] [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
  2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
  2020-06-08 11:33 ` [Bug debug/95576] " jakub at gcc dot gnu.org
  2020-06-08 11:46 ` jakub at gcc dot gnu.org
@ 2020-06-09  6:57 ` rguenth at gcc dot gnu.org
  2020-06-10 13:12 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-09  6:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-06-09
   Target Milestone|---                         |11.0

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug debug/95576] [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
  2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2020-06-09  6:57 ` rguenth at gcc dot gnu.org
@ 2020-06-10 13:12 ` rguenth at gcc dot gnu.org
  2020-06-10 16:06 ` cvs-commit at gcc dot gnu.org
  2020-06-10 16:10 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-10 13:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's also odd vectorization.

t.c:14:3: note:   Detected interleaving store this_3(D)->D.2378._vptr.S and
_1->_vptr.S
t.c:14:3: note:   Queuing group with duplicate access for fixup
t.c:14:3: missed:   not consecutive access _6 = _1->s;
t.c:14:3: note:   Detected interleaving store of size 1
t.c:14:3: note:         this_3(D)->D.2378._vptr.S = &MEM <int (*) ()[5]> [(void
*)&_ZTV1T + 16B];
t.c:14:3: note:   Detected interleaving store of size 1
t.c:14:3: note:         _1->_vptr.S = &MEM <int (*) ()[5]> [(void *)&_ZTV1S +
16B];

so we split the group into two of size one and vectorizing with V1DImode.  But
that's something else to fix I guess.

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

* [Bug debug/95576] [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
  2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2020-06-10 13:12 ` rguenth at gcc dot gnu.org
@ 2020-06-10 16:06 ` cvs-commit at gcc dot gnu.org
  2020-06-10 16:10 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-10 16:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:36e95a9e539a08275a0a6ef542a7fae5baa5710f

commit r11-1180-g36e95a9e539a08275a0a6ef542a7fae5baa5710f
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jun 10 15:16:23 2020 +0200

    tree-optimization/95576 - fix compare-debug issue with SLP vectorization

    The following avoids leading debug stmts in BB vectorizer regions.

    2020-06-10  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/95576
            * tree-vect-slp.c (vect_slp_bb): Skip leading debug stmts.

            * g++.dg/vect/pr95576.cc: New testcase.

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

* [Bug debug/95576] [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited
  2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2020-06-10 16:06 ` cvs-commit at gcc dot gnu.org
@ 2020-06-10 16:10 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-10 16:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95576

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-06-10 16:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 11:07 [Bug debug/95576] New: [11 Regression] -fcompare-debug failure with -O3 -fno-tree-forwprop -fvect-cost-model=unlimited zsojka at seznam dot cz
2020-06-08 11:33 ` [Bug debug/95576] " jakub at gcc dot gnu.org
2020-06-08 11:46 ` jakub at gcc dot gnu.org
2020-06-09  6:57 ` rguenth at gcc dot gnu.org
2020-06-10 13:12 ` rguenth at gcc dot gnu.org
2020-06-10 16:06 ` cvs-commit at gcc dot gnu.org
2020-06-10 16:10 ` rguenth at gcc dot gnu.org

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).