[LLVMdev] why llvm does not have uadd, iadd node
Sanjoy Das
sanjoy at playingwithpointers.com
Tue Feb 17 10:56:09 PST 2015
On Tue, Feb 17, 2015 at 10:41 AM, kewuzhang <kewu.zhang at amd.com> wrote:
> Hi guys,
>
> 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?
That's just how 2-s complement integers work -- signed and unsigned
addition / subtraction are the same at the bit-level (but signed and
unsigned division are not).
-- Sanjoy
More information about the llvm-dev
mailing list