From: Oleg Endo Date: Mon, 30 Jul 2012 06:43:20 +0000 (+0000) Subject: re PR target/54089 ([SH] Refactor shift patterns) X-Git-Tag: releases/gcc-4.8.0~4225 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be82afe609f07d51a1d57fecbd1daf1882528f4c;p=thirdparty%2Fgcc.git 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 --- 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; }