https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122845
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > So maybe: > (simplify > (convert (bit_op:cs @0 (bit_and @1 INTEGER_CST@2))) > (if (TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (@0)) > && wi::to_wide (@2) == type_mask_inprecisionoftype (type, TREE_TYPE > (@0)))) > (bit_op @0 (convert @1)) Or maybe that is not needed because the first pattern fixes it up before we end up with &7.
