This is the mail archive of the gcc-patches@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]

Re: [Patch,AVR]: Fix PR29560 (map 16-bit shift to 8-bit)


On 07/26/2011 02:48 AM, Georg-Johann Lay wrote:
> Moreover, the original peep2 is not fully correct because it
> maps a 16-bit shift to a 8-bit one.  The correct mapping is
> 
> (set (match_dup 2)
>      (subreg:QI (ashift:HI (zero_extend:HI (match_dup 2))
>                            (match_dup 1))
>                 0))
> 
> instead of
> 
> (set (match_dup 2)
>      (ashift:QI (match_dup 2)
>                 (match_dup 1)))
> 
> 
> I don't think it makes a difference that late in the
> compilation process, yet I prefer correct semantics.

Why do you think the semantics were wrong?  As long as you
don't define SHIFT_COUNT_TRUNCATES, these are equivalent.


r~


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