re PR target/54089 ([SH] Refactor shift patterns)
authorOleg Endo <olegendo@gcc.gnu.org>
Wed, 22 Aug 2012 22:52:17 +0000 (22:52 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Wed, 22 Aug 2012 22:52:17 +0000 (22:52 +0000)
commit6e01d5265181a73cb7b8f678ea5d1baff1f91bdc
tree036a6368ca64516b6be1aed09908a8c533e43618
parent131db6b8b25c6cb2349045f8c8196be6e376f454
re PR target/54089 ([SH] Refactor shift patterns)

PR target/54089
* config/sh/predicates (p27_rshift_count_operand,
not_p27_rshift_count_operand): New predicates.
* config/sh/sh.c (sh_ashlsi_clobbers_t_reg_p,
sh_lshrsi_clobbers_t_reg_p, sh_dynamicalize_shift_p): Handle special
case when shift amount is 31.
(gen_ashift): Emit gen_shlr instead of gen_lshrsi3_m.
* config/sh/sh.md (ashlsi3_d): Set type to 'dyn_shift' instead
of 'arith'.
(ashlsi_c): Rename to shll.  Adapt calls to gen_ashlsi_c throughout
the file.
(lshrsi3): Remove clobber from expander.  Use shift_count_operand
instead of nonmemory_operand predicate for second operand.  Add
handling of case lshrsi3_n_clobbers_t.
(lshrsi3_k): Use p27_rshift_count_operand for second operand.
(lshrsi3_d): Make insn_and_split.  Split dynamic shift to constant
shift sequences if beneficial.
(lshrsi3_n): Make insn_and_split.  Split constant shift sequence to
dynamic shift if beneficial.
(lshrsi3_n_clobbers_t): New insn_and_split.
(lshrsi3_m): Delete.

PR target/54089
* gcc.target/sh/pr54089-2.c: New.

From-SVN: r190603
gcc/ChangeLog
gcc/config/sh/predicates.md
gcc/config/sh/sh.c
gcc/config/sh/sh.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sh/pr54089-2.c [new file with mode: 0644]