This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/65317] [SH] Shifts used instead of and with const_int


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]