> > Andrew Pinski wrote: > > >> -fwrapv-in-all-cases-except-loop-bounds > > > > > > Again, please don't this the default for Fortran as integer > > overflow has been undefined since at least 1977 so I don't think > > it is a good idea for GCC in general anyways as evidence of Fortran. > > > > -- Pinski > > Well the question is whether the optimization buys anything > in practice for other than the loop bound case, I am guessing > it does not, and if that is the case there is an argument > for uniformity.
It does buy you something for code like: if (a - 10 < 20) that might show up in a hot loop. So we are able to remove one extra instruction. In fact I think this code does show up in GCC and most likely other places. Oh and it is a very simple optimization that I added and I don't want it removed for C or Fortran or C++ for that matter. Thanks, Andrew Pinski