tree-optimization/104716 - check if we can copy loop in loop distribution
authorRichard Biener <rguenther@suse.de>
Tue, 1 Mar 2022 08:24:26 +0000 (09:24 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 1 Mar 2022 14:24:31 +0000 (15:24 +0100)
commit54ef95cc4d1f3f2cde7c1f13250f889ffb81ca75
treea5b5025b9586d3993014db10e0bef189345d5d15
parent8fba8a8c26a22fc5fbc17a99605e0226dc6fbf28
tree-optimization/104716 - check if we can copy loop in loop distribution

The following checks whether we can copy the loop before attempting
to do so in loop distribution.  In the testcase there's a computed
goto and thus abnormal edges which we cannot redirect.

2022-03-01  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104716
* tree-loop-distribution.cc (find_seed_stmts_for_distribution):
Check if we can copy the loop.

* gfortran.dg/pr104716.f: New testcase.
gcc/testsuite/gfortran.dg/pr104716.f [new file with mode: 0644]
gcc/tree-loop-distribution.cc