[LLVMdev] bitwise AND

Jimborean Alexandra xinfinity_a at yahoo.com
Tue Sep 6 02:40:36 PDT 2011


Hi,

I want to compute the bitwise 'and' between two values of type int1:  %x = and %a, %b  . 

Which is the LLVM instruction that creates this? I only found the APInt class, whose constructor is:

 APInt(unsigned numBits, uint64_t val, bool isSigned = false)

and which provides the bitwise AND operation:

APInt  llvm::APIntOps::And (const APInt &LHS, const APInt &RHS) 
  Bitwise AND function for APInt.  

Is this the best way to build the 'and' instruction that I need? If so, how can I send the value uint64_t stored in the values %a , %b of type int1 ?

Thank you.

Alexandra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110906/f53e40e8/attachment.html>


More information about the llvm-dev mailing list