public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108970] New: [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359
@ 2023-02-28 16:47 asolokha at gmx dot com
  2023-02-28 16:50 ` [Bug tree-optimization/108970] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2023-02-28 16:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108970
           Summary: [13 Regression] ICE in vect_do_peeling, at
                    tree-vect-loop-manip.cc:2971, or ICE in
                    dump_printf_loc, at dumpfile.cc:1359
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

1. gcc 13.0.1 20230226 snapshot (g:e6d39f68d03c46637ca6e1bede3d28eae6278df3)
ICEs when compiling the following testcase w/ -O1 -ftree-loop-vectorize
-fsave-optimization-record -fno-tree-dce -fno-tree-scev-cprop:

int m;

__attribute__ ((noinline, returns_twice)) void
empty (void)
{
}

void
foo (void)
{
  while (m < 1)
    {
      empty ();
      ++m;
    }
}

% gcc-13 -O1 -ftree-loop-vectorize -fsave-optimization-record -fno-tree-dce
-fno-tree-scev-cprop -c ionf2mqq.c
during GIMPLE pass: vect
ionf2mqq.c: In function 'foo':
ionf2mqq.c:9:1: internal compiler error: in vect_do_peeling, at
tree-vect-loop-manip.cc:2971
    9 | foo (void)
      | ^~~
0x119566f vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**,
tree_node**, tree_node**, int, bool, bool, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vect-loop-manip.cc:2971
0x1187e99 vect_transform_loop(_loop_vec_info*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vect-loop.cc:10807
0x11c6ca0 vect_transform_loops
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1007
0x11c72de try_vectorize_loop_1
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1153
0x11c72de try_vectorize_loop
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1183
0x11c7694 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1299

2. Omitting -fsave-optimization-record yields the following instead:

% gcc-13 -O1 -ftree-loop-vectorize -fno-tree-dce -fno-tree-scev-cprop -c
ionf2mqq.c
during GIMPLE pass: vect
ionf2mqq.c: In function 'foo':
ionf2mqq.c:9:1: internal compiler error: in dump_printf_loc, at
dumpfile.cc:1359
    9 | foo (void)
      | ^~~
0x6c16b2 dump_printf_loc(dump_metadata_t const&, dump_user_location_t const&,
char const*, ...)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/dumpfile.cc:1359
0x119565b vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**,
tree_node**, tree_node**, int, bool, bool, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vect-loop-manip.cc:2969
0x1187e99 vect_transform_loop(_loop_vec_info*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vect-loop.cc:10807
0x11c6ca0 vect_transform_loops
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1007
0x11c72de try_vectorize_loop_1
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1153
0x11c72de try_vectorize_loop
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1183
0x11c7694 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-vectorizer.cc:1299

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

* [Bug tree-optimization/108970] [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359
  2023-02-28 16:47 [Bug tree-optimization/108970] New: [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359 asolokha at gmx dot com
@ 2023-02-28 16:50 ` pinskia at gcc dot gnu.org
  2023-03-01  7:42 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-28 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0

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

* [Bug tree-optimization/108970] [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359
  2023-02-28 16:47 [Bug tree-optimization/108970] New: [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359 asolokha at gmx dot com
  2023-02-28 16:50 ` [Bug tree-optimization/108970] " pinskia at gcc dot gnu.org
@ 2023-03-01  7:42 ` rguenth at gcc dot gnu.org
  2023-03-01  9:10 ` cvs-commit at gcc dot gnu.org
  2023-03-01  9:12 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-01  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-03-01

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  I will have a look.  Without -fsave-optimization-record it ICEs
with

during GIMPLE pass: vect
t.c: In function ‘foo’:
t.c:9:1: internal compiler error: in dump_printf_loc, at dumpfile.cc:1359
    9 | foo (void)
      | ^~~
0xf7d9c2 dump_printf_loc(dump_metadata_t const&, dump_user_location_t const&,
char const*, ...)
        /space/rguenther/src/gcc/gcc/dumpfile.cc:1359
0x194d5ee vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**,
tree_node**, tree_node**, int, bool, bool, tree_node**)
        /space/rguenther/src/gcc/gcc/tree-vect-loop-manip.cc:2969

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

* [Bug tree-optimization/108970] [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359
  2023-02-28 16:47 [Bug tree-optimization/108970] New: [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359 asolokha at gmx dot com
  2023-02-28 16:50 ` [Bug tree-optimization/108970] " pinskia at gcc dot gnu.org
  2023-03-01  7:42 ` rguenth at gcc dot gnu.org
@ 2023-03-01  9:10 ` cvs-commit at gcc dot gnu.org
  2023-03-01  9:12 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-01  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:85203d52bfa4a84da5f50e0a242891308ffa8d83

commit r13-6386-g85203d52bfa4a84da5f50e0a242891308ffa8d83
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Mar 1 09:10:19 2023 +0100

    tree-optimization/108970 - ICE with vectorizer peeling

    The function slpeel_can_duplicate_loop_p fails to verify we can
    copy blocks, instead slpeel_tree_duplicate_loop_to_edge_cfg does
    but that's too late.  The following fixes this, also simplifying
    error reporting which is somewhat pointless if we ICE immediately.

            PR tree-optimization/108970
            * tree-vect-loop-manip.cc (slpeel_can_duplicate_loop_p):
            Check we can copy the BBs.
            (slpeel_tree_duplicate_loop_to_edge_cfg): Avoid redundant
            check.
            (vect_do_peeling): Streamline error handling.

            * gcc.dg/pr108970.c: New testcase.

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

* [Bug tree-optimization/108970] [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359
  2023-02-28 16:47 [Bug tree-optimization/108970] New: [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2023-03-01  9:10 ` cvs-commit at gcc dot gnu.org
@ 2023-03-01  9:12 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-01  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |13.0
         Resolution|---                         |FIXED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is latent of course, but unlikely to hit us in practice.

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

end of thread, other threads:[~2023-03-01  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 16:47 [Bug tree-optimization/108970] New: [13 Regression] ICE in vect_do_peeling, at tree-vect-loop-manip.cc:2971, or ICE in dump_printf_loc, at dumpfile.cc:1359 asolokha at gmx dot com
2023-02-28 16:50 ` [Bug tree-optimization/108970] " pinskia at gcc dot gnu.org
2023-03-01  7:42 ` rguenth at gcc dot gnu.org
2023-03-01  9:10 ` cvs-commit at gcc dot gnu.org
2023-03-01  9:12 ` 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).