This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54089] [SH] Refactor shift patterns
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Aug 2012 22:52:25 +0000
- Subject: [Bug target/54089] [SH] Refactor shift patterns
- Auto-submitted: auto-generated
- References: <bug-54089-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54089
--- Comment #15 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-08-22 22:52:25 UTC ---
Author: olegendo
Date: Wed Aug 22 22:52:17 2012
New Revision: 190603
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190603
Log:
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.
Added:
trunk/gcc/testsuite/gcc.target/sh/pr54089-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/predicates.md
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sh/sh.md
trunk/gcc/testsuite/ChangeLog