aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c
diff options
context:
space:
mode:
authorno-author <no-author@gcc.gnu.org>2005-07-07 18:03:23 +0000
committerno-author <no-author@gcc.gnu.org>2005-07-07 18:03:23 +0000
commitaef20aaf8817d9630dc2ba85257219a6a50c3b17 (patch)
tree1fb63e61ae091da56a1d015fada83932555140a6 /gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c
parent5b5fcc5945558d32c619dd3047ae0ee16a6edd2f (diff)
This commit was manufactured by cvs2svn to create tagapple/gcc-5210
'apple-gcc-5210'. git-svn-id: https://gcc.gnu.org/svn/gcc/tags/apple-gcc-5210@101722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c b/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c
new file mode 100644
index 00000000000..3a968ff25ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa-vect/pr16105.c
@@ -0,0 +1,23 @@
+/* APPLE LOCAL file lno */
+/* { dg-do compile { target powerpc*-*-* i?86-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse2" { target i?86-*-* } } */
+
+#define VECTOR_SIZE 512
+typedef float afloat __attribute__ ((__aligned__(16)));
+
+extern void check(const afloat * __restrict__ v);
+
+void square(const afloat * __restrict__ a,
+ afloat * __restrict__ out)
+{
+ unsigned int i;
+ for (i = 0; i < VECTOR_SIZE; i++) {
+ float ai = a[i];
+ float a2 = ai * ai;
+ out[i] = a2;
+ }
+ check(out);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"} } */