[llvm-dev] SCEV related question

vivek pandya via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 25 04:49:20 PDT 2019


Hello,

I am first time paying with SCEV codebase.
I am trying to find out why ScalarEvolution is not able to give correct
back edge taken count for an expression.

So in my case flow reaches to howFarToZero() and in that function, I have
following expressions as SCEV

Start = (15 + (-1 * %i) (which is set to Distance SCEV)
Step = 1

now, first of all, should I expect Start as ConstantSCEV (15) instead of
the whole expression
the problem here is getUnsignedRangeMax(Distance) returns very large number
because of -1 in the SCEV.

How we can make this work? Here we can clearly say that after 15 steps this
expression will be 0
and thus we have a value for backedge taken count.

Any help will be appriciated.

Thanks,
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190825/9f8f56f0/attachment.html>


More information about the llvm-dev mailing list