aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-05-15 23:42:46 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-05-15 23:42:46 +0200
commitfed2a43c018366566c3b5b73269f863444b06163 (patch)
treed2de403c2a4b545627c84b4ad510e1c7f9b64307 /gcc/omp-low.c
parentc42b72a7ddc52c65a0a6b3f9127224c8770ac6da (diff)
downloadgcc-fed2a43c018366566c3b5b73269f863444b06163.zip
gcc-fed2a43c018366566c3b5b73269f863444b06163.tar.gz
gcc-fed2a43c018366566c3b5b73269f863444b06163.tar.bz2
omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf to 1.
* omp-low.c (lower_rec_input_clauses): For if (0) or simdlen (1) set max_vf to 1. * omp-expand.c (expand_omp_simd): For if (0) or simdlen (1) clear safelen_int and set loop->dont_vectorize. * c-c++-common/gomp/simd8.c: New test. From-SVN: r271270
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 874781a..3a3d09c 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -3811,6 +3811,14 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
|| is_variable_sized (OMP_CLAUSE_DECL (c)))
sctx.max_vf = 1;
break;
+ case OMP_CLAUSE_IF:
+ if (integer_zerop (OMP_CLAUSE_IF_EXPR (c)))
+ sctx.max_vf = 1;
+ break;
+ case OMP_CLAUSE_SIMDLEN:
+ if (integer_onep (OMP_CLAUSE_SIMDLEN_EXPR (c)))
+ sctx.max_vf = 1;
+ break;
default:
continue;
}