public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383
@ 2021-06-16  3:10 asolokha at gmx dot com
  2021-06-16  6:59 ` [Bug tree-optimization/101088] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2021-06-16  3:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101088
           Summary: [12 Regression] ICE in sm_seq_valid_bb, at
                    tree-ssa-loop-im.c:2383
           Product: gcc
           Version: 12.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: ---

Created attachment 51026
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51026&action=edit
Testcase

gcc-12.0.0-alpha20210613 snapshot (g:681143b9b94d7f1c88a7c34e2250865c31191959)
ICEs when compiling the attached testcase w/ -O1:

% gcc-12.0.0 -O1 -c eltbeodv.c
during GIMPLE pass: lim
eltbeodv.c: In function 'qw':
eltbeodv.c:4:1: internal compiler error: in sm_seq_valid_bb, at
tree-ssa-loop-im.c:2383
    4 | qw (int n2)
      | ^~
0x7048b8 sm_seq_valid_bb
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210613/work/gcc-12-20210613/gcc/tree-ssa-loop-im.c:2383
0xf652cd hoist_memory_references
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210613/work/gcc-12-20210613/gcc/tree-ssa-loop-im.c:2538
0xf66e0a store_motion_loop
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210613/work/gcc-12-20210613/gcc/tree-ssa-loop-im.c:2925
0xf69092 do_store_motion
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210613/work/gcc-12-20210613/gcc/tree-ssa-loop-im.c:2945
0xf69092 loop_invariant_motion_in_fun(function*, bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210613/work/gcc-12-20210613/gcc/tree-ssa-loop-im.c:3170
0xf695e9 execute
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210613/work/gcc-12-20210613/gcc/tree-ssa-loop-im.c:3231

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

* [Bug tree-optimization/101088] [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383
  2021-06-16  3:10 [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383 asolokha at gmx dot com
@ 2021-06-16  6:59 ` rguenth at gcc dot gnu.org
  2021-06-16  8:57 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-16  6:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-06-16
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |12.0

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

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

* [Bug tree-optimization/101088] [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383
  2021-06-16  3:10 [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383 asolokha at gmx dot com
  2021-06-16  6:59 ` [Bug tree-optimization/101088] " rguenth at gcc dot gnu.org
@ 2021-06-16  8:57 ` marxin at gcc dot gnu.org
  2021-06-16 10:16 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-16  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Just for the record, started with r12-1392-gb8b80b8aa3d9a7ab.

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

* [Bug tree-optimization/101088] [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383
  2021-06-16  3:10 [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383 asolokha at gmx dot com
  2021-06-16  6:59 ` [Bug tree-optimization/101088] " rguenth at gcc dot gnu.org
  2021-06-16  8:57 ` marxin at gcc dot gnu.org
@ 2021-06-16 10:16 ` cvs-commit at gcc dot gnu.org
  2021-06-16 10:16 ` rguenth at gcc dot gnu.org
  2021-07-07 14:06 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-16 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:43fc4234ad3d9302d3460385b6fdb5e3f59b6986

commit r12-1526-g43fc4234ad3d9302d3460385b6fdb5e3f59b6986
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jun 16 09:49:18 2021 +0200

    tree-optimization/101088 - fix SM invalidation issue

    When we face a sm_ord vs sm_unord for the same ref during
    store sequence merging we assert that the ref is already marked
    unsupported.  But it can be that it will only be marked so
    during the ongoing merging so instead of asserting mark it here.

    Also apply some optimization to not waste resources to search
    for already unsupported refs.

    2021-06-16  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/101088
            * tree-ssa-loop-im.c (sm_seq_valid_bb): Only look for
            supported refs on edges.  Do not assert same ref but
            different kind stores are unsuported but mark them so.
            (hoist_memory_references): Only look for supported refs
            on exits.

            * gcc.dg/torture/pr101088.c: New testcase.

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

* [Bug tree-optimization/101088] [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383
  2021-06-16  3:10 [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-06-16 10:16 ` cvs-commit at gcc dot gnu.org
@ 2021-06-16 10:16 ` rguenth at gcc dot gnu.org
  2021-07-07 14:06 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-16 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101025
[Bug 101025] [11 Regression] wrong code at -O3 on x86_64-linux-gnu

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

* [Bug tree-optimization/101088] [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383
  2021-06-16  3:10 [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-06-16 10:16 ` rguenth at gcc dot gnu.org
@ 2021-07-07 14:06 ` cvs-commit at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-07 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:91fc9610464281bb28e3c6529399fdcfb57fa812

commit r11-8696-g91fc9610464281bb28e3c6529399fdcfb57fa812
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jun 16 09:49:18 2021 +0200

    tree-optimization/101088 - fix SM invalidation issue

    When we face a sm_ord vs sm_unord for the same ref during
    store sequence merging we assert that the ref is already marked
    unsupported.  But it can be that it will only be marked so
    during the ongoing merging so instead of asserting mark it here.

    Also apply some optimization to not waste resources to search
    for already unsupported refs.

    2021-06-16  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/101088
            * tree-ssa-loop-im.c (sm_seq_valid_bb): Only look for
            supported refs on edges.  Do not assert same ref but
            different kind stores are unsuported but mark them so.
            (hoist_memory_references): Only look for supported refs
            on exits.

            * gcc.dg/torture/pr101088.c: New testcase.

    (cherry picked from commit 43fc4234ad3d9302d3460385b6fdb5e3f59b6986)

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

end of thread, other threads:[~2021-07-07 14:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  3:10 [Bug tree-optimization/101088] New: [12 Regression] ICE in sm_seq_valid_bb, at tree-ssa-loop-im.c:2383 asolokha at gmx dot com
2021-06-16  6:59 ` [Bug tree-optimization/101088] " rguenth at gcc dot gnu.org
2021-06-16  8:57 ` marxin at gcc dot gnu.org
2021-06-16 10:16 ` cvs-commit at gcc dot gnu.org
2021-06-16 10:16 ` rguenth at gcc dot gnu.org
2021-07-07 14:06 ` cvs-commit 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).