tree-optimization/106533 - loop distribution of inner loop of nest
authorRichard Biener <rguenther@suse.de>
Fri, 5 Aug 2022 08:40:18 +0000 (10:40 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 5 Aug 2022 10:11:46 +0000 (12:11 +0200)
commit36bc2a8f24f9c8f6eb2c579d520d7fc73a113ae1
tree9df777dd4518ab61df96e08efaa83efdb706e48b
parent4574dad43f77100f401375e6c9df6402e99ab682
tree-optimization/106533 - loop distribution of inner loop of nest

Loop distribution currently gives up if the outer loop of a loop
nest it analyzes contains a stmt with side-effects instead of
continuing to analyze the innermost loop.  The following fixes that
by continuing anyway.

PR tree-optimization/106533
* tree-loop-distribution.cc (loop_distribution::execute): Continue
analyzing the inner loops when find_seed_stmts_for_distribution
fails.

* gcc.dg/tree-ssa/ldist-39.c: New testcase.
gcc/testsuite/gcc.dg/tree-ssa/ldist-39.c [new file with mode: 0644]
gcc/tree-loop-distribution.cc