testsuite/52641 - Require int32 for gcc.dg/pr93820-2.c.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-49.c
blobe7101fcff4627bb545549bdfefd33c2ed58aee7b
1 /* This checks that vectorized constructors have the correct ordering. */
2 /* { dg-require-effective-target vect_int } */
4 typedef int V __attribute__((__vector_size__(16)));
6 __attribute__((__noipa__)) void
7 foo (unsigned int x, V *y)
9 unsigned int a[4] = { x + 0, x + 2, x + 4, x + 6 };
10 for (unsigned int i = 0; i < 3; ++i)
11 if (a[i] == 1234)
12 a[i]--;
13 *y = (V) { a[3], a[2], a[1], a[0] };
16 int
17 main ()
19 V b;
20 foo (0, &b);
21 if (b[0] != 6 || b[1] != 4 || b[2] != 2 || b[3] != 0)
22 __builtin_abort ();
23 return 0;
26 /* See that we vectorize an SLP instance. */
27 /* { dg-final { scan-tree-dump "Analyzing vectorizable constructor" "slp1" } } */
28 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "slp1" } } */