]> git.ipfire.org Git - thirdparty/gcc.git/commit
* omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 May 2019 21:44:40 +0000 (21:44 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 May 2019 21:44:40 +0000 (21:44 +0000)
commit1d86b8dcb823acf2300e1561f24a5aa7b6a858f6
tree04497663af09ac6033253ea43e12935fb81791b0
parenta8a0d1649676a45e338e46071c2d0565b6168327
* omp-low.c (lower_rec_input_clauses): If OMP_CLAUSE_IF
has non-constant expression, force sctx.lane and use two
argument IFN_GOMP_SIMD_LANE instead of single argument.
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Don't DCE
two argument IFN_GOMP_SIMD_LANE without lhs.
* tree-vectorizer.h (struct _loop_vec_info): Add simd_if_cond
member.
(LOOP_VINFO_SIMD_IF_COND, LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND):
Define.
(LOOP_REQUIRES_VERSIONING): Or in
LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
simd_if_cond.
(vect_analyze_loop_2): Punt if LOOP_VINFO_SIMD_IF_COND is constant 0.
* tree-vect-loop-manip.c (vect_loop_versioning): Add runtime check
from simd if clause if needed.

* gcc.dg/vect/vect-simd-1.c: New test.
* gcc.dg/vect/vect-simd-2.c: New test.
* gcc.dg/vect/vect-simd-3.c: New test.
* gcc.dg/vect/vect-simd-4.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271298 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/omp-low.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-simd-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-simd-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-simd-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-simd-4.c [new file with mode: 0644]
gcc/tree-ssa-dce.c
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vectorizer.h