Displaying 20 results from an estimated 418 matches for "apints".
Did you mean:
apint
2009 Jan 20
0
[LLVMdev] cygwin build patch
On Jan 20, 2009, at 1:22 AM, Jay Foad wrote:
>>> I realise that the DataTypes.h.in part might be controversial. Also,
>>> there's probably a better place to put it, but I'm not sure where.
>>
>> I didn't apply this part. What problems does it cause to not have
>> this? Can we fix uses of max and min?
>
> I could try to fix this by changing
2009 Jan 20
4
[LLVMdev] cygwin build patch
>> I realise that the DataTypes.h.in part might be controversial. Also,
>> there's probably a better place to put it, but I'm not sure where.
>
> I didn't apply this part. What problems does it cause to not have
> this? Can we fix uses of max and min?
I get these errors in lib:
.../lib/Analysis/ValueTracking.cpp:162: error: no matching function
for call to
2012 May 21
3
[LLVMdev] APInt::sdivrem error?
I wrote the following bit of code
static APInt FloorOfQuotient(APInt a, APInt b) {
unsigned bits = a.getBitWidth();
APInt q(bits, 1), r(bits, 1);
APInt::sdivrem(a, b, q, r);
* errs() << "sdivrem(" << a << ", " << b << ") = (" << q << ", " << r <<
")\n";
* if (r == 0)
return q;
else {
2012 May 21
0
[LLVMdev] APInt::sdivrem error?
OK, the code for sdivrem in APInt.h is wrong.
Here's what's written:
static void sdivrem(const APInt &LHS, const APInt &RHS,
APInt &Quotient, APInt &Remainder) {
if (LHS.isNegative()) {
if (RHS.isNegative())
APInt::udivrem(-LHS, -RHS, Quotient, Remainder);
else
APInt::udivrem(-LHS, RHS, Quotient, Remainder);
Quotient =
2008 Jan 23
0
[LLVMdev] help - needed - compiling llvm-gcc4.2 frontend on cygwin
Hi,
I am new to LLVM & to this mailing list.
I need help compiling llvm-gcc-frontend-4.2 on windows using cygwin
I have gcc 4.2.2 (compiled from source)
here is my configure - command line (hope this is correct)
****
bash-3.2$ ../llvm-gcc/configure --prefix=/usr/local/llvm-gcc
--program-prefix=llvm- --enable-llvm=/cygdrive/d/llvm-svn/llvm-objdir/
--enable-languages=c,c++
2011 Sep 06
2
[LLVMdev] bitwise AND
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
2009 Aug 20
2
[LLVMdev] error api for APInt / APFloat
...skipLeadingZeroesAndAnyDot:
String cannot be just a dot
interpretDecimal:
Multiple dots in float
Invalid character in digit string
trailingHexadecimalFraction:
Invalid trailing hexadecimal fraction!
I'd expect we'd want to keep the assertions that check to make sure
we're comparing APInts and APFloats of the right semantics.
I'm not sure if it makes sense trying to change this right before the
code freeze, especially since I can't find any other classes that have
similar semantics that we could copy. So, what should we do?
2007 Aug 14
1
[LLVMdev] Static functions for APInt
This adds a bunch of static functions that implement unsigned
two's complement bignum arithmetic. They could be used to
implement much of APInt, but the idea is they are enough to
implement APFloat as well, which the current APInt interface
is not suited for.
Neil.
-------------- next part --------------
Index: include/llvm/ADT/APInt.h
2011 Dec 01
3
[LLVMdev] anchoring explicit template instantiations
On Wed, Nov 30, 2011 at 10:42 PM, Chris Lattner <clattner at apple.com> wrote:
> On Nov 29, 2011, at 12:26 AM, David Blaikie wrote:
>> For a bit of an experiment I've been trying to compile LLVM & Clang
>> with -Weverything (disabling any errors that seem like more noise/less
>> interesting). One warning I've recently hit a few instances of is
>>
2019 Jan 09
2
Assertion error in APInt.cpp
Hi all,
I'm experimenting with the Interpreter and all look good so far :)
Unfortunately when I play with the visitBinartOperator() method I have the
following assertion error:
Support/APInt.cpp:233: llvm::APInt llvm::APInt::operator*(const llvm::APInt
&) const: Assertion `BitWidth == RHS.BitWidth && "Bit widths must be the
same"' failed.
I have recompiled llvm and
2008 Jan 23
4
[LLVMdev] Complex constant expressions?
...t;> the functionality that's already in LLVM. For example, consider just
>> the problem of float to int conversions:
>>
>> char B[ (int)3.0 ];
>>
>> Generating code for this is relatively simple; Converting
>> arbitrary-sized APFloats to arbitrary-sized APInts isn't quite as
>> easy.
>>
>
> APFloat::convertToInteger does just this. Why can't you use it?
>
Well, I may be using it wrong. But looking at APFloat.h, I see four
functions that purport to convert to integer:
opStatus convertToInteger(integerPart *, un...
2011 Jun 22
2
[LLVMdev] ConstantRange::sub
Sure. I will submit a patch.
BTW, what's the difference between the bounds I was expecting
APInt NewLower = getLower() - Other.getUpper() + 1;
APInt NewUpper = getUpper() - Other.getLower();
and the two you mentioned
NewLower = Lower - (Upper-1)
NewUpper = (Upper-1) - Lower + 1
They look equivalent to me. Did I miss anything? Thanks.
- xi
On Jun 22, 2011, at 2:39 PM, Nick Lewycky
2011 Jun 21
2
[LLVMdev] ConstantRange::sub
Hi,
I have a question about ConstantRange::sub(const ConstantRange &Other) at lib/Support/ConstantRange.cpp:524. The code computes the new bounds as follows.
APInt NewLower = getLower() - Other.getLower();
APInt NewUpper = getUpper() - Other.getUpper() + 1;
Could someone explain this to me? I was expecting something like
APInt NewLower = getLower() - Other.getUpper() + 1;
APInt
2011 Dec 01
0
[LLVMdev] anchoring explicit template instantiations
On Dec 1, 2011, at 12:08 AM, David Blaikie wrote:
> On Wed, Nov 30, 2011 at 10:42 PM, Chris Lattner <clattner at apple.com> wrote:
>> On Nov 29, 2011, at 12:26 AM, David Blaikie wrote:
>>> For a bit of an experiment I've been trying to compile LLVM & Clang
>>> with -Weverything (disabling any errors that seem like more noise/less
>>> interesting).
2008 Jan 23
0
[LLVMdev] Complex constant expressions?
Talin wrote:-
> Well, I may be using it wrong. But looking at APFloat.h, I see four
> functions that purport to convert to integer:
>
> opStatus convertToInteger(integerPart *, unsigned int, bool,
> roundingMode) const;
> opStatus convertFromSignExtendedInteger(const integerPart *,
> unsigned int,
>
2011 Jul 13
2
[LLVMdev] overflow check
Hi,
I have three constants (B, C and V) and V = B + C. I want to find out if B +
C wraps around. The way I'll do it is, assuming B and C are both positive,
to check if V < B or C.
For this I need the values of B, C and V. I tried using APInt as below.
***
If (isa<Constant> (B) && isa<Constant> (C) && isa<Constant>(V)) {
ConstantInt *CV =
2009 Aug 20
0
[LLVMdev] error api for APInt / APFloat
...a dot
>
> interpretDecimal:
> Multiple dots in float
> Invalid character in digit string
>
> trailingHexadecimalFraction:
> Invalid trailing hexadecimal fraction!
>
>
> I'd expect we'd want to keep the assertions that check to make sure
> we're comparing APInts and APFloats of the right semantics.
>
> I'm not sure if it makes sense trying to change this right before the
> code freeze, especially since I can't find any other classes that have
> similar semantics that we could copy. So, what should we do?
> ___________________________...
2008 Aug 15
3
[LLVMdev] install question
I'm trying to install llvm on my windows development box and hit a
problem
I'm using cygwin
cygwin% gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
I downloaded both the top of tree via svn
I ran ./configure
make
make[1]: Entering directory `/cygdrive/c/llvm/lib/Support'
llvm[1]: Compiling APFloat.cpp for Debug build
llvm[1]: Compiling APInt.cpp
2016 Jul 20
2
Hitting assertion failure related to vectorization + instcombine
Hi folks,
I'm hitting the below assertion failure when compiling this small piece of C code (repro.c, attached).
My command line is:
bin/clang --target=aarch64-linux-gnu -c -O2 repro.c
clang is built from top of trunk as of this morning. It only happens at -O2, and it doesn't happen with the default target (x86_64). I tried to reproduce using just 'llc -O2' but didn't
2008 Aug 21
3
[LLVMdev] Fix build on GCC 4.3
Index: include/llvm/ADT/APInt.h
===================================================================
--- include/llvm/ADT/APInt.h (revision 55101)
+++ include/llvm/ADT/APInt.h (working copy)
@@ -20,6 +20,7 @@
#include <cassert>
#include <iosfwd>
#include <string>
+#include <cstring>
namespace llvm {
class Serializer;
-------------- next part --------------
An