https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103660

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-12-12
                 CC|                            |pinskia at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
           Severity|normal                      |enhancement
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For min3/min4:
  _3 = a_7(D) < b_8(D) ? a_7(D) : 0;
  _6 = a_7(D) >= b_8(D) ? b_8(D) : 0;
  _9 = _3 | _6;


A pattern like:
(for op (add bit_ior)
 (simplify
  (op:c
   (cond (lt @0 @1) @0 integer_zero_p@2)
   (cond (ge @0 @1) @0 @2))
  (min @0 @1)))

And make one for the others too.

min5/6 is more complex:
min5:
  _1 = a_5(D) < b_6(D);
  c_7 = (const int) _1;
  _2 = a_5(D) * c_7;
  _3 = 1 - c_7;
  _4 = _3 * b_6(D);
  _8 = _2 + _4;

min6:
  _5 = a_1(D) < b_2(D);
  _6 = (int) _5;
  _7 = a_1(D) * _6;
  _8 = a_1(D) >= b_2(D);
  _9 = (int) _8;
  _10 = b_2(D) * _9;
  _11 = _7 + _10;

I think I have a patch which helps these, I have to finish it up and then it
goes back to min3/min4 issue.

Reply via email to