1 /* PR tree-optimization/83843 */
3 /* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-store-merging" } */
4 /* { dg-final { scan-tree-dump-times "Merging successful" 3 "store-merging" { target store_merge } } } */
6 __attribute__((noipa
)) void
7 foo (unsigned char *buf
, unsigned char *tab
)
9 tab
= __builtin_assume_aligned (tab
, 2);
10 buf
= __builtin_assume_aligned (buf
, 2);
11 unsigned v
= tab
[1] ^ (tab
[0] << 8);
16 __attribute__((noipa
)) void
17 bar (unsigned char *buf
, unsigned char *tab
)
19 tab
= __builtin_assume_aligned (tab
, 2);
20 buf
= __builtin_assume_aligned (buf
, 2);
21 unsigned v
= tab
[1] ^ (tab
[0] << 8);
26 __attribute__((noipa
)) void
27 baz (unsigned char *buf
, unsigned char *tab
)
29 tab
= __builtin_assume_aligned (tab
, 2);
30 buf
= __builtin_assume_aligned (buf
, 2);
31 unsigned v
= tab
[1] ^ (tab
[0] << 8);
39 volatile unsigned char l1
= 0;
40 volatile unsigned char l2
= 1;
41 unsigned char buf
[2] __attribute__((aligned (2)));
42 unsigned char tab
[2] __attribute__((aligned (2))) = { l1
+ 1, l2
* 2 };
44 if (buf
[0] != (unsigned char) ~1 || buf
[1] != (unsigned char) ~2)
49 if (buf
[0] != 1 || buf
[1] != (unsigned char) ~2)
54 if (buf
[0] != (unsigned char) ~1 || buf
[1] != 2)