]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/54089 ([SH] Refactor shift patterns)
authorOleg Endo <olegendo@gcc.gnu.org>
Mon, 30 Jul 2012 06:43:20 +0000 (06:43 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Mon, 30 Jul 2012 06:43:20 +0000 (06:43 +0000)
PR target/54089
* config/sh/sh.md (ashlsi3_d): Invoke gen_shifty_op directly instead
of trying to emit ashlsi3_n.

From-SVN: r189952

gcc/ChangeLog
gcc/config/sh/sh.md

index ec3d4d0a653fc35f9cbbdc8989fef048d5fe40e1..c734d9341f5cd7db115c2a53a38f6c7938dc3f18 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-30  Oleg Endo  <olegendo@gcc.gnu.org>
+
+       PR target/54089
+       * config/sh/sh.md (ashlsi3_d): Invoke gen_shifty_op directly instead
+       of trying to emit ashlsi3_n.
+
 2012-07-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
            Steven Bosscher  <steven@gcc.gnu.org>
 
index d8be11164d38df3aab405cbf2c1dd079d08790c4..b9be1290d607a341431019d94845eba39c9a8a6f 100644 (file)
@@ -3533,7 +3533,12 @@ label:
     }
   else if (!satisfies_constraint_P27 (operands[2]))
     {
-      emit_insn (gen_ashlsi3_n (operands[0], operands[1], operands[2]));
+      /* This must happen before reload, otherwise the constant will be moved
+        into a register due to the "r" constraint, after which this split
+        cannot be done anymore.
+        Unfortunately the move insn will not always be eliminated.  */
+      emit_move_insn (operands[0], operands[1]);
+      gen_shifty_op (ASHIFT, operands);
       DONE;
     }