[SH] PR 54089 - Add support for rotcl instruction
Oleg Endo
oleg.endo@t-online.de
Mon Nov 5 09:05:00 GMT 2012
Hello,
This patch adds support for SH's rotcl instruction.
While working on it, I've noticed that the DImode left shift by one insn
was not used anymore, and instead ended up as 'x + x'. This
transformation was happening before/during RTL expansion. The fix for
it was to adjust the costs for DImode plus/minus.
Tested on rev 193135 with
make -k check RUNTESTFLAGS="--target_board=sh-sim
\{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"
and no new failures.
OK?
Cheers,
Oleg
gcc/ChangeLog:
PR target/54089
* config/sh/sh.c (and_xor_ior_costs, addsubcosts): Double the
costs for ops larger than SImode.
* config/sh/sh.md (rotcl, *rotcl): New insns and splits.
(ashldi3_k): Convert to insn_and_split and use new rotcl insn.
testsuite/ChangeLog:
PR target/54089
* gcc.target/sh/pr54089-8.c: New.
* gcc.target/sh/pr54089-9.c: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_pr54089_11.patch
Type: text/x-patch
Size: 16895 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121105/3be1dcbf/attachment.bin>
More information about the Gcc-patches
mailing list