https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94846

--- Comment #2 from Gabriel Ravier <gabravier at gmail dot com> ---
More notes : 
This seems to be generic to all targets, I've also been able to verify it on
ARM.

This only occurs when p is a pointer. This code :

unsigned f(unsigned p, unsigned x)
{
    unsigned u = p;
    p += x;
    if (u > p)
        ++p;

    return p;
}

results in 

f(unsigned int, unsigned int):
  add edi, esi
  mov eax, edi
  adc eax, 0
  ret

with both GCC and LLVM

Reply via email to