https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116787
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Oops, thanks for catching that. We can't kill the builtins (the 3dNOW! ones have to stay because they behave just weirdly, the masked/rounded ones too, the rest could be removed if your C vector comparison patch is added), but yes, the cases which are equivalent to x < y ? y : x or x > y ? y : x could be just GIMPLE folded like that then.