http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55147



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2012-10-31

                 CC|                            |jakub at gcc dot gnu.org,

                   |                            |uros at gcc dot gnu.org

     Ever Confirmed|0                           |1



--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-31 
15:37:49 UTC ---

--- gcc/config/i386/i386.md.jj    2012-10-30 09:01:15.000000000 +0100

+++ gcc/config/i386/i386.md    2012-10-31 16:25:13.986916767 +0100

@@ -12688,7 +12688,14 @@ (define_insn_and_split "*bswapdi2_double

    (set (match_dup 0)

       (bswap:SI (match_dup 3)))]

 {

-  split_double_mode (DImode, &operands[0], 2, &operands[0], &operands[2]);

+  split_double_mode (DImode, &operands[0], 1, &operands[0], &operands[2]);

+  if (MEM_P (operands[1])

+      && reg_overlap_mentioned_p (operands[2], operands[1]))

+    {

+      emit_insn (gen_rtx_SET (VOIDmode, operands[0], XEXP (operands[1], 0)));

+      operands[1] = change_address (operands[1], VOIDmode, operands[0]);

+    }

+  split_double_mode (DImode, &operands[1], 1, &operands[1], &operands[3]);



   if (REG_P (operands[0]) && REG_P (operands[1]))

     {



can fix the reg overlap problem between address of operands[1] and high part of

operands[0].  That said, I wonder what is the advantage of having bswapdi2

patter on i?86 at all that the generic expand_doubleword_bswap can't handle.

Reply via email to