[llvm-dev] PHI nodes and connected ICMp
Anastasiya Ruzhanskaya via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 11 06:55:06 PDT 2017
Thank you for your answer! I tested your example, yes, perhaps I should
preserve some kind of tree to parse this start and end expressions for
induction variable... I was surprised, that SCEV cannot compute the
tripcount here. I thought, that all linear and maybe expressions with
multiplication are suitable for analysis.
2017-08-10 19:30 GMT+02:00 Sanjoy Das <sanjoy at google.com>:
> Hi Anastasiya,
>
> If you're looking for the exit value of a PHI node, please take a look
> at what IndVarSimplify does here:
> https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/
> IndVarSimplify.cpp#L516
>
> On Thu, Aug 10, 2017 at 12:55 AM, Anastasiya Ruzhanskaya
> <anastasiya.ruzhanskaya at frtk.ru> wrote:
> > By only two cases I mean , that in exiting block when computing the
> > condition related to PHI node I can expect only icmp on one of incoming
> > values or on phi node itself... I tried to come up with some more complex
> > examples but I always receive only these two cases, that is why I am
> asking.
>
> So you could have cases like this: https://godbolt.org/g/j4zcWy
>
> -- Sanjoy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170811/f11177de/attachment.html>
More information about the llvm-dev
mailing list