* [Committed] Add gcc.dg/vect/pr62171.c
@ 2015-09-28 8:52 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2015-09-28 8:52 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 141 bytes --]
Hi,
this patch adds testcase gcc.dg/vect/pr62171.c.
The testcase passes thanks to the fix for PR67673.
Committed to trunk.
Thanks,
- Tom
[-- Attachment #2: 0001-Add-gcc.dg-vect-pr62171.c.patch --]
[-- Type: text/x-patch, Size: 1179 bytes --]
Add gcc.dg/vect/pr62171.c
2015-09-28 Tom de Vries <tom@codesourcery.com>
* gcc.dg/vect/pr62171.c: New test.
---
gcc/testsuite/gcc.dg/vect/pr62171.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/vect/pr62171.c
diff --git a/gcc/testsuite/gcc.dg/vect/pr62171.c b/gcc/testsuite/gcc.dg/vect/pr62171.c
new file mode 100644
index 0000000..18517b3
--- /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" } } */
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-28 8:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-28 8:52 [Committed] Add gcc.dg/vect/pr62171.c Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).