https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #26 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Hongtao.liu from comment #25) > > gcc always tries to simplify (convert (cond (cmp a b) c d) ---- > (cond (cmp > a b) (convert c) (convert d)), exactly the opposite of what this case wants. Right that is for generic. For the gimple level the function factor_out_conditional_conversion in phiopt is supposed to undo this but as I mentioned it does not always.