http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60537
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-17
Summary|Loop optimization code |Loop header copying code
|bloat for simple loops |bloat for simple loops that
| |don't benefit
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
For -O2 we do this to enable loop optimizations which almost all require
do { } while style loops. This canonicalization can sometimes peel an
entire iteration as you can see here, and this canonicalization is
not done at -Os unless the loop is determined as hot (so with -Os
and profile-feedback some loops may get this treatment).
It's hard to undo this transform but that's what would be needed here ...
(or make more passes deal with number-of-iterations == n or zero)