[Bug middle-end/124453] suboptimal read of 64-bit bitfields
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 12 08:24:56 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124453
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> #ifdef dd
> auto t = val.b;
> if(t == 0)
> #else
> if (val.b == 0)
> #endif
>
> The problem is too early `optimizing` of val.b == 0.
To
if ((BIT_FIELD_REF <val, 8, 0> & 30) == 0)
by famous premature fold-const.cc code.
More information about the Gcc-bugs
mailing list