summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/loop-init.c2
-rw-r--r--gcc/loop-iv.c2
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f764ba938f0..5fe3c1c0da6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2015-12-03 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/68599
+ * loop-init.c (rtl_loop_init): Set LOOPS_HAVE_RECORDED_EXITS
+ in call to loop_optimizer_init.
+ * loop-iv.c (get_simple_loop_desc): Only allow unsafe loop
+ optimization to drop the assumptions/infinite notations if
+ the loop has a single exit.
+
2015-12-03 Richard Sandiford <richard.sandiford@arm.com>
* doc/md.texi (vec_load_lanes@var{m}@var{n}): Document that
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index e32c94ab1c0..120316d6562 100644
--- a/gcc/loop-init.c
+++ b/gcc/loop-init.c
@@ -395,7 +395,7 @@ rtl_loop_init (void)
dump_flow_info (dump_file, dump_flags);
}
- loop_optimizer_init (LOOPS_NORMAL);
+ loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
return 0;
}
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index c7d51643e92..dfa3ca38204 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -3054,7 +3054,7 @@ get_simple_loop_desc (struct loop *loop)
}
}
- if (flag_unsafe_loop_optimizations)
+ if (flag_unsafe_loop_optimizations && single_exit (loop))
{
desc->assumptions = NULL_RTX;
desc->infinite = NULL_RTX;