On Thu, Jul 20, 2017 at 11:09 AM, Bin Cheng <bin.ch...@arm.com> wrote: > Hi, > I removed computation of may_be_zero in revision 238585 by assuming > "pointer + 2 < pointer" can be folded. This is false when pointer could > overflow, > as well as unsigned type (I don't know why it haven't been exposed for long > time in case of unsigned type). As for the issue itself, any fix would > require > may_be_zero to be computed, which basically leads to patch revert. > Bootstrap and test on x86_64 and AArch64, is it OK?
Ok for trunk/branch. Thanks, Richard. > Thanks, > bin > 2017-07-20 Bin Cheng <bin.ch...@arm.com> > > PR tree-optimization/81388 > Revert r238585: > 2016-07-21 Bin Cheng <bin.ch...@arm.com> > > * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up > by removing computation of may_be_zero. > > gcc/testsuite/ChangeLog > 2017-07-20 Bin Cheng <bin.ch...@arm.com> > > PR tree-optimization/81388 > * gcc.dg/tree-ssa/pr81388-1.c: New test. > * gcc.dg/tree-ssa/pr81388-2.c: New test.