https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107888
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 55027 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55027&action=edit testcases max is optimized with this, max1 was already handled. min was already handled, min1 is optimized with this. Note at -O1, all 4 are done at phiopt1, At -O2, only max1/min are done at phiopt1 and max/min1 are handled at phiopt2 due to now having the range. Note I think having phiopt enable ranges overall might be too much overhead I so we might need to leave it this way.