[Bug target/39633] [avr] loop bug: missing 8-bit comparison (*cmpqi)
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 10 08:31:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39633
--- Comment #10 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-10 08:29:04 UTC ---
Created attachment 24729
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24729
Minimal test case
Here is a minimal testcase:
char c;
void func_1 (char a)
{
a = a >> 7;
if (a)
c = a;
}
Code with 4.6.1 -Os -dp -S -mmcu=atmega88:
func_1:
lsl r24 ; 6 ashrqi3/5 [length = 2]
sbc r24,r24
breq .L1 ; 8 branch [length = 1]
sts c,r24 ; 10 *movqi/3 [length = 2]
.L1:
ret ; 20 return [length = 1]
More information about the Gcc-bugs
mailing list