Re: [PATCH 3/3] tree-optimization/114052 - niter analysis from undefined behavior

2024-04-08 Thread Richard Biener
On Mon, 8 Apr 2024, Richard Biener wrote: > On Fri, 5 Apr 2024, Jan Hubicka wrote: > > > > + /* When there's a call that might not return the last iteration > > > + is possibly partial. This matches what we check in invariant > > > + motion. > > > + ??? For the call argument ev

Re: [PATCH 3/3] tree-optimization/114052 - niter analysis from undefined behavior

2024-04-08 Thread Richard Biener
On Fri, 5 Apr 2024, Jan Hubicka wrote: > > + /* When there's a call that might not return the last iteration > > +is possibly partial. This matches what we check in invariant > > +motion. > > +??? For the call argument evaluation it would be still OK. */ > > + if

Re: [PATCH 3/3] tree-optimization/114052 - niter analysis from undefined behavior

2024-04-05 Thread Jan Hubicka
> + /* When there's a call that might not return the last iteration > + is possibly partial. This matches what we check in invariant > + motion. > + ??? For the call argument evaluation it would be still OK. */ > + if (!may_have_exited > + && is_g

Re: [PATCH 3/3] tree-optimization/114052 - niter analysis from undefined behavior

2024-04-05 Thread Richard Biener
On Fri, 5 Apr 2024, Richard Biener wrote: > The following makes sure to only compute upper bounds for the number > of iterations of loops from undefined behavior invoked by stmts when > those are executed in each loop iteration, in particular also in the > last one. The latter cannot be guarantee