https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112971
--- Comment #4 from JuzheZhong <juzhe.zhong at rivai dot ai> --- Maybe try to remove this ? /* (X & Y) == X becomes (X & ~Y) == 0. */ (simplify (cmp:c (bit_and:c @0 @1) @0) (cmp (bit_and @0 (bit_not! @1)) { build_zero_cst (TREE_TYPE (@0)); })) (simplify (cmp:c (convert@3 (bit_and (convert@2 @0) INTEGER_CST@1)) (convert @0)) (if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) && INTEGRAL_TYPE_P (TREE_TYPE (@2)) && INTEGRAL_TYPE_P (TREE_TYPE (@3)) && TYPE_PRECISION (TREE_TYPE (@2)) == TYPE_PRECISION (TREE_TYPE (@0)) && TYPE_PRECISION (TREE_TYPE (@3)) > TYPE_PRECISION (TREE_TYPE (@2)) && !wi::neg_p (wi::to_wide (@1))) (cmp (bit_and @0 (convert (bit_not @1))) { build_zero_cst (TREE_TYPE (@0)); })))