aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-03-29 09:01:23 -0700
committerIan Lance Taylor <iant@golang.org>2023-03-29 09:01:23 -0700
commit6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced (patch)
tree1deecdcfbf185c7044bc861d0ace51285c96cb62 /gcc/tree-vectorizer.cc
parent795cffe109e28b248a54b8ee583cbae48368c2a7 (diff)
parentaa8f4242efc99f24de73c59d53996f28db28c13f (diff)
downloadgcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.zip
gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.tar.gz
gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.tar.bz2
Merge from trunk revision aa8f4242efc99f24de73c59d53996f28db28c13f.
Diffstat (limited to 'gcc/tree-vectorizer.cc')
-rw-r--r--gcc/tree-vectorizer.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
index 6ec4951..89cd0b8 100644
--- a/gcc/tree-vectorizer.cc
+++ b/gcc/tree-vectorizer.cc
@@ -1,5 +1,5 @@
/* Vectorizer
- Copyright (C) 2003-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003-2023 Free Software Foundation, Inc.
Contributed by Dorit Naishlos <dorit@il.ibm.com>
This file is part of GCC.
@@ -1973,9 +1973,11 @@ vector_costs::compare_inside_loop_cost (const vector_costs *other) const
HOST_WIDE_INT estimated_max_niter = likely_max_stmt_executions_int (loop);
if (estimated_max_niter != -1)
{
- if (known_le (estimated_max_niter, this_vf))
+ if (estimated_poly_value (this_vf, POLY_VALUE_MIN)
+ >= estimated_max_niter)
this_vf = estimated_max_niter;
- if (known_le (estimated_max_niter, other_vf))
+ if (estimated_poly_value (other_vf, POLY_VALUE_MIN)
+ >= estimated_max_niter)
other_vf = estimated_max_niter;
}