On Thu, Mar 31, 2016 at 11:55 AM, Hurugalawadi, Naveen <naveen.hurugalaw...@caviumnetworks.com> wrote: >>> Er, the code just below your patch should already handle this case, no? > > Hi, > > Thanks for the review and your comments on the patch. > > The code below seems to handle this case for O2 or higher optimization. > > However, somehow its not being handled with O1 and hence has this > implemented for better optimization. > Can you please let me know if it can be handled in a better way or neglect > this one just for this case?
With -O1 there is -fno-strict-overflow in effect which is not TYPE_OVERFLOW_UNDEFINED. Your !flag_wrapv check is simply wrong (for -fno-strict-overflow neither TYPE_OVERFLOW_WRAPS nor TYPE_OVERFLOW_UNDEFINED is set). Richard. > Thanks, > Naveen