[PATCH] D20695: Floating Point SCEV Analysis
silviu.baranga@arm.com via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 16:37:40 PDT 2016
sbaranga added a comment.
In http://reviews.llvm.org/D20695#447451, @sanjoy wrote:
> In http://reviews.llvm.org/D20695#446877, @sbaranga wrote:
>
> > > float x = init;
> >
> > >
> >
> > > for (int i=0;i<N;i++){
> >
> > > A[i] = x;
> >
> > > x += fp_inc; // Loop invariant variable or constant
> >
> > > }
> >
> >
> >
>
>
>
>
> > If this is correct with fast-math, we should be able to use this to
>
> > get the backedge taken count - which would be a good reason for doing
>
> > this in SCEV.
>
>
> Shouldn't SCEV //today// be able to compute the backedge taken count of
> the above loop (since the controlling induction variable is
> integral)?
Hi Sanjoy,
For that loop, yes, SCEV should be able to figure out the backedge taken count today.
But using that reasoning I think we should be able to get the backedge taken count for the following loop (again, I don't know if this is actually correct):
float i = 0.f;
for (; i < N; i+=fp_inc) {}
This was something previously raised by Michael on the llvm-dev thread.
Repository:
rL LLVM
http://reviews.llvm.org/D20695
More information about the llvm-commits
mailing list