fold-const.c (tree_nonzero_bits): New function.
* fold-const.c (tree_nonzero_bits): New function. * fold-const.h (tree_nonzero_bits): Likewise. * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc. * gcc.dg/fold-popcount-1.c: New testcase. * gcc.dg/fold-popcount-2.c: New testcase. * gcc.dg/fold-popcount-3.c: New testcase. * gcc.dg/fold-popcount-4.c: New testcase. From-SVN: r260689
Showing
gcc/testsuite/gcc.dg/fold-popcount-1.c
0 → 100644
gcc/testsuite/gcc.dg/fold-popcount-2.c
0 → 100644
gcc/testsuite/gcc.dg/fold-popcount-3.c
0 → 100644
gcc/testsuite/gcc.dg/fold-popcount-4.c
0 → 100644
Please
register
or
sign in
to comment