From be82afe609f07d51a1d57fecbd1daf1882528f4c Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Mon, 30 Jul 2012 06:43:20 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/sh/sh.md | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ec3d4d0a653f..c734d9341f5c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-07-30 Oleg Endo + + 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 Steven Bosscher diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index d8be11164d38..b9be1290d607 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; } -- 2.39.5