summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2013-08-30 10:24:49 +0200
committerMarek Polacek <polacek@redhat.com>2013-08-30 10:24:49 +0200
commit1a986fd51aa96fbd0d66f4d52739356374912563 (patch)
treef5310553e69c8a35180556d9af7e66bdecac7f92 /gcc/tree-ssa-loop-ivcanon.c
parent61fb959b676db6ca9ef0da335dfef0d8ec08e113 (diff)
parentf85c9de6ba5165bc1b941ceb09e4e8ffb1c7eb0f (diff)
downloadgcc-ubsan.tar.gz
Merge branch 'master' of git+ssh://gcc.gnu.org/git/gcc into ubsanubsan
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 735403a0284..f2acc4c15f1 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -870,11 +870,12 @@ try_unroll_loop_completely (struct loop *loop,
{
if (!n_unroll)
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS | TDF_DETAILS, locus,
- "Turned loop into non-loop; it never loops.\n");
+ "loop turned into non-loop; it never loops\n");
else
{
dump_printf_loc (MSG_OPTIMIZED_LOCATIONS | TDF_DETAILS, locus,
- "Completely unroll loop %d times", (int)n_unroll);
+ "loop with %d iterations completely unrolled",
+ (int) (n_unroll + 1));
if (profile_info)
dump_printf (MSG_OPTIMIZED_LOCATIONS | TDF_DETAILS,
" (header execution count %d)",
@@ -1125,6 +1126,11 @@ tree_unroll_loops_completely_1 (bool may_increase_size, bool unroll_outer,
if (changed)
return true;
+ /* Don't unroll #pragma omp simd loops until the vectorizer
+ attempts to vectorize those. */
+ if (loop->force_vect)
+ return false;
+
/* Try to unroll this loop. */
loop_father = loop_outer (loop);
if (!loop_father)