[LLVMdev] How doesn't llvm generate IR for logical negate operation

zhi chen zchenhn at gmail.com
Fri Apr 10 17:07:08 PDT 2015


How can I generate LLVM IR for both logical NEG (!)? For example, if I have
Int32Ty a,

For the bitwise NEG(~):

c = ~a ;

I can use the following API from LLVM:

BinaryOperator *neg = BinaryOperator::CreateNeg(nbits, "bitwiseNEG",
insertBefore);

How, if I want to generate logical NEG:

c = !a;

what should I do for this?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150410/1656e4c7/attachment.html>


More information about the llvm-dev mailing list