Commit f0305f3a by Jan Hubicka Committed by Jan Hubicka

tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also max_loop_iterations_int.

	* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also
	max_loop_iterations_int.
	(tree_unswitch_outer_loop): Likewise.

From-SVN: r235315
parent 0ef5cd0a
2016-04-18 Jan Hubicka <jh@suse.cz>
* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also
max_loop_iterations_int.
(tree_unswitch_outer_loop): Likewise.
2016-04-20 Bin Cheng <bin.cheng@arm.com> 2016-04-20 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/69489 PR tree-optimization/69489
......
...@@ -223,6 +223,8 @@ tree_unswitch_single_loop (struct loop *loop, int num) ...@@ -223,6 +223,8 @@ tree_unswitch_single_loop (struct loop *loop, int num)
/* If the loop is not expected to iterate, there is no need /* If the loop is not expected to iterate, there is no need
for unswitching. */ for unswitching. */
iterations = estimated_loop_iterations_int (loop); iterations = estimated_loop_iterations_int (loop);
if (iterations < 0)
iterations = max_loop_iterations_int (loop);
if (iterations >= 0 && iterations <= 1) if (iterations >= 0 && iterations <= 1)
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
...@@ -439,6 +441,8 @@ tree_unswitch_outer_loop (struct loop *loop) ...@@ -439,6 +441,8 @@ tree_unswitch_outer_loop (struct loop *loop)
/* If the loop is not expected to iterate, there is no need /* If the loop is not expected to iterate, there is no need
for unswitching. */ for unswitching. */
iterations = estimated_loop_iterations_int (loop); iterations = estimated_loop_iterations_int (loop);
if (iterations < 0)
iterations = max_loop_iterations_int (loop);
if (iterations >= 0 && iterations <= 1) if (iterations >= 0 && iterations <= 1)
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment