https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108359
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>: https://gcc.gnu.org/g:809d661aff99ae0287baf4a52269425de62381e6 commit r13-5578-g809d661aff99ae0287baf4a52269425de62381e6 Author: Andrew MacLeod <amacl...@redhat.com> Date: Tue Jan 17 11:14:41 2023 -0500 Utilize op1 == op2 when invoking range-ops folding. If there exists an equivalence relationship between op1 and op2, any binary operation can be broken into individual operations and unioned if there are sufficently few elements in the set. PR tree-optimization/108359 gcc/ * range-op.cc (range_operator::wi_fold_in_parts_equiv): New. (range_operator::fold_range): If op1 is equivalent to op2 then invoke new fold_in_parts_equiv to operate on sub-components. * range-op.h (wi_fold_in_parts_equiv): New prototype. gcc/testsuite/ * gcc.dg/pr108359.c: New.