diff options
Diffstat (limited to 'gcc/tree-ssa-loop-ch.c')
-rw-r--r-- | gcc/tree-ssa-loop-ch.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-ch.c b/gcc/tree-ssa-loop-ch.c index 9a0dca7..33e85c8 100644 --- a/gcc/tree-ssa-loop-ch.c +++ b/gcc/tree-ssa-loop-ch.c @@ -58,6 +58,13 @@ should_duplicate_loop_header_p (basic_block header, struct loop *loop, if (header->aux) return false; + /* Loop header copying usually increases size of the code. This used not to + be true, since quite often it is possible to verify that the condition is + satisfied in the first iteration and therefore to eliminate it. Jump + threading handles these cases now. */ + if (optimize_loop_for_size_p (loop)) + return false; + gcc_assert (EDGE_COUNT (header->succs) > 0); if (single_succ_p (header)) return false; |