[SH] Improve extu.b, extu.w utilization for andsi3
Oleg Endo
oleg.endo@t-online.de
Tue Jul 3 07:27:00 GMT 2012
Hello,
On SH a logical and with constants 0xFFFF or 0xFF can be done with the
respective zero-extension operations. The attached patch improves the
utilization of the zero-extension operations a little bit, resulting in
slightly better code.
Tested against rev 189081 with
make -k check RUNTESTFLAGS="--target_board=sh-sim
\{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,
-m4-single/-ml,-m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"
and no new failures.
Cheers,
Oleg
ChangeLog:
* config/sh/predicates.md (logical_and_operand): New predicate.
* config/sh/constraints.md (Jmb, Jmw): New constraints.
* config/sh/sh.md (andsi3): Move expander above insns. Add
handling of 0xFFFF constant. Use logical_and_operand predicate
and satisfies_constraint_Jmb, satisfies_constraint_Jmw.
(*andsi3_compact): Make it an insn_and_split. Use
logical_and_operand predicate. Add Jmb,Jmw alternatives.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: andsi_zero_extend.patch
Type: text/x-patch
Size: 4502 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120703/daf31511/attachment.bin>
More information about the Gcc-patches
mailing list