<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 8/16/17 5:44 AM, Anastasiya
      Ruzhanskaya via llvm-dev wrote:<br>
    </div>
    <blockquote
cite="mid:CAH7gUZaExjrBx1-YFtocaCJ_v61esWX52YQH_LWFgzsDY3VOLg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hello,<br>
        </div>
        I found out recently, that when I have j-- pattern in cycle it
        is written in llvm code with the help of addition. I actually
        wanted to somehow check are we following descending or acceding
        pattern in cycle. Is this substitution of operations done
        always? or not? seems that in this case the only way to proceed
        is to check whether the operand is negative or not.<br>
      </div>
    </blockquote>
    <br>
    If you're writing an LLVM analysis pass, then it should (ideally)
    handle any LLVM IR that can express the computation.  If you are
    writing an analysis pass that determines whether a value is
    increasing or decreasing, then your code should consider both add
    and sub instructions.  You should also consider integer overflow and
    how your analysis should handle the possibility that an increment
    will underflow or overflow an integer value and whether that result
    is defined or undefined based on the flags of the add/sub
    instructions.<br>
    <br>
    You might want to look at the ScalarEvolution pass.  I think it may
    do some of the analysis that you want to do.<br>
    <br>
    Regards,<br>
    <br>
    John Criswell<br>
    <br>
    <br>
    <blockquote
cite="mid:CAH7gUZaExjrBx1-YFtocaCJ_v61esWX52YQH_LWFgzsDY3VOLg@mail.gmail.com"
      type="cite">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
  </body>
</html>