simplify-rtx.c (simplify_unary_operation_1): We can strip zero_extend, bswap and...
authorRoger Sayle <roger@eyesopen.com>
Thu, 8 Feb 2007 17:10:56 +0000 (17:10 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 8 Feb 2007 17:10:56 +0000 (17:10 +0000)
commit9f05adb09fd35252136f4d28182e5d60cc03fb36
tree048a2641bea241f51fef4600e4852357f5c9e51e
parentd37d06fef83c5f8355fa327d5fa0ff25cd31bb77
simplify-rtx.c (simplify_unary_operation_1): We can strip zero_extend, bswap and rotates from POCOUNT's argument.

* simplify-rtx.c (simplify_unary_operation_1) <POPCOUNT>: We can
strip zero_extend, bswap and rotates from POCOUNT's argument.
<PARITY>: Likewise, we can strip not, bswap, sign_extend,
zero_extend and rotates from PARITY's argument.
<BSWAP>: A byte-swap followed by a byte-swap is an identity.
(simplify_const_unary_operation) <BSWAP>: Evaluate the byte-swap
of an integer constant at compile-time.

* gcc.target/i386/builtin-bswap-2.c: New test case.

From-SVN: r121716
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/builtin-bswap-2.c [new file with mode: 0644]