1 /* PR tree-optimization/88709 */
2 /* { dg-do run { target int32 } } */
3 /* { dg-require-effective-target store_merge } */
4 /* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-store-merging-details" } */
5 /* { dg-final { scan-tree-dump "New sequence of 3 stores to replace old one of 6 stores" "store-merging" { target { le && { ! arm*-*-* } } } } } */
6 /* { dg-final { scan-tree-dump "New sequence of \[34] stores to replace old one of 6 stores" "store-merging" { target { be && { ! arm*-*-* } } } } } */
8 struct T
{ char a
[1024]; };
10 __attribute__((noipa
)) void
14 if (__builtin_memcmp (&t
->a
[97], &x
, sizeof (x
)))
16 __builtin_memset (&t
->a
[97], '\0', sizeof (x
));
17 for (int i
= 0; i
< 8; ++i
)
18 if (t
->a
[i
] != ((i
== 54) + 2 * (i
== 52) + 3 * (i
== 95) + 4 * (i
== 96)))
31 __builtin_memcpy (&t
.a
[97], &x
, sizeof (x
));