]> gcc.gnu.org Git - gcc.git/commit
Utilize op1 == op2 when invoking range-ops folding.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 17 Jan 2023 16:14:41 +0000 (11:14 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 31 Jan 2023 14:56:27 +0000 (09:56 -0500)
commit809d661aff99ae0287baf4a52269425de62381e6
treed3242765ab5da0909362f483e452c6e763bf942c
parent99fda5de368d84d97eb29a9f03e0d6039068f8b9
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.
gcc/range-op.cc
gcc/range-op.h
gcc/testsuite/gcc.dg/pr108359.c [new file with mode: 0644]
This page took 0.065126 seconds and 6 git commands to generate.