<div dir="ltr">CreateIntCast is just a helper function that creates the correct instruction (SExt, ZExt or Trunc) depending on the number of bits you passed as source and as destination.<div><br></div><div>So yes, they do the same thing, but the API from IRBuilder just makes things easier.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-17 21:37 GMT-03:00 Dave Pitsbawn <span dir="ltr"><<a href="mailto:dpitsbawn@gmail.com" target="_blank">dpitsbawn@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm seeing many APIs which seemingly do the same thing, but they seem to go through slightly different code paths.<div><br></div><div>When I think of integer casts I think sign extension, zero extension or truncation. But there seems to be a IntCast ... which does the same thing?</div><div><br></div><div>Why does CreateIntCast API exist (same for FP methods as well)?</div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>