https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87849
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-02 CC| |matz at gcc dot gnu.org Component|c++ |tree-optimization Version|tree-ssa |9.0 Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. I think the only realistic way to prove this is to fuse the loops and then see l = max(min(l, x), x); Thus - loop fusion required.