From: Victor Kaplansky Date: Mon, 4 Aug 2008 17:25:13 +0000 (+0000) Subject: vect-complex-5.c: New test. X-Git-Tag: releases/gcc-4.4.0~3397 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25385c279deed040fe5ed545bcf2f453fb3efc97;p=thirdparty%2Fgcc.git vect-complex-5.c: New test. 2008-08-04 Victor Kaplansky * gcc.dg/vect/vect-complex-5.c: New test. From-SVN: r138643 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2803cfedfed2..2dafc220ec18 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-08-04 Victor Kaplansky + + * gcc.dg/vect/vect-complex-5.c: New test. + 2008-08-04 Simon Baldwin PR c++/36999 diff --git a/gcc/testsuite/gcc.dg/vect/vect-complex-5.c b/gcc/testsuite/gcc.dg/vect/vect-complex-5.c new file mode 100644 index 000000000000..91eb1f54b3c5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-complex-5.c @@ -0,0 +1,45 @@ +/* { dg-require-effective-target vect_int } */ + +#include +#include +#include "tree-vect.h" + +#define N 16 + +struct foostr { + _Complex short f1; + _Complex short f2; +}; + +_Complex short a1[64] __attribute__ ((__aligned__(16))); +_Complex short a2[64] __attribute__ ((__aligned__(16))); +_Complex short b1[64] __attribute__ ((__aligned__(16))); +_Complex short b2[64] __attribute__ ((__aligned__(16))); +struct foostr c[64] __attribute__ ((__aligned__(16))); + +__attribute__ ((noinline)) void +foo (void) +{ + int i; + + for (i = 0; i < N; i++) + { + c[i].f1 = a1[i] + b1[i]; + c[i].f2 = a2[i] + b2[i]; + } + +} + +int +main (void) +{ + int i; + check_vect (); + + foo (); + + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */