http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47831
Ian Bolton <ibolton at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2011.02.22 14:50:03 CC| |ibolton at gcc dot gnu.org Ever Confirmed|0 |1 Known to fail| |4.6.0 --- Comment #1 from Ian Bolton <ibolton at gcc dot gnu.org> 2011-02-22 14:50:03 UTC --- Confirmed on r170278 of trunk. The better sequence that Carrot mentions comes from having if-conversion disabled (-fno-if-conversion2). I expect Basic Block Reordering might be able to help out in the case where if-conversion is enabled, but I think it is still disabled for -Os, as it can sometimes lead to larger code. That is a separate issue though. To tackle this properly, the if-conversion heuristic would need to be enhanced to detect cases where the codesize will likely increase and pessimise against those cases when using -Os.