<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    In general, yes.  Other passes may catch cases InstCombine doesn't. 
    You may find some corner cases here and there.  Bug reports or
    patches are very welcome.  The largest area of potential concern is
    likely to be widdening/narrowing for induction variables in loops. 
    I know we've hit one such issue recently.  <br>
    <br>
    I'm assuming you're compiling for a 32 bit or 64 bit architecture. 
    If not, the answer might be extremely different.  <br>
    <br>
    Philip<br>
    <br>
    <div class="moz-cite-prefix">On 04/17/2015 09:00 PM, Dave Pitsbawn
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADY4c8aoRPsOtrp=oDDuOmdNeCeVz8AiJmPSMiBsL-Mbde0RoA@mail.gmail.com"
      type="cite">
      <div dir="ltr">In my language there are a lot of i16 definitions,
        but almost all of the time they are upgraded to i32 because my
        add operations only happen on i32.
        <div><br>
        </div>
        <div>So to be representative to my language definition, I have a
          lots of Sext/Zext and Truncs pretty much every time I add or
          subtract.</div>
        <div><br>
        </div>
        <div>As soon as I pass through InstCombine things look much
          nicer, all the upcasts and downcasts go away, but my test
          cases are simple.</div>
        <div><br>
        </div>
        <div>Is InstCombine pretty good about finding most/all such
          cases?</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>