<div dir="ltr">A hypothetical 'uadd' would have the exact same behavior as 'sadd' when using two's complement.  We need both 'udiv' and 'sdiv' because dividing acts differently with negative numbers.  For example, dividing by 1 by 0b11111111111111111111111111111111 gives -1 for signed division and '0' for unsigned division.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 17, 2015 at 10:41 AM, kewuzhang <span dir="ltr"><<a href="mailto:kewu.zhang@amd.com" target="_blank">kewu.zhang@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys,<br>
<br>
I just noticed that the LLVM has some node for signed/unsigned type( like udiv, sdiv), but why the ADD, SUB do not have the counter part sadd, uadd?<br>
<br>
best<br>
<br>
kevin<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>
</blockquote></div><br></div>