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

--- Comment #4 from Kang-Che Sung <Explorer09 at gmail dot com> ---
Not sure if it's worth providing this info, but I found out x86-64 GCC 15.1 can
optimize this into a right shift and compare with zero in '-O2' and '-Os' mode:

```
bool func4(uint64_t x) {
    return x <= 0xffffffff;
}
```

Specifically the number constant has to be (2^N - 1) where N >= 32.

Reply via email to