public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
@ 2022-10-04 13:04 asolokha at gmx dot com
2022-10-04 13:12 ` [Bug tree-optimization/107153] " marxin at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2022-10-04 13:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
Bug ID: 107153
Summary: [13 Regression] ICE in check_loop_closed_ssa_def, at
tree-ssa-loop-manip.cc:645
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: ---
gcc 13.0.0 20220925 snapshot (g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d) ICEs
when compiling the following testcase w/ -O1 -floop-parallelize-all
-ftree-parallelize-loops=2 -fno-tree-dominator-opts:
void
foo (int x, int y)
{
int i;
for (i = 0; i < 2; i++)
{
}
while (x)
if (!y)
while (y)
++y;
}
% gcc-13.0.0 -O1 -floop-parallelize-all -ftree-parallelize-loops=2
-fno-tree-dominator-opts -c rssq9kpi.c
during GIMPLE pass: ompexpssa
rssq9kpi.c: In function 'foo':
rssq9kpi.c:2:1: internal compiler error: in check_loop_closed_ssa_def, at
tree-ssa-loop-manip.cc:645
2 | foo (int x, int y)
| ^~~
0x77e395 check_loop_closed_ssa_def
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-ssa-loop-manip.cc:645
0x106f1a4 check_loop_closed_ssa_bb
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-ssa-loop-manip.cc:659
0x1070566 verify_loop_closed_ssa(bool, loop*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-ssa-loop-manip.cc:695
0x1070566 verify_loop_closed_ssa(bool, loop*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tree-ssa-loop-manip.cc:679
0xdfcf64 execute_function_todo
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/passes.cc:2109
0xdfd33e execute_todo
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/passes.cc:2145
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107153] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
@ 2022-10-04 13:12 ` marxin at gcc dot gnu.org
2022-10-06 10:13 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-04 13:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-10-04
Status|UNCONFIRMED |NEW
CC| |marxin at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107153] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
2022-10-04 13:12 ` [Bug tree-optimization/107153] " marxin at gcc dot gnu.org
@ 2022-10-06 10:13 ` rguenth at gcc dot gnu.org
2022-10-07 8:29 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-06 10:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Likely my (virtual LC update-ssa) fault.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107153] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
2022-10-04 13:12 ` [Bug tree-optimization/107153] " marxin at gcc dot gnu.org
2022-10-06 10:13 ` rguenth at gcc dot gnu.org
@ 2022-10-07 8:29 ` rguenth at gcc dot gnu.org
2022-10-07 12:27 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-07 8:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so the main issue is that when we parallelize a loop without stores we
insert stores and thus would require a loop PHI for the virtual operand plus
LC SSA updates.
We eventually end up in gen_parallel_loop at
/* We assume that the loop usually iterates a lot. */
loop_version (loop, many_iterations_cond, NULL,
profile_probability::likely (),
profile_probability::unlikely (),
profile_probability::likely (),
profile_probability::unlikely (), true);
update_ssa (TODO_update_ssa_no_phi);
which performs the update but doesn't insert PHIs - the above assumed
that we'd have no SSA update pending before the call to loop_version.
separate_decls_in_region is what creates the stores (with no virtual
operands, thus triggering renaming and the need for a LC PHI).
I'm going to work around.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107153] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
` (2 preceding siblings ...)
2022-10-07 8:29 ` rguenth at gcc dot gnu.org
@ 2022-10-07 12:27 ` cvs-commit at gcc dot gnu.org
2022-10-07 12:28 ` rguenth at gcc dot gnu.org
2022-10-10 10:05 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-07 12:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
--- 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:89228e3985c5cdf6be58a3b5b1afcad91e9e3422
commit r13-3161-g89228e3985c5cdf6be58a3b5b1afcad91e9e3422
Author: Richard Biener <rguenther@suse.de>
Date: Fri Oct 7 10:28:56 2022 +0200
tree-optimization/107153 - autopar SSA update issue
autopar performs insertion of stores, eventually requiring a
virtual loop PHI and assorted LC PHI adjustments which we intend
to do once after the pass finishes. But we also perform intermediate
update_ssa after loop duplication which can lose this fact. The
following forces renaming of the virtual operand before the final
SSA update to fix that. It also removes the explicit update_ssa
call from the gimple_duplicate_sese_tail utility as has been done
for all other such utilities and instead performs the SSA update
from autopar.
PR tree-optimization/107153
* tree-cfg.cc (gimple_duplicate_sese_tail): Do not update
SSA form here.
* tree-parloops.cc (gen_parallel_loop): Update SSA form
after to-exit-first transform, no PHI insertion is necessary.
(pass_parallelize_loops::execute): Force re-write of the
virtual operand SSA web.
* gcc.dg/autopar/pr107153.c: New testcase.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107153] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
` (3 preceding siblings ...)
2022-10-07 12:27 ` cvs-commit at gcc dot gnu.org
@ 2022-10-07 12:28 ` rguenth at gcc dot gnu.org
2022-10-10 10:05 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-07 12:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/107153] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
` (4 preceding siblings ...)
2022-10-07 12:28 ` rguenth at gcc dot gnu.org
@ 2022-10-10 10:05 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-10 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107153
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:a99f511c57b5b02edfd5969148c580b4a8737ee8
commit r13-3191-ga99f511c57b5b02edfd5969148c580b4a8737ee8
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Oct 10 12:04:56 2022 +0200
Require fgraphite effective target for pr107153.c test [PR107153]
The test uses -floop-parallelize-all which emits a sorry when graphite
isn't configured in.
2022-10-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/107153
* gcc.dg/autopar/pr107153.c: Require fgraphite effective target.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-10 10:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 13:04 [Bug tree-optimization/107153] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
2022-10-04 13:12 ` [Bug tree-optimization/107153] " marxin at gcc dot gnu.org
2022-10-06 10:13 ` rguenth at gcc dot gnu.org
2022-10-07 8:29 ` rguenth at gcc dot gnu.org
2022-10-07 12:27 ` cvs-commit at gcc dot gnu.org
2022-10-07 12:28 ` rguenth at gcc dot gnu.org
2022-10-10 10:05 ` 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).