49e75d8c95cbb977c8d64e9bfeca981bb5c322ed
[gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-pr95839-2.c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
3 /* { dg-additional-options "-w -Wno-psabi" } */
4
5 typedef double __attribute__((vector_size(16))) v2df;
6
7 v2df f(v2df a, v2df b)
8 {
9 return (v2df){a[0] + b[0], a[1] + b[1]};
10 }
11
12 v2df g(v2df a, v2df b)
13 {
14 return (v2df){a[0] + b[1], a[1] + b[0]};
15 }
16
17 /* Verify we manage to vectorize this with using the original vectors
18 and do not end up with any vector CTORs. */
19 /* { dg-final { scan-tree-dump-times "basic block vectorized" 2 "slp2" } } */
20 /* { dg-final { scan-tree-dump-not "vect_cst" "slp2" } } */