]> git.ipfire.org Git - thirdparty/gcc.git/commit
builtins.c (fold_builtin_bitop): New function to perform constant folding of ffs...
authorRoger Sayle <roger@eyesopen.com>
Tue, 26 Aug 2003 13:22:14 +0000 (13:22 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 26 Aug 2003 13:22:14 +0000 (13:22 +0000)
commitcf42869d28e645cd7bffb3a3a948807dffb93d6b
treec8a37390f8dba8c2397917760e73ce8179a365a1
parenta103ca2cde431b09326d1378eaaefd45de7bc3af
builtins.c (fold_builtin_bitop): New function to perform constant folding of ffs...

* builtins.c (fold_builtin_bitop): New function to perform constant
folding of ffs, clz, ctz, popcount and parity builtin functions
and their long and long long variants (such as ffsl and ffsll).
(fold_builtin): fold_builtin_bitop when appropriate.
* simplify-rtx.c (simplify_unary_operation): Honor both
CLZ_DEFINED_VALUE_AT_ZERO and CTZ_DEFINED_VALUE_AT_ZERO when
evaluating clz and ctz at compile-time, for operands wider
than HOST_WIDE_INT.

From-SVN: r70806
gcc/ChangeLog
gcc/builtins.c
gcc/simplify-rtx.c