1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-fre1-details" } */
3 /* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */
4 
5 typedef double d128 __attribute__((vector_size(16)));
6 typedef float f128 __attribute__((vector_size(16)));
7 typedef short s128 __attribute__((vector_size(16)));
8 typedef char c256 __attribute__((vector_size(32)));
9 
10 d128 d;
11 f128 f;
12 s128 s;
13 c256 c;
14 
test1(double x)15 void test1 (double x)
16 {
17   d = (d128){x + x, x + x};
18   d = (d128){x + x, x + x};
19 }
20 
test2(float x)21 void test2 (float x)
22 {
23   f = (f128){x + x, x + x, x + x, x + x};
24   f = (f128){x + x, x + x, x + x, x + x};
25 }
26 
test3(short x)27 void test3 (short x)
28 {
29   s = (s128){x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x};
30   s = (s128){x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x};
31 }
32 
test4(unsigned char x)33 void test4 (unsigned char x)
34 {
35   c = (c256){x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x,
36       x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x,
37       x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x,
38       x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x};
39   c = (c256){x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x,
40       x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x,
41       x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x,
42       x + x, x + x, x + x, x + x, x + x, x + x, x + x, x + x};
43 }
44 
45 /* { dg-final { scan-tree-dump-times "Replaced \{" 4 "fre1" } } */
46 /* { dg-final { scan-tree-dump-times "Deleted redundant store" 4 "fre1" } } */
47