https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95185
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- _1 = x_4(D) >= 0; _2 = y_5(D) <= 0; _3 = _1 == _2; Something like: Prefer ^ over == ``` (for cmp (for cmpN (for neeq (simplify (neeq:c (cmp @0 @1) @3 (if (cmpN == inverseof(cmp, TREE_TYPE (type)) (bit_xor (cmpN @0 @1) @3) ) ) ))) ``` This is what clang seems to do rather than any magic around == really. I do wonder if we should try to expand bool == bool as bool^bool^1 .