Paul Hancock via llvm-dev
2017-Jul-04 06:49 UTC
[llvm-dev] LLVM no getInt128 in IRBuilder?
The IRBuilder header lacks 'getInt128', but has the ty func for 128 (also with different formatting), ConstantInt also lacks 128 input so does LLVM actually lack 128 constant support? or is the support limited to constant evaluation (ie; value = const64 * const64 or similar)? - Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170704/cb1806ee/attachment-0001.html>
Tim Northover via llvm-dev
2017-Jul-05 14:47 UTC
[llvm-dev] LLVM no getInt128 in IRBuilder?
Hi Paul, On 3 July 2017 at 23:49, Paul Hancock via llvm-dev <llvm-dev at lists.llvm.org> wrote:> The IRBuilder header lacks 'getInt128', but has the ty func for 128 (also > with different formatting), ConstantInt also lacks 128 input so does LLVM > actually lack 128 constant support? or is the support limited to constant > evaluation (ie; value = const64 * const64 or similar)?Integers above 64-bits are represented by APInt classes because you have to stop somewhere and __int128 isn't a standard type anywhere that I know of. So you'll have to create your own APInt use "getInt" on IRBuilder. Cheers. Tim.
Chris Lattner via llvm-dev
2017-Jul-05 14:58 UTC
[llvm-dev] LLVM no getInt128 in IRBuilder?
> On Jul 3, 2017, at 11:49 PM, Paul Hancock via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > The IRBuilder header lacks 'getInt128', but has the ty func for 128 (also with different formatting), ConstantInt also lacks 128 input so does LLVM actually lack 128 constant support? or is the support limited to constant evaluation (ie; value = const64 * const64 or similar)?Hi Paul, LLVM supports arbitrary precision integers, which allows i128, i1234, or i13 if you want. IRBuilder is just a set of convenience helpers that boil down to lower level primitives, e.g. Type::getIntNTy(Ctx, 1234) -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170705/ab8f8319/attachment.html>