1 /* { dg-do compile } */
2 /* { dg-require-effective-target store_merge } */
3 /* { dg-options "-O2 -fdump-tree-store-merging" } */
5 struct S
{ unsigned int i
: 8, a
: 7, b
: 7, j
: 10, c
: 15, d
: 7, e
: 10, f
: 7, g
: 9, k
: 16; unsigned long long h
; };
7 __attribute__((noipa
)) void
19 __attribute__((noipa
)) void
20 f2 (struct S
*__restrict p
, struct S
*__restrict q
)
31 __attribute__((noipa
)) void
32 f3 (struct S
*p
, struct S
*q
)
34 unsigned char pa
= q
->a
;
35 unsigned char pb
= q
->b
;
36 unsigned short pc
= q
->c
;
37 unsigned char pd
= q
->d
;
38 unsigned short pe
= q
->e
;
39 unsigned char pf
= q
->f
;
40 unsigned short pg
= q
->g
;
50 __attribute__((noipa
)) void
51 f4 (struct S
*p
, struct S
*q
)
53 unsigned char pa
= p
->a
| q
->a
;
54 unsigned char pb
= p
->b
| q
->b
;
55 unsigned short pc
= p
->c
| q
->c
;
56 unsigned char pd
= p
->d
| q
->d
;
57 unsigned short pe
= p
->e
| q
->e
;
58 unsigned char pf
= p
->f
| q
->f
;
59 unsigned short pg
= p
->g
| q
->g
;
69 __attribute__((noipa
)) void
70 f5 (struct S
*p
, struct S
*q
)
72 unsigned char pa
= p
->a
& q
->a
;
73 unsigned char pb
= p
->b
& q
->b
;
74 unsigned short pc
= p
->c
& q
->c
;
75 unsigned char pd
= p
->d
& q
->d
;
76 unsigned short pe
= p
->e
& q
->e
;
77 unsigned char pf
= p
->f
& q
->f
;
78 unsigned short pg
= p
->g
& q
->g
;
88 __attribute__((noipa
)) void
89 f6 (struct S
*p
, struct S
*q
)
91 unsigned char pa
= p
->a
^ q
->a
;
92 unsigned char pb
= p
->b
^ q
->b
;
93 unsigned short pc
= p
->c
^ q
->c
;
94 unsigned char pd
= p
->d
^ q
->d
;
95 unsigned short pe
= p
->e
^ q
->e
;
96 unsigned char pf
= p
->f
^ q
->f
;
97 unsigned short pg
= p
->g
^ q
->g
;
107 __attribute__((noipa
)) void
108 f7 (struct S
*__restrict p
, struct S
*__restrict q
)
119 __attribute__((noipa
)) void
120 f8 (struct S
*__restrict p
, struct S
*__restrict q
)
131 __attribute__((noipa
)) void
132 f9 (struct S
*__restrict p
, struct S
*__restrict q
)
143 struct S s
= { 72, 20, 21, 73, 22, 23, 24, 25, 26, 74, 27 };
144 struct S t
= { 75, 0x71, 0x72, 76, 0x7f04, 0x78, 0x31, 0x32, 0x34, 77, 0xf1f2f3f4f5f6f7f8ULL
};
145 struct S u
= { 78, 28, 29, 79, 30, 31, 32, 33, 34, 80, 35 };
146 struct S v
= { 81, 36, 37, 82, 38, 39, 40, 41, 42, 83, 43 };
151 asm volatile ("" : : : "memory");
153 asm volatile ("" : : : "memory");
154 if (s
.i
!= 72 || s
.a
!= 1 || s
.b
!= 2 || s
.j
!= 73 || s
.c
!= 3 || s
.d
!= 4
155 || s
.e
!= 5 || s
.f
!= 6 || s
.g
!= 7 || s
.k
!= 74 || s
.h
!= 27)
158 asm volatile ("" : : : "memory");
159 if (s
.i
!= 72 || s
.a
!= 28 || s
.b
!= 29 || s
.j
!= 73 || s
.c
!= 30 || s
.d
!= 31
160 || s
.e
!= 32 || s
.f
!= 33 || s
.g
!= 34 || s
.k
!= 74 || s
.h
!= 27)
163 asm volatile ("" : : : "memory");
164 if (s
.i
!= 72 || s
.a
!= 36 || s
.b
!= 37 || s
.j
!= 73 || s
.c
!= 38 || s
.d
!= 39
165 || s
.e
!= 40 || s
.f
!= 41 || s
.g
!= 42 || s
.k
!= 74 || s
.h
!= 27)
168 asm volatile ("" : : : "memory");
169 if (s
.i
!= 72 || s
.a
!= (36 | 0x71) || s
.b
!= (37 | 0x72) || s
.j
!= 73
170 || s
.c
!= (38 | 0x7f04) || s
.d
!= (39 | 0x78)
171 || s
.e
!= (40 | 0x31) || s
.f
!= (41 | 0x32)
172 || s
.g
!= (42 | 0x34) || s
.k
!= 74 || s
.h
!= 27)
176 asm volatile ("" : : : "memory");
177 if (s
.i
!= 72 || s
.a
!= (28 & 0x71) || s
.b
!= (29 & 0x72) || s
.j
!= 73
178 || s
.c
!= (30 & 0x7f04) || s
.d
!= (31 & 0x78)
179 || s
.e
!= (32 & 0x31) || s
.f
!= (33 & 0x32)
180 || s
.g
!= (34 & 0x34) || s
.k
!= 74 || s
.h
!= 27)
184 asm volatile ("" : : : "memory");
185 if (s
.i
!= 72 || s
.a
!= (36 ^ 0x71) || s
.b
!= (37 ^ 0x72) || s
.j
!= 73
186 || s
.c
!= (38 ^ 0x7f04) || s
.d
!= (39 ^ 0x78)
187 || s
.e
!= (40 ^ 0x31) || s
.f
!= (41 ^ 0x32)
188 || s
.g
!= (42 ^ 0x34) || s
.k
!= 74 || s
.h
!= 27)
192 asm volatile ("" : : : "memory");
193 if (s
.i
!= 72 || s
.a
!= (36 | 0x71) || s
.b
!= (37 | 0x72) || s
.j
!= 73
194 || s
.c
!= (38 | 0x7f04) || s
.d
!= (39 | 0x78)
195 || s
.e
!= (40 | 0x31) || s
.f
!= (41 | 0x32)
196 || s
.g
!= (42 | 0x34) || s
.k
!= 74 || s
.h
!= 27)
200 asm volatile ("" : : : "memory");
201 if (s
.i
!= 72 || s
.a
!= (28 & 0x71) || s
.b
!= (29 & 0x72) || s
.j
!= 73
202 || s
.c
!= (30 & 0x7f04) || s
.d
!= (31 & 0x78)
203 || s
.e
!= (32 & 0x31) || s
.f
!= (33 & 0x32)
204 || s
.g
!= (34 & 0x34) || s
.k
!= 74 || s
.h
!= 27)
208 asm volatile ("" : : : "memory");
209 if (s
.i
!= 72 || s
.a
!= (36 ^ 0x71) || s
.b
!= (37 ^ 0x72) || s
.j
!= 73
210 || s
.c
!= (38 ^ 0x7f04) || s
.d
!= (39 ^ 0x78)
211 || s
.e
!= (40 ^ 0x31) || s
.f
!= (41 ^ 0x32)
212 || s
.g
!= (42 ^ 0x34) || s
.k
!= 74 || s
.h
!= 27)
217 /* { dg-final { scan-tree-dump-times "Merging successful" 9 "store-merging" } } */