https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69526

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-01-28
                 CC|                            |amker at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
_15 = n_5(D) + 4294967295;
_2 = (sizetype) _15;
_1 = _2 + 1;

cannot be simplified to (sizetype)n_5(D) because n_5 - 1 might underflow
and then adding 1 in a wider type doesn't cancel the operation.

So yes, this is expected but unfortunate.  I don't think we do any costing
on the code we insert on the loop entry edge to break ties between
equal cost candidates.  Well, if that is what happens.

The real issue above is that we sometimes end up using sizetype variables
for no good reason.

Reply via email to