diff options
author | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-30 08:35:57 +0000 |
---|---|---|
committer | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-30 08:35:57 +0000 |
commit | 5d4f3ed8fef038c3a16e962831119564c8094cb0 (patch) | |
tree | ca50ebb2d0d7f8b30b28938281260d4d17f52bd2 /libgomp/testsuite | |
parent | c539ca6d154190665f81482c5dc9cae5b861f636 (diff) | |
download | gcc-5d4f3ed8fef038c3a16e962831119564c8094cb0.tar.gz |
Use max_loop_iterations in transform_to_exit_first_loop_alt
2015-06-30 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/66652
* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
max_loop_iterations to determine if nit + 1 overflows.
* testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c (f): Rewrite
using restrict pointers.
(main): Add arguments to calls to f.
* testsuite/libgomp.c/parloops-exit-first-loop-alt.c: Same.
* gcc.dg/parloops-exit-first-loop-alt-pr66652.c: New test.
* gcc.dg/parloops-exit-first-loop-alt-3.c (f): Rewrite using restrict
pointers.
* gcc.dg/parloops-exit-first-loop-alt.c: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c | 4 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c b/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c index cb5bf9cb8c5..7de1377cd56 100644 --- a/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c +++ b/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c @@ -10,7 +10,7 @@ unsigned int *a; unsigned int __attribute__((noclone,noinline)) -f (unsigned int n) +f (unsigned int n, unsigned int *__restrict__ a) { int i; unsigned int sum = 1; @@ -32,7 +32,7 @@ main (void) array[i] = i % 7; a = &array[0]; - res = f (N); + res = f (N, a); if (res != 11995) abort (); diff --git a/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt.c b/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt.c index 1c32ea33f7b..07468a9ab9e 100644 --- a/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt.c +++ b/libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt.c @@ -13,7 +13,8 @@ unsigned int b[N]; unsigned int c[N]; void __attribute__((noclone,noinline)) -f (unsigned int n) +f (unsigned int n, unsigned int *__restrict__ a, unsigned int *__restrict__ b, + unsigned int *__restrict__ c) { int i; @@ -36,7 +37,7 @@ main (void) c[k] = k * 2; } - f (N); + f (N, a, b, c); for (i = 0; i < N; i++) { |