This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/61055] [avr] wrong test instruction after increment with -O1
- 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: Mon, 05 May 2014 18:18:30 +0000
- Subject: [Bug target/61055] [avr] wrong test instruction after increment with -O1
- Auto-submitted: auto-generated
- References: <bug-61055-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61055
--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
I see similar code with -fno-peephole2
What about the following that is also turned into a signed test and generates
an ADIW / BRGE sequence. This is also wrong then when we start with 0x7ffe?
uint16_t fun_adiw (uint16_t c)
{
c += 2;
if (c >= 0x8000)
c = 0x20;
return c;
}