[Bug tree-optimization/126029] `!bool_var + 1`, `2 - bool_var`, `1<<!a` all should produce the same code
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jun 30 17:10:55 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126029
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=88676
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Kael Franco from comment #2)
> Also
> int
> g3 (_Bool a) {
> return (a ? 2 : 1);
> }
>
> LLVM bug: https://github.com/llvm/llvm-project/issues/206708
Though that has been done in GCC 9, see PR 88676.
More information about the Gcc-bugs
mailing list