summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr60092.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/pr60092.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60092.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/pr60092.c b/gcc/testsuite/gcc.dg/vect/pr60092.c
new file mode 100644
index 00000000000..e03c625b489
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60092.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+int *foo (int n)
+{
+ int *p = __builtin_aligned_alloc (256, n * sizeof (int));
+ int *q = __builtin_aligned_alloc (256, n * sizeof (int));
+ bar (q);
+ int i;
+ for (i = 0; i < n; ++i)
+ p[i] = q[i] + q[i];
+ return p;
+}
+
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+/* { dg-final { scan-tree-dump-not "Peeling for alignment will be applied" "vect" } } */
+/* { dg-final { scan-tree-dump-not "Vectorizing an unaligned access" "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */