From a681b758e9eb67a7eed0b65bbfc610aa44b905cb Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 28 Sep 2015 08:19:42 +0000 Subject: [PATCH] Add gcc.dg/vect/pr62171.c 2015-09-28 Tom de Vries * gcc.dg/vect/pr62171.c: New test. From-SVN: r228193 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/vect/pr62171.c | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/vect/pr62171.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e2c566ab21e..f197512961a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-09-28 Tom de Vries + + * gcc.dg/vect/pr62171.c: New test. + 2015-09-27 David Edelsohn * g++.dg/debug/dwarf2/pr44641.C: Revert line number change. Remove diff --git a/gcc/testsuite/gcc.dg/vect/pr62171.c b/gcc/testsuite/gcc.dg/vect/pr62171.c new file mode 100644 index 00000000000..18517b3a740 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr62171.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */ +/* { dg-require-effective-target vect_double } */ + +struct omp_data_i +{ + double *__restrict__ results; + double *__restrict__ pData; + double *__restrict__ coeff; +}; + +#define nEvents 1000000 + +double __attribute__((noinline, noclone)) +f (struct omp_data_i *__restrict__ p, int argc) +{ + + int idx; + + for (idx = 0; idx < nEvents; idx++) + ((p->results))[idx] = (*(p->coeff)) * ((p->pData))[idx]; + + return ((p->results))[argc]; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-not "versioned" "vect" } } */ -- 2.30.2