https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110539
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is a testcase for the missing optimization (at -O1) which is optimized at the RTL level (for some targets but not all): ``` int f(int a) { int b = a & 1; int c = b != 0; return c == b; } ``` Though it does optimize at -O2 because VRP changes: `b != 0` into `(_Bool) b_4`.