[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-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Richard Biener  ---
Fixed.

[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-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:85e91ad55a69282c1b0e34569836a026a1a954d1

commit r12-5572-g85e91ad55a69282c1b0e34569836a026a1a954d1
Author: Richard Biener 
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  

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.

[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-29 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

Martin Liška  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  ---
Started with r12-5301-g045206450386bcd7.

[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-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

--- Comment #3 from Richard Biener  ---
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).

[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 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

Richard Biener  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  ---
I will have a look.

[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 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Keywords||needs-bisection
   Last reconfirmed||2021-11-29
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed. It looks like a latent bug though.

[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 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103458

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |12.0