omp-low.c (extract_omp_for_data): For collapsed loops...
authorJakub Jelinek <jakub@redhat.com>
Thu, 16 May 2013 10:43:33 +0000 (12:43 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 16 May 2013 10:43:33 +0000 (12:43 +0200)
commit5a0f4dd39504905e6c72bd59b6bcecd264fbcb9c
treebb79795b8f80069dd0b22d37e59aa3d81ee9f34d
parente3753785835fdb4c96f901c7d158a38b1c5c2f78
omp-low.c (extract_omp_for_data): For collapsed loops...

* omp-low.c (extract_omp_for_data): For collapsed loops,
if at least one of the loops is known at compile time to
iterate zero times, set count to 0.
(expand_omp_regimplify_p): New function.
(expand_omp_for_generic): For collapsed loops, if at least
one of the loops isn't known to iterate at least once,
add runtime check with setting count to 0.
(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
For unsigned types if it isn't known at compile time that
the loop will iterate at least once, add runtime check to bypass
the whole loop if initial condition isn't true.

* testsuite/libgomp.c/loop-13.c: New test.
* testsuite/libgomp.c/loop-14.c: New test.
* testsuite/libgomp.c/loop-15.c: New test.
* testsuite/libgomp.c++/loop-13.C: New test.
* testsuite/libgomp.c++/loop-14.C: New test.
* testsuite/libgomp.c++/loop-15.C: New test.

From-SVN: r198966
gcc/ChangeLog
gcc/omp-low.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/loop-13.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/loop-14.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c++/loop-15.C [new file with mode: 0644]
libgomp/testsuite/libgomp.c/loop-13.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/loop-14.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/loop-15.c [new file with mode: 0644]