arm: fix typo in dg-require-effective-target [PR118089]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / popcount2.c
blobae38a329bd4d868a762300d3218d68864c0fc4be
1 /* { dg-do run } */
2 /* { dg-require-effective-target popcountl } */
3 /* { dg-options "-O2 -fno-tree-ch -fdump-tree-optimized" } */
5 int
6 __attribute__ ((noinline, noclone))
7 foo (long b)
9 int c = 0;
11 while (b) {
12 b &= b - 1;
13 c++;
15 return c;
18 int main()
20 if (foo (7) != 3)
21 __builtin_abort ();
22 if (foo (0) != 0)
23 __builtin_abort ();
24 if (foo (0xff) != 8)
25 __builtin_abort ();
26 return 0;
29 /* { dg-final { scan-tree-dump-times "__builtin_popcount|\\.POPCOUNT" 1 "optimized" } } */