public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e
@ 2020-10-29  9:56 marxin at gcc dot gnu.org
  2020-10-29  9:56 ` [Bug tree-optimization/97626] " marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-29  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97626
           Summary: [11 Regression] ICE in vect_transform_stmt, at
                    tree-vect-stmts.c:10900 since
                    r11-4428-g4a369d199bf2f34e
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Reduced from gegl package:

$ cat plasma.i
struct {
  int x;
  int y;
} do_plasma_rect;

int do_plasma_context_0, do_plasma_x2, do_plasma_y2, do_plasma_plasma_depth,
    do_plasma_xm, do_plasma_ym;
void gegl_buffer_set();

void do_plasma(int x1, int y1) {
  if (__builtin_expect(({
                         int _g_boolean_var_;
                         if (do_plasma_context_0)
                           _g_boolean_var_ = 1;
                         else
                           _g_boolean_var_ = 0;
                         _g_boolean_var_;
                       }),
                       0)) {
    do_plasma_rect.x = x1;
    do_plasma_rect.y = y1;
    gegl_buffer_set();
  }
  do_plasma_xm = (x1 + do_plasma_x2) / 2;
  do_plasma_ym = (y1 + do_plasma_y2) / 2;
  if (do_plasma_plasma_depth) {
    do_plasma_rect.x = do_plasma_xm;
    do_plasma_rect.y = do_plasma_ym;
    return;
  }
  do_plasma(do_plasma_xm, do_plasma_ym);
}

$ gcc plasma.i -c -O3
during GIMPLE pass: slp
plasma.i: In function ‘do_plasma’:
plasma.i:10:6: internal compiler error: in vect_transform_stmt, at
tree-vect-stmts.c:10900
   10 | void do_plasma(int x1, int y1) {
      |      ^~~~~~~~~
0x73448b vect_transform_stmt(vec_info*, _stmt_vec_info*, gimple_stmt_iterator*,
_slp_tree*, _slp_instance*)
        /home/marxin/Programming/gcc/gcc/tree-vect-stmts.c:10900
0x104a91c vect_schedule_slp_node
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5401
0x105525d vect_schedule_scc
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5602
0x1055839 vect_schedule_scc
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5536
0x10563b7 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5665
0x105757d vect_slp_region
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4263
0x105757d vect_slp_bbs
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4373
0x10582e4 vect_slp_function(function*)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:4459
0x105a196 execute
        /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1437
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug tree-optimization/97626] [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e
  2020-10-29  9:56 [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e marxin at gcc dot gnu.org
@ 2020-10-29  9:56 ` marxin at gcc dot gnu.org
  2020-10-29 12:10 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-29  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-10-29
   Target Milestone|---                         |11.0
      Known to work|                            |10.2.0
      Known to fail|                            |11.0
             Status|UNCONFIRMED                 |NEW

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

* [Bug tree-optimization/97626] [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e
  2020-10-29  9:56 [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e marxin at gcc dot gnu.org
  2020-10-29  9:56 ` [Bug tree-optimization/97626] " marxin at gcc dot gnu.org
@ 2020-10-29 12:10 ` rguenth at gcc dot gnu.org
  2020-10-29 13:01 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-29 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

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

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

* [Bug tree-optimization/97626] [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e
  2020-10-29  9:56 [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e marxin at gcc dot gnu.org
  2020-10-29  9:56 ` [Bug tree-optimization/97626] " marxin at gcc dot gnu.org
  2020-10-29 12:10 ` rguenth at gcc dot gnu.org
@ 2020-10-29 13:01 ` rguenth at gcc dot gnu.org
  2020-10-30 11:28 ` cvs-commit at gcc dot gnu.org
  2020-10-30 11:29 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-29 13:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, tricky.  vect_slp_analyze_node_operations caching breaks for SCC we enter
through different paths.  When eventually externalizing an entry to a SCC
parts of the SCC (the part optimistically considered succeeding) can end up
cached making the second visit of the SCC end prematurely as succeeding.
Which also means costing will be off in that case.

For costing I've played with the idea of sticking node cost to the node
itself.  For eliding a cycle we probably want to cache node analysis
result in the node itself (so we avoid doing the analysis multiple times)
and not have visited determine the outcome.  But then this means doing
SCC finding also for analysis.  Meh.

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

* [Bug tree-optimization/97626] [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e
  2020-10-29  9:56 [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-29 13:01 ` rguenth at gcc dot gnu.org
@ 2020-10-30 11:28 ` cvs-commit at gcc dot gnu.org
  2020-10-30 11:29 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-30 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:33c0f246f799b7403171e97f31276a8feddd05c9

commit r11-4569-g33c0f246f799b7403171e97f31276a8feddd05c9
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Oct 30 11:26:18 2020 +0100

    tree-optimization/97626 - handle SCCs properly in SLP stmt analysis

    This makes sure to roll-back the whole SCC when we fail stmt
    analysis, otherwise the optimistic visited treatment breaks down
    with different entries.  Rollback is easy when tracking additions
    to visited in a vector which also makes the whole thing cheaper
    than the two hash-sets used before.

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

            PR tree-optimization/97626
            * tree-vect-slp.c (vect_slp_analyze_node_operations):
            Exchange the lvisited hash-set for a vector, roll back
            recursive adds to visited when analysis failed.
            (vect_slp_analyze_operations): Likewise.

            * gcc.dg/vect/bb-slp-pr97626.c: New testcase.

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

* [Bug tree-optimization/97626] [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e
  2020-10-29  9:56 [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-10-30 11:28 ` cvs-commit at gcc dot gnu.org
@ 2020-10-30 11:29 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-30 11:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-10-30 11:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29  9:56 [Bug tree-optimization/97626] New: [11 Regression] ICE in vect_transform_stmt, at tree-vect-stmts.c:10900 since r11-4428-g4a369d199bf2f34e marxin at gcc dot gnu.org
2020-10-29  9:56 ` [Bug tree-optimization/97626] " marxin at gcc dot gnu.org
2020-10-29 12:10 ` rguenth at gcc dot gnu.org
2020-10-29 13:01 ` rguenth at gcc dot gnu.org
2020-10-30 11:28 ` cvs-commit at gcc dot gnu.org
2020-10-30 11:29 ` 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).