https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106164
--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> --- On Sat, 29 Jul 2023, pinskia at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106164 > > --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > I think I have a better patch. > > There are patterns for: > Convert (X OP1 CST1) || (X OP2 CST2). > > externding them easily to support: > Convert (X OP1 Y) || (X OP2 Y). > is a few lines. > Don't even need to call combine_comparisons either. > > Once I test it I will submit the patch. Note moving the non-BIT_FIELD_REF parts of fold_truth_andor_1 to match.pd was still on the list of things to do.