This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65317] [SH] Shifts used instead of and with const_int
- 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, 17 Jun 2015 16:31:50 +0000
- Subject: [Bug target/65317] [SH] Shifts used instead of and with const_int
- Auto-submitted: auto-generated
- References: <bug-65317-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65317
--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #0)
> It seems that it's better to allow any constant for the *andsi_compact
> pattern and split out the constant load if it doesn't fit into K08. An and
> with constant 0x80000000 could be treated as a special case to emit the
> shorter sequence:
> shll r4
> movt r0
> rts
> rotr r0
On SH4A the following sequence is better, because imm8 constant loads are in
the MT group:
shll r4
mov #0,r0
rts
rotcr r0