The PR is about missed simplifications for __builtin_swap. IIUC Andrew has
patches for them at the Tree level, but I think having basic simplifications
at the RTL level for BSWAP is also worthwhile, hence the attached patch.
Tested on x86_64-suse-linux. Comments?
2013-05-23 Eric Botcazou <ebotcazou@adacore.com>
PR opt/55177
* simplify-rtx.c (simplify_unary_operation_1) <NOT>: Deal with BSWAP.
(simplify_byte_swapping_operation): New.
(simplify_binary_operation_1): Call it for AND, IOR and XOR.
(simplify_relational_operation_1): Deal with BSWAP.
2013-05-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/builtin-bswap-6.c: New test.
* gcc.dg/builtin-bswap-7.c: Likewise.
* gcc.dg/builtin-bswap-8.c: Likewise.
* gcc.dg/builtin-bswap-9.c: Likewise.