[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap |
Date: |
Fri, 3 Apr 2009 14:34:11 -0600 |
> -----Original Message-----
> From: Georg-Johann Lay [mailto:address@hidden
> Sent: Monday, March 30, 2009 12:31 PM
> To: address@hidden
> Cc: Weddington, Eric; Anatoly Sokolov
> Subject: Re: [avr-gcc-list] [WinAVR 20090313] Bug in
> split-Pattern for swap
>
> Georg-Johann Lay schrieb:
> > Hi guys, in pass .166r.split1, avr-gcc makes a wrong
> transformation for
> > the following testcase, compiled with -O:
> >
> > void g(unsigned char);
> >
> > void f1(unsigned x)
> > {
> > unsigned char y;
> > y = (x >> 12) & 0x0F;
> > g(y);
> > }
> To be more specific, I attached the asm output for the even
> simpler test
> case
>
> char f1 (unsigned x)
> {
> return x >> 12;
> }
>
> compiled with -mmcu=atmega168 -O -fverbose-asm -dp -S.
>
> The bug is also triggered for right shifts by 14 and 13, and also for
> WinAVR-20080512.
>
> The bug is also present in a patched avr-gcc 4.3.3 distro at
> http://packages.debian.org/en/sid/gcc-avr. However, I cannot
> reproduce
> the bug with avr-gcc built from svn gcc_4_3_3_release and therefore I
> cannot say if the mentioned split patterns are the very
> problem or just
> reveal an other bug somewhere else.
It probably comes from the attached patch. This was a fix for GCC bug #11259:
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11259>
This was committed in 4.4.
Eric Weddington
41-gcc-4.3.2-bug-11259_v3.patch
Description: 41-gcc-4.3.2-bug-11259_v3.patch
- RE: [avr-gcc-list] [WinAVR 20090313] Bug in split-Pattern for swap,
Weddington, Eric <=