re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / sra-4.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized -w" } */
3 /* Check that SRA does non block copies for structs that just contain vectors. */
4
5 #define vector __attribute__((vector_size(16)))
6
7 struct vt
8 {
9 vector int t;
10 };
11
12
13 vector int f(vector int t1, vector int t2)
14 {
15 struct vt st1, st2, st3;
16 st1.t = t1;
17 st2 = st1;
18 st2.t += t2;
19 st3 = st2;
20 return st3.t;
21 }
22
23 /* There should be no references to st as SRA should not have done block copy. */
24 /* { dg-final { scan-tree-dump-times "st" 0 "optimized" } } */
25 /* { dg-final { cleanup-tree-dump "optimized" } } */
26