public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree)
@ 2021-11-28 20:11 asolokha at gmx dot com
2021-11-28 23:55 ` [Bug tree-optimization/103458] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2021-11-28 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
Bug ID: 103458
Summary: [12 Regression] ICE in verify_loop_structure, at
cfgloop.c:1736 (error: loop with header 4 not in loop
tree)
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: ---
gcc-12.0.0-alpha20211121 snapshot (g:da17c304e22ba256eba0b03710aa329115163b08)
ICEs when compiling the following testcase w/ -O2:
__attribute__ ((returns_twice)) int
bar (void);
void
foo (int *p, int x)
{
*p = 0;
while (*p < 1)
{
x = 0;
while (x < 1)
bar ();
x /= 0;
}
foo (p, x);
}
% gcc-12.0.0 -O2 -w -c xiksrvsw.c
xiksrvsw.c: In function 'foo':
xiksrvsw.c:5:1: error: loop with header 4 not in loop tree
5 | foo (int *p, int x)
| ^~~
during GIMPLE pass: cddce
xiksrvsw.c:5:1: internal compiler error: in verify_loop_structure, at
cfgloop.c:1736
0x6816e7 verify_loop_structure()
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/cfgloop.c:1736
0xdb8457 execute_function_todo
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/passes.c:2058
0xdb8cbe execute_todo
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gcc/passes.c:2096
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree)
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
@ 2021-11-28 23:55 ` pinskia at gcc dot gnu.org
2021-11-29 0:00 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-28 23:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree)
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
2021-11-28 23:55 ` [Bug tree-optimization/103458] " pinskia at gcc dot gnu.org
@ 2021-11-29 0:00 ` pinskia at gcc dot gnu.org
2021-11-29 7:41 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-29 0:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Keywords| |needs-bisection
Last reconfirmed| |2021-11-29
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. It looks like a latent bug though.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree)
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
2021-11-28 23:55 ` [Bug tree-optimization/103458] " pinskia at gcc dot gnu.org
2021-11-29 0:00 ` pinskia at gcc dot gnu.org
@ 2021-11-29 7:41 ` rguenth at gcc dot gnu.org
2021-11-29 8:18 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-29 7:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree)
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
` (2 preceding siblings ...)
2021-11-29 7:41 ` rguenth at gcc dot gnu.org
@ 2021-11-29 8:18 ` rguenth at gcc dot gnu.org
2021-11-29 8:54 ` [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) since r12-5301-g045206450386bcd7 marxin at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-29 8:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that we have
bb3:<-\ <--\
|\ / |
| -- |
| |
bb4: |
.ABNORMAL_DISPATCHER
at the start of CDDCE and the abnormal predecessor makes us not consider BB3
a loop header. But then we have an opportunity to create a forwarder
(we avoid creating them for loop headers but this isn't one ...) which
shows the opportunity to represent this CFG as an outer loop with an inner
cycle with abnormal edge. CFG cleanup doesn't undo this forwarder because
there are virtual PHIs in it.
ethread is the pass that introduces this problematic header while this is
all inside an irreducible region.
In principle handling the abnormal edge in this case would be OK but in
general abnormal latches pose a problem since with several loop opts we
are facing the need to split/redirect those so relaxing this condition
doesn't look feasible (but it creates nicer CFG for this particular testcase).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) since r12-5301-g045206450386bcd7
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
` (3 preceding siblings ...)
2021-11-29 8:18 ` rguenth at gcc dot gnu.org
@ 2021-11-29 8:54 ` marxin at gcc dot gnu.org
2021-11-29 9:12 ` cvs-commit at gcc dot gnu.org
2021-11-29 9:12 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-29 8:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-bisection |
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|verify_loop_structure, at |verify_loop_structure, at
|cfgloop.c:1736 (error: loop |cfgloop.c:1736 (error: loop
|with header 4 not in loop |with header 4 not in loop
|tree) |tree) since
| |r12-5301-g045206450386bcd7
CC| |marxin at gcc dot gnu.org
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5301-g045206450386bcd7.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) since r12-5301-g045206450386bcd7
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
` (4 preceding siblings ...)
2021-11-29 8:54 ` [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) since r12-5301-g045206450386bcd7 marxin at gcc dot gnu.org
@ 2021-11-29 9:12 ` cvs-commit at gcc dot gnu.org
2021-11-29 9:12 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-29 9:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
--- 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:85e91ad55a69282c1b0e34569836a026a1a954d1
commit r12-5572-g85e91ad55a69282c1b0e34569836a026a1a954d1
Author: Richard Biener <rguenther@suse.de>
Date: Mon Nov 29 09:15:47 2021 +0100
tree-optimization/103458 - avoid creating new loops in CD-DCE
When creating forwarders in CD-DCE we have to avoid creating loops
where we formerly did not consider those because of abnormal
predecessors. At this point simply excuse us when there are any
abnormal predecessors.
2021-11-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/103458
* tree-ssa-dce.c (make_forwarders_with_degenerate_phis): Do not
create forwarders for blocks with abnormal predecessors.
* gcc.dg/torture/pr103458.c: New testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) since r12-5301-g045206450386bcd7
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
` (5 preceding siblings ...)
2021-11-29 9:12 ` cvs-commit at gcc dot gnu.org
@ 2021-11-29 9:12 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-29 9:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-29 9:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-28 20:11 [Bug tree-optimization/103458] New: [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) asolokha at gmx dot com
2021-11-28 23:55 ` [Bug tree-optimization/103458] " pinskia at gcc dot gnu.org
2021-11-29 0:00 ` pinskia at gcc dot gnu.org
2021-11-29 7:41 ` rguenth at gcc dot gnu.org
2021-11-29 8:18 ` rguenth at gcc dot gnu.org
2021-11-29 8:54 ` [Bug tree-optimization/103458] [12 Regression] ICE in verify_loop_structure, at cfgloop.c:1736 (error: loop with header 4 not in loop tree) since r12-5301-g045206450386bcd7 marxin at gcc dot gnu.org
2021-11-29 9:12 ` cvs-commit at gcc dot gnu.org
2021-11-29 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).