summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
new file mode 100644
index 000000000..76c7850fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c
@@ -0,0 +1,28 @@
+/* { dg-require-effective-target vect_float } */
+/* { dg-do compile } */
+
+#include <stdlib.h>
+#include "../../tree-vect.h"
+
+__attribute__ ((noinline)) void
+ggSpectrum_Set8(float * data, float d)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ data[i] = d;
+}
+
+__attribute__ ((noinline)) void
+ggSpectrum_Set20(float * data, float d)
+{
+ int i;
+
+ for (i = 0; i < 20; i++)
+ data[i] = d;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+