Hi All,

Here is simple patch which cures the issue with outer-loop unswitching
- added invocation of number_of_latch_executions() to reject
unswitching for non-iterated loops.

Bootstrapping and regression testing did not show any new failures.
Is it OK for trunk?

ChangeLog:

2014-12-16  Yuri Rumyantsev  <ysrum...@gmail.com>

PR tree-optimization/68906
* tree-ssa-loop-unswitch.c : Include couple header files.
(tree_unswitch_outer_loop): Use number_of_latch_executions
to reject non-iterated loops.

gcc/testsuite/ChangeLog
* gcc.dg/torture/pr68906.c: New test.

Attachment: patch
Description: Binary data

Reply via email to