[Bug tree-optimization/100492] [10 Regression] wrong code at -O3 (generated code hangs)

2021-06-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100492

Richard Biener  changed:

   What|Removed |Added

  Known to work||10.3.1
  Known to fail|10.3.1  |10.3.0
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

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

[Bug tree-optimization/100492] [10 Regression] wrong code at -O3 (generated code hangs)

2021-06-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100492

--- Comment #9 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:cedce283c319103e039ae2659d0d7473dd8efeca

commit r10-9920-gcedce283c319103e039ae2659d0d7473dd8efeca
Author: Richard Biener 
Date:   Mon May 10 11:37:27 2021 +0200

tree-optimization/100492 - avoid irreducible regions in loop distribution

When we distribute away a condition we rely on the ability to
change it to either 1 != 0 or 0 != 0 depending on the direction
of the exit branch in the respective loop.  But when the loop
contains an irreducible sub-region then for the conditions inside
this this fails and can lead to infinite loops being generated.

Avoid distibuting loops with irreducible sub-regions.

2021-05-10  Richard Biener  

PR tree-optimization/100492
* tree-loop-distribution.c (find_seed_stmts_for_distribution):
Find nothing when the loop contains an irreducible region.

* gcc.dg/torture/pr100492.c: New testcase.

(cherry picked from commit 60af2db18013a0339302928ba98fee893ccc1957)