aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2012-07-30 06:43:20 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2012-07-30 06:43:20 +0000
commitbe82afe609f07d51a1d57fecbd1daf1882528f4c (patch)
treed938ac0cb46f49f74a958f70cafcfcbbc3032015
parentc0fd34971d2d719227d63ed8d069089862ec9c9f (diff)
downloadgcc-be82afe609f07d51a1d57fecbd1daf1882528f4c.zip
gcc-be82afe609f07d51a1d57fecbd1daf1882528f4c.tar.gz
gcc-be82afe609f07d51a1d57fecbd1daf1882528f4c.tar.bz2
re PR target/54089 ([SH] Refactor shift patterns)
PR target/54089 * config/sh/sh.md (ashlsi3_d): Invoke gen_shifty_op directly instead of trying to emit ashlsi3_n. From-SVN: r189952
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.md7
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ec3d4d0..c734d93 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index d8be111..b9be129 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -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;
}