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

[Bug target/61055] [avr] wrong test instruction after increment with -O1


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;
}


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