summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-17 14:15:51 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-17 14:15:51 +0000
commitad45e43ecd45adefb779d492fb21ccce77b62aec (patch)
tree14df3553deedf61872893c8e7021d826f7a34289 /gcc/omp-low.c
parent23f2511f38e6b941c4096266ab83c0c5b09b60d3 (diff)
downloadgcc-ad45e43ecd45adefb779d492fb21ccce77b62aec.tar.gz
PR middle-end/60534
* omp-low.c (omp_max_vf): Treat -fno-tree-loop-optimize the same as -fno-tree-loop-vectorize. (expand_omp_simd): Likewise. testsuite/ * gcc.dg/gomp/pr60534.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208616 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 91c8656ee9c..24ef3c85e91 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2929,6 +2929,7 @@ omp_max_vf (void)
{
if (!optimize
|| optimize_debug
+ || !flag_tree_loop_optimize
|| (!flag_tree_loop_vectorize
&& (global_options_set.x_flag_tree_loop_vectorize
|| global_options_set.x_flag_tree_vectorize)))
@@ -6839,6 +6840,7 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd)
if ((flag_tree_loop_vectorize
|| (!global_options_set.x_flag_tree_loop_vectorize
&& !global_options_set.x_flag_tree_vectorize))
+ && flag_tree_loop_optimize
&& loop->safelen > 1)
{
loop->force_vect = true;