1 /* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */
3 /* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
5 extern void abort (void);
7 int a[5] = { 0, 1, 0, 0, 0 };
8 int b[5] = { 0, 1, 0, 1, 0 };
9 int c[5] = { 0, 0, 1, 1, 0 };
10 int dst[5] = { 0, 0, 0, 0, 0 };
12 __attribute__ ((noinline))
14 foo (int size, int *ap, int *bp, int *cp, int *dstp)
16 unsigned int i, n = size;
19 for (i = 0; i < n; i++)
21 const int tmp = *ap++ | (*bp++ & *cp++);
22 changed |= *dstp ^ tmp;
33 foo (5, a, b, c, dst);
37 /* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* powerpc*-*-* } } } */
38 /* { dg-final { cleanup-rtl-dump "sms" } } */