<div dir="ltr"><div>To continue this topic:<br></div><div>sometimes SCEV's behavior is rather controversial : for loops with i changing as i \=2 for example, he can't figure what the type of expressions is, but surprisingly can determine max trip count. Shouldn't it be able to detect or not detect  these parameters at the same time?<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-11 15:56 GMT+02:00 Anastasiya Ruzhanskaya <span dir="ltr"><<a href="mailto:anastasiya.ruzhanskaya@frtk.ru" target="_blank">anastasiya.ruzhanskaya@frtk.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry,  I just saw this enumeration with SCEV types - all operations should be possible then...<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-08-11 15:55 GMT+02:00 Anastasiya Ruzhanskaya <span dir="ltr"><<a href="mailto:anastasiya.ruzhanskaya@frtk.ru" target="_blank">anastasiya.ruzhanskaya@frtk.<wbr>ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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. <br></div><div class="m_-4447740995498034726HOEnZb"><div class="m_-4447740995498034726h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-08-10 19:30 GMT+02:00 Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@google.com" target="_blank">sanjoy@google.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Anastasiya,<br>
<br>
If you're looking for the exit value of a PHI node, please take a look<br>
at what IndVarSimplify does here:<br>
<a href="https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/IndVarSimplify.cpp#L516" rel="noreferrer" target="_blank">https://github.com/llvm-mirror<wbr>/llvm/blob/master/lib/Transfor<wbr>ms/Scalar/IndVarSimplify.cpp#L<wbr>516</a><br>
<span><br>
On Thu, Aug 10, 2017 at 12:55 AM, Anastasiya Ruzhanskaya<br>
<<a href="mailto:anastasiya.ruzhanskaya@frtk.ru" target="_blank">anastasiya.ruzhanskaya@frtk.r<wbr>u</a>> wrote:<br>
> By only two cases I mean , that in exiting block when computing the<br>
> condition related to PHI node I can expect only icmp on one of incoming<br>
> values or on phi node itself... I tried to come up with some more complex<br>
> examples but I always receive only these two cases, that is why I am asking.<br>
<br>
</span>So you could have cases like this: <a href="https://godbolt.org/g/j4zcWy" rel="noreferrer" target="_blank">https://godbolt.org/g/j4zcWy</a><br>
<span class="m_-4447740995498034726m_1097259955436327921HOEnZb"><font color="#888888"><br>
-- Sanjoy<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>