From: Richard Biener Date: Thu, 13 Nov 2014 08:45:29 +0000 (+0000) Subject: re PR tree-optimization/61559 (FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83633539b751a8ef90378ccd26b73df03c3fe40f;p=gcc.git re PR tree-optimization/61559 (FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe) 2014-12-13 Richard Biener PR middle-end/61559 * match.pd: Implement bswap patterns for transforms checked by gcc.dg/builtin-bswap-8.c. From-SVN: r217464 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90b9639bf92..d32aa4f32bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-13 Richard Biener + + PR middle-end/61559 + * match.pd: Implement bswap patterns for transforms checked by + gcc.dg/builtin-bswap-8.c. + 2014-11-13 Vladimir Makarov * lra.c (lra): Switch off rematerialization pass. diff --git a/gcc/match.pd b/gcc/match.pd index d94a8f51418..1d7b153af81 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -576,3 +576,17 @@ along with GCC; see the file COPYING3. If not see (simplify (imagpart (complex @0 @1)) @1) + + +/* BSWAP simplifications, transforms checked by gcc.dg/builtin-bswap-8.c. */ +(for bswap (BUILT_IN_BSWAP16 BUILT_IN_BSWAP32 BUILT_IN_BSWAP64) + (simplify + (bswap (bswap @0)) + @0) + (simplify + (bswap (bit_not (bswap @0))) + (bit_not @0)) + (for bitop (bit_xor bit_ior bit_and) + (simplify + (bswap (bitop:c (bswap @0) @1)) + (bitop @0 (bswap @1)))))