https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67962
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2015-10-14 Component|c++ |tree-optimization Summary|Optimization opportunity |Optimization opportunity |with conditional swap |with conditional swap to | |two MIN/MAX in phiopt Ever confirmed|0 |1 Severity|minor |enhancement --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- We miss the opportunity to turn <bb 2>: if (y_5(D) < x_6(D)) goto <bb 4>; else goto <bb 3>; <bb 3>: <bb 4>: # y_4 = PHI <y_5(D)(3), x_6(D)(2)> # x_2 = PHI <x_6(D)(3), y_5(D)(2)> into y_4 = MAX (x_6, y_5); x_2 = MIN (x_6, y_5); and further optimize MINMAX (ISTR that was suggested elsewhere). phiopt only considers a single min/max operation. Now the question is whether the transform would be profitable in isolation.