diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-03 15:40:08 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-03 15:40:08 +0000 |
commit | 005f5910d046176b0c8c8f7d399111740225a270 (patch) | |
tree | 9f82d6adb1a1a1767cf5c5002c5f241448ca67b7 /gcc/loop-iv.c | |
parent | 10cb5d058edfe5448d98b9556bd9a2bc5b26984d (diff) | |
download | gcc-005f5910d046176b0c8c8f7d399111740225a270.tar.gz |
[PR tree-optimization/68599] Avoid over-zealous optimization with -funsafe-loop-optimizations
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231231 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r-- | gcc/loop-iv.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |