1 /* PR tree-optimization/82929 */
2 /* { dg-do compile { target store_merge } } */
3 /* { dg-options "-O2 -fdump-tree-store-merging" } */
4 
5 void
foo(short * p,short * q,short * r)6 foo (short *p, short *q, short *r)
7 {
8   p = __builtin_assume_aligned (p, __alignof__ (int));
9   q = __builtin_assume_aligned (q, __alignof__ (int));
10   r = __builtin_assume_aligned (r, __alignof__ (int));
11   short a = q[0];
12   short b = q[1];
13   short c = ~a;
14   short d = r[0];
15   short e = r[1];
16   short f = ~b;
17   p[0] = c & d;
18   p[1] = e & f;
19 }
20 
21 /* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */
22