This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39633] [avr] loop bug: missing 8-bit comparison (*cmpqi)
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Jul 2011 08:31:36 +0000
- Subject: [Bug target/39633] [avr] loop bug: missing 8-bit comparison (*cmpqi)
- Auto-submitted: auto-generated
- References: <bug-39633-4@http.gcc.gnu.org/bugzilla/>
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]