https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68894
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine, working on improving phi-opt here; though the hoisting of the load is
something which needs to be looked into further.
I have the match.pd pattern for what is mentioned in comment #3:
/* These was part of minmax phiopt. */
/* Optimize (a CMP b) ? minmax<a, c> : minmax<b, c>
to minmax<min/max<a, b>, c> */
(for minmax (min max)
(for cmp (lt le gt ge)
(simplify
(cond (cmp @1 @3) (minmax:c @1 @4) (minmax:c @2 @4))
(with
{
tree_code code = minmax_from_comparison (cmp, @1, @2, @1, @3);
}
(if (code == MIN_EXPR)
(minmax (min @1 @2) @4)
(if (code == MAX_EXPR)
(minmax (max @1 @2) @4)))))))
I also have the improvements to match_simplify_replacement which are needed to
use those patterns too. I will be submitting them for GCC 14.