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

--- Comment #1 from Kael Franco <kaelfandrew at gmail dot com> ---
https://godbolt.org/z/njGdPsTYE

More general case:
```
#define TYPE unsigned
#define N 4
#define CST ((TYPE)1 << N)
#define ADD_CST (TYPE)(32 + 16)

TYPE
src (TYPE x)
{
  if (x >= CST
      || !(__builtin_ctzg (ADD_CST) >=
           __builtin_ctzg (CST)))
    __builtin_unreachable ();
  return x | ADD_CST;
}
```

GCC should produce:
```
"src":
        lea     eax, [rdi+48]
        ret
```

Reply via email to