* builtins.c (fold_builtin_bitop): New function to perform constant
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Aug 2003 13:22:14 +0000 (13:22 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Aug 2003 13:22:14 +0000 (13:22 +0000)
commit70fb4c079170fe4c00d0d6b7747c9a2ce822f9d1
treec8a37390f8dba8c2397917760e73ce8179a365a1
parent2b68965dfbb4401f1fbe255590f286caecf6e5c3
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70806 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/simplify-rtx.c