public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208
@ 2021-11-16 16:42 asolokha at gmx dot com
2021-11-17 5:35 ` [Bug ipa/103277] " 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-16 16:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
Bug ID: 103277
Summary: [12 Regression] ICE in branch_prob, at profile.c:1208
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-checking, ice-on-valid-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
gcc-12.0.0-alpha20111114 snapshot (g:3057f1ab737582a9fb37a3fb967ed8bf3659f2f4)
ICEs when compiling the following testcase w/ -O1 -fbranch-probabilities
-fno-ipa-pure-const:
__attribute__ ((returns_twice)) void
bar (void)
{
}
void
foo (int cond)
{
if (cond)
bar ();
}
% gcc-12.0.0 -O1 -fbranch-probabilities -fno-ipa-pure-const -c sgluc81f.c
during IPA pass: profile
sgluc81f.c: In function 'foo':
sgluc81f.c:11:1: internal compiler error: in branch_prob, at profile.c:1208
11 | }
| ^
0xdf5de2 branch_prob(bool)
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/profile.c:1208
0xf8e20f tree_profiling
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-profile.c:782
0xf8e20f execute
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-profile.c:888
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/103277] [12 Regression] ICE in branch_prob, at profile.c:1208
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
@ 2021-11-17 5:35 ` pinskia at gcc dot gnu.org
2021-11-17 5:44 ` [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const 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-17 5:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
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 ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
2021-11-17 5:35 ` [Bug ipa/103277] " pinskia at gcc dot gnu.org
@ 2021-11-17 5:44 ` pinskia at gcc dot gnu.org
2021-11-18 8:00 ` 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-17 5:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-11-17
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|branch_prob, at |branch_prob with -O1
|profile.c:1208 |-fbranch-probabilities
| |-fno-ipa-pure-const
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. DSE is able to remove the function as it does not have any side
effects even though it has returns twice but
<bb 4> :
.ABNORMAL_DISPATCHER (0);
is still there.
-fno-ipa-pure-const is required because it will cause an override of the
returns_twice attribute.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
2021-11-17 5:35 ` [Bug ipa/103277] " pinskia at gcc dot gnu.org
2021-11-17 5:44 ` [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const pinskia at gcc dot gnu.org
@ 2021-11-18 8:00 ` rguenth at gcc dot gnu.org
2021-11-18 8:36 ` [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16 marxin 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-18 8:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
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> ---
Mine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
` (2 preceding siblings ...)
2021-11-18 8:00 ` rguenth at gcc dot gnu.org
@ 2021-11-18 8:36 ` marxin at gcc dot gnu.org
2021-11-18 8:47 ` hubicka at kam dot mff.cuni.cz
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-18 8:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|branch_prob with -O1 |branch_prob with -O1
|-fbranch-probabilities |-fbranch-probabilities
|-fno-ipa-pure-const |-fno-ipa-pure-const since
| |r12-5236-g5aa91072e24c1e16
CC| |hubicka at gcc dot gnu.org
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. started with r12-5236-g5aa91072e24c1e16.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
` (3 preceding siblings ...)
2021-11-18 8:36 ` [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16 marxin at gcc dot gnu.org
@ 2021-11-18 8:47 ` hubicka at kam dot mff.cuni.cz
2021-11-18 9:02 ` cvs-commit at gcc dot gnu.org
2021-11-18 9:02 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-11-18 8:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
--- Comment #4 from hubicka at kam dot mff.cuni.cz ---
> Btw. started with r12-5236-g5aa91072e24c1e16.
Yep, I know - it is modref based DSE that lets us to enable that call as
dead. So the bug is technically mine if Richi decides to pass it to me
:)
We need to keep track if cleanup_cfg is needed by testing whether
removed call had multpile exit edges, right?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
` (4 preceding siblings ...)
2021-11-18 8:47 ` hubicka at kam dot mff.cuni.cz
@ 2021-11-18 9:02 ` cvs-commit at gcc dot gnu.org
2021-11-18 9:02 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-18 9:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
--- 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:8f9f5101d52fec12f0f18dfaf746d18cf1f230d0
commit r12-5364-g8f9f5101d52fec12f0f18dfaf746d18cf1f230d0
Author: Richard Biener <rguenther@suse.de>
Date: Thu Nov 18 09:07:22 2021 +0100
tree-optimization/103277 - do abnormal cleanup after call DSE
We can now DSE calls in more cases which requires us to eventually
purge dead abnormal edges. This implements this.
2021-11-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/103277
* tree-ssa-dse.c (need_ab_cleanup): New.
(dse_optimize_redundant_stores): Adjust.
(delete_dead_or_redundant_assignment): Get extra
need_ab_cleanup argument and set when abnormal cleanup is
needed.
(dse_optimize_call): Adjust.
(dse_optimize_stmt): Likewise.
(pass_dse::execute): Allocate and deallocate need_ab_cleanup.
Perform abnormal cleanup.
* tree-ssa-dse.h (delete_dead_or_redundant_assignment): Adjust.
* gcc.dg/pr103277.c: New testcase.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
` (5 preceding siblings ...)
2021-11-18 9:02 ` cvs-commit at gcc dot gnu.org
@ 2021-11-18 9:02 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-18 9:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- 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-18 9:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 16:42 [Bug ipa/103277] New: [12 Regression] ICE in branch_prob, at profile.c:1208 asolokha at gmx dot com
2021-11-17 5:35 ` [Bug ipa/103277] " pinskia at gcc dot gnu.org
2021-11-17 5:44 ` [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const pinskia at gcc dot gnu.org
2021-11-18 8:00 ` rguenth at gcc dot gnu.org
2021-11-18 8:36 ` [Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16 marxin at gcc dot gnu.org
2021-11-18 8:47 ` hubicka at kam dot mff.cuni.cz
2021-11-18 9:02 ` cvs-commit at gcc dot gnu.org
2021-11-18 9:02 ` 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).