111
|
1 #include "tree-vect.h"
|
|
2
|
|
3 extern void abort (void);
|
|
4
|
|
5 typedef struct giga
|
|
6 {
|
|
7 unsigned int g[16];
|
|
8 } giga;
|
|
9
|
|
10 unsigned long __attribute__((noinline,noclone))
|
|
11 addfst(giga const *gptr, int num)
|
|
12 {
|
|
13 unsigned int retval = 0;
|
|
14 int i;
|
|
15 for (i = 0; i < num; i++)
|
|
16 retval += gptr[i].g[0];
|
|
17 return retval;
|
|
18 }
|
|
19
|
|
20 int main ()
|
|
21 {
|
|
22 struct giga g[8];
|
|
23 unsigned int n = 1;
|
|
24 int i, j;
|
|
25 check_vect ();
|
|
26 for (i = 0; i < 8; ++i)
|
|
27 for (j = 0; j < 16; ++j)
|
|
28 {
|
|
29 g[i].g[j] = n++;
|
|
30 __asm__ volatile ("");
|
|
31 }
|
|
32 if (addfst (g, 8) != 456)
|
|
33 abort ();
|
|
34 return 0;
|
|
35 }
|
|
36
|
|
37 /* We don't want to vectorize the single-element interleaving in the way
|
|
38 we currently do that (without ignoring not needed vectors in the
|
|
39 gap between gptr[0].g[0] and gptr[1].g[0]), because that's very
|
|
40 sub-optimal and causes memory explosion (even though the cost model
|
|
41 should reject that in the end). */
|
|
42
|
|
43 /* { dg-final { scan-tree-dump-times "vectorized 0 loops in function" 2 "vect" } } */
|