http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53395
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-21 09:39:51 UTC --- Note that if-conversion does not fold to not destroy valid gimple RHS and to avoid canonicalizing the condition. Producing a MAX_EXPR is certainly fine of course ... (I'm to blame for not adding testcases for some of the if-conversion improvements I've done in the last months ...) But I suppose with the simple patch you at least need to gimplify the result.