Re: [PATCH PR72817/PR73450]Fix wrong code caused by niter analyzer for NE_EXPR exit cond.

2016-08-16 Thread Jakub Jelinek
On Thu, Aug 11, 2016 at 04:35:51PM +, Bin Cheng wrote: > 2016-08-11 Bin Cheng > > PR tree-optimization/72817 > PR tree-optimization/73450 > * gcc.dg/tree-ssa/pr72817.c: New test. > * gcc.dg/tree-ssa/pr73450.c: New test. > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/t

Re: [PATCH PR72817/PR73450]Fix wrong code caused by niter analyzer for NE_EXPR exit cond.

2016-08-12 Thread Richard Biener
On Thu, Aug 11, 2016 at 6:35 PM, Bin Cheng wrote: > Hi, > I made a mistake when improving loop niter analysis for NE_EXPR exit > condition. > It can results in wrong code as reported in PR72817/PR73450. In previous > patch, > it simplifies below condition: > base <= FINAL ; step > 0

[PATCH PR72817/PR73450]Fix wrong code caused by niter analyzer for NE_EXPR exit cond.

2016-08-11 Thread Bin Cheng
Hi, I made a mistake when improving loop niter analysis for NE_EXPR exit condition. It can results in wrong code as reported in PR72817/PR73450. In previous patch, it simplifies below condition: base <= FINAL ; step > 0 base >= FINAL ; step < 0 into: base - st