comparison gcc/testsuite/gcc.dg/fold-popcount-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-original" } */
3
4 int test_eqzero(unsigned int a)
5 {
6 return __builtin_popcount(a) == 0;
7 }
8
9 int test_eqzerol(unsigned long b)
10 {
11 return __builtin_popcountl(b) == 0;
12 }
13
14 int test_eqzeroll(unsigned long long c)
15 {
16 return __builtin_popcountll(c) == 0;
17 }
18
19 int test_nezero(unsigned int d)
20 {
21 return __builtin_popcount(d) != 0;
22 }
23
24 int test_nezerol(unsigned long e)
25 {
26 return __builtin_popcountl(e) != 0;
27 }
28
29 int test_nezeroll(unsigned long long f)
30 {
31 return __builtin_popcountll(f) != 0;
32 }
33
34 /* { dg-final { scan-tree-dump-times "popcount" 0 "original" } } */
35