public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347
@ 2022-09-06 17:17 gscfq@t-online.de
2022-09-07 8:44 ` [Bug tree-optimization/106860] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-09-06 17:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106860
Bug ID: 106860
Summary: [12/13 Regression] ICE in single_pred_edge, at
basic-block.h:347
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started with r12 between 20211219 and 20220109, at -O3 or -Ofast,
and with file gcc.dg/graphite/isl-ast-gen-user-1.c :
(gcc/g++ configured with --enable-checking=yes)
$ cat isl-ast-gen-user-1.c
static const int N = 12;
int nSlip;
int main ()
{
int i, j, k, fdot = 0;
int a[N][N];
for ( i = 1; i < nSlip; i++)
{
for ( j = i+1; j < nSlip; j++)
{
for ( k = 0; k < i; k++)
fdot += a[i][k] * a[k][j];
a[i][j] = a[i][j] - fdot;
}
}
return 0;
}
$ g++-13-20220904 -c isl-ast-gen-user-1.c -Ofast -ftrapv -fnon-call-exceptions
-fno-tree-fre
during GIMPLE pass: lsplit
isl-ast-gen-user-1.c: In function 'int main()':
isl-ast-gen-user-1.c:4:5: internal compiler error: in single_pred_edge, at
basic-block.h:347
4 | int main ()
| ^~~~
0x1390add single_pred_edge
../../gcc/basic-block.h:347
0x1390add split_loop
../../gcc/tree-ssa-loop-split.cc:647
0x1390add tree_ssa_split_loops
../../gcc/tree-ssa-loop-split.cc:1678
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/106860] [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347
2022-09-06 17:17 [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347 gscfq@t-online.de
@ 2022-09-07 8:44 ` rguenth at gcc dot gnu.org
2022-09-07 10:09 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-07 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106860
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
Ever confirmed|0 |1
Last reconfirmed| |2022-09-07
Target Milestone|--- |12.3
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
static bool
split_loop (class loop *loop1)
{
...
/* Fix first loop's exit probability after scaling. */
edge exit_to_latch1 = single_pred_edge (loop1->latch);
I think it's a misconception that latches are guaranteed to have a single
predecessor. With LOOPS_HAVE_SIMPLE_LATCHES we have a single _successor_.
The CFG is also very different than expected, with a lot of code on the
"latch" (a whole subloop is there).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/106860] [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347
2022-09-06 17:17 [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347 gscfq@t-online.de
2022-09-07 8:44 ` [Bug tree-optimization/106860] " rguenth at gcc dot gnu.org
@ 2022-09-07 10:09 ` cvs-commit at gcc dot gnu.org
2022-09-07 10:09 ` [Bug tree-optimization/106860] [12 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-07 10:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106860
--- 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:0386609923577e07354ee63754795b2f729e7e00
commit r13-2514-g0386609923577e07354ee63754795b2f729e7e00
Author: Richard Biener <rguenther@suse.de>
Date: Wed Sep 7 10:44:33 2022 +0200
tree-optimization/106860 - fix profile scaling in split_loop
The following fixes a mistake in loop splitting which assumes loop
latches have a single predecessor and that edge is from the exit
test. Instead work from the single exit edge we have to find the
edge towards the latch.
PR tree-optimization/106860
* tree-ssa-loop-split.cc (split_loop): Find the exit to
latch edge from the loop exit edge instead of from the
latch. Verify we're going to find it.
* g++.dg/opt/pr106860.C: New testcase.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/106860] [12 Regression] ICE in single_pred_edge, at basic-block.h:347
2022-09-06 17:17 [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347 gscfq@t-online.de
2022-09-07 8:44 ` [Bug tree-optimization/106860] " rguenth at gcc dot gnu.org
2022-09-07 10:09 ` cvs-commit at gcc dot gnu.org
@ 2022-09-07 10:09 ` rguenth at gcc dot gnu.org
2022-09-09 9:50 ` cvs-commit at gcc dot gnu.org
2022-09-09 9:51 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-07 10:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106860
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12/13 Regression] ICE in |[12 Regression] ICE in
|single_pred_edge, at |single_pred_edge, at
|basic-block.h:347 |basic-block.h:347
Priority|P3 |P2
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/106860] [12 Regression] ICE in single_pred_edge, at basic-block.h:347
2022-09-06 17:17 [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347 gscfq@t-online.de
` (2 preceding siblings ...)
2022-09-07 10:09 ` [Bug tree-optimization/106860] [12 " rguenth at gcc dot gnu.org
@ 2022-09-09 9:50 ` cvs-commit at gcc dot gnu.org
2022-09-09 9:51 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-09 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106860
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:4ce316ca54c863cf0fd4257ba0ab768ab83c62e5
commit r12-8753-g4ce316ca54c863cf0fd4257ba0ab768ab83c62e5
Author: Richard Biener <rguenther@suse.de>
Date: Wed Sep 7 10:44:33 2022 +0200
tree-optimization/106860 - fix profile scaling in split_loop
The following fixes a mistake in loop splitting which assumes loop
latches have a single predecessor and that edge is from the exit
test. Instead work from the single exit edge we have to find the
edge towards the latch.
PR tree-optimization/106860
* tree-ssa-loop-split.cc (split_loop): Find the exit to
latch edge from the loop exit edge instead of from the
latch. Verify we're going to find it.
* g++.dg/opt/pr106860.C: New testcase.
(cherry picked from commit 0386609923577e07354ee63754795b2f729e7e00)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/106860] [12 Regression] ICE in single_pred_edge, at basic-block.h:347
2022-09-06 17:17 [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347 gscfq@t-online.de
` (3 preceding siblings ...)
2022-09-09 9:50 ` cvs-commit at gcc dot gnu.org
@ 2022-09-09 9:51 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-09 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106860
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |12.2.1
Resolution|--- |FIXED
Known to fail| |12.2.0
Status|ASSIGNED |RESOLVED
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-09-09 9:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 17:17 [Bug c/106860] New: [12/13 Regression] ICE in single_pred_edge, at basic-block.h:347 gscfq@t-online.de
2022-09-07 8:44 ` [Bug tree-optimization/106860] " rguenth at gcc dot gnu.org
2022-09-07 10:09 ` cvs-commit at gcc dot gnu.org
2022-09-07 10:09 ` [Bug tree-optimization/106860] [12 " rguenth at gcc dot gnu.org
2022-09-09 9:50 ` cvs-commit at gcc dot gnu.org
2022-09-09 9:51 ` 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).