gnu/gcc/f4860ebc2facb3aee7aca12f79ee36183f4deda9 phiopt: let cond replication change the loop structure [PR127085]
Per Richi's suggestion in the PR, making an irreducible region
reducible is a good thing, so instead of preventing it just let loop
fixup discover the new loop: set LOOPS_NEED_FIXUP when we changed the
CFG, and drop preserves_loop_structure_p in favor of never duplicating
a loop header.
Tested on ppc64le Linux.
PR tree-optimization/127085
gcc/ChangeLog:
* tree-ssa-phiopt.cc (preserves_loop_structure_p): Remove.
(replicate_cond_into_pred): Do not call it.
(replicate_conds_over_phis): Never duplicate loop headers; do
not mark back edges; set LOOPS_NEED_FIXUP when the CFG changed.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr127085.c: New test.
2 files changed