[Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16

2021-11-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16

2021-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277

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

https://gcc.gnu.org/g:8f9f5101d52fec12f0f18dfaf746d18cf1f230d0

commit r12-5364-g8f9f5101d52fec12f0f18dfaf746d18cf1f230d0
Author: Richard Biener 
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  

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.

[Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16

2021-11-18 Thread hubicka at kam dot mff.cuni.cz via 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?

[Bug ipa/103277] [12 Regression] ICE in branch_prob with -O1 -fbranch-probabilities -fno-ipa-pure-const since r12-5236-g5aa91072e24c1e16

2021-11-18 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103277

Martin Liška  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  ---
Btw. started with r12-5236-g5aa91072e24c1e16.