diff options
author | Alan Lawrence <alan.lawrence@arm.com> | 2015-07-02 11:47:31 +0000 |
---|---|---|
committer | Alan Lawrence <alalaw01@gcc.gnu.org> | 2015-07-02 11:47:31 +0000 |
commit | 4f9a2b4e884acb7db0e9acb3c13b0adfbce65725 (patch) | |
tree | 03b839a9ffb0c5708c3e05e1fbf436749d1db944 /gcc/testsuite | |
parent | 5fa79de857ef94a396c313826b290c4bb548c135 (diff) | |
download | gcc-4f9a2b4e884acb7db0e9acb3c13b0adfbce65725.zip gcc-4f9a2b4e884acb7db0e9acb3c13b0adfbce65725.tar.gz gcc-4f9a2b4e884acb7db0e9acb3c13b0adfbce65725.tar.bz2 |
tree-pass.h (make_pass_ch_vect): New.
gcc/:
* tree-pass.h (make_pass_ch_vect): New.
* passes.def: Add pass_ch_vect just before pass_if_conversion.
* tree-ssa-loop-ch.c (ch_base, pass_ch_vect, pass_data_ch_vect,
pass_ch::process_loop_p, pass_ch_vect::process_loop_p,
make_pass_ch_vect): New.
(pass_ch): Extend ch_base.
(pass_ch::execute): Move all but loop_optimizer_init/finalize to...
(ch_base::copy_headers): ...here.
gcc/testsuite/:
* gcc.dg/vect/vect-strided-a-u16-i4.c (main1): Narrow scope of x,y,z,w.
* gcc.dg/vect/vect-ifcvt-11.c: New testcase.
From-SVN: r225311
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-ifcvt-11.c | 36 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c | 2 |
3 files changed, 42 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index de7c440..e7b749b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-02 Alan Lawrence <alan.lawrence@arm.com> + + * gcc.dg/vect/vect-strided-a-u16-i4.c (main1): Narrow scope of x,y,z,w. + * gcc.dg/vect/vect-ifcvt-11.c: New testcase. + 2015-07-02 Richard Biener <rguenther@suse.de> PR testsuite/66719 diff --git a/gcc/testsuite/gcc.dg/vect/vect-ifcvt-11.c b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-11.c new file mode 100644 index 0000000..7e32369 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-ifcvt-11.c @@ -0,0 +1,36 @@ +/* { dg-require-effective-target vect_condition } */ +/* { dg-require-effective-target vect_int } */ + +#include "tree-vect.h" + +#define N 16 + +extern void abort (void); + +int A[N] = {36, 39, 42, 45, 43, 32, 21, 12, 23, 34, 45, 56, 67, 78, 81, 11}; +int B[N] = {144,195,210,225,172,128,105,60, 92, 136,225,280,268,390,324,55}; + +__attribute__((noinline)) +void foo () +{ + for (int i = 0; i < N; i++) + { + int m = (A[i] & i) ? 5 : 4; + A[i] = A[i] * m; + } +} + +int main () +{ + + check_vect (); + foo (); + /* check results: */ + for (int i = 0; i < N; i++) + if (A[i] != B[i]) + abort (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c index af33ed4..0be68b3 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c @@ -21,7 +21,6 @@ main1 () s *ptr = arr; s res[N]; int i; - unsigned short x, y, z, w; for (i = 0; i < N; i++) { @@ -35,6 +34,7 @@ main1 () for (i = 0; i < N; i++) { + unsigned short x, y, z, w; x = ptr->b - ptr->a; y = ptr->d - ptr->c; res[i].c = x + y; |