History log of /llvm-project/llvm/lib/Support/APInt.cpp (Results 251 – 275 of 434)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2aae94fa 22-Dec-2011 Eli Friedman <eli.friedman@gmail.com>

Fix APInt::rotl and APInt::rotr so that they work correctly. Found while writing some code that tried to use them.

llvm-svn: 147134


# 1c419ff5 16-Dec-2011 Dylan Noblesmith <nobled@dreamwidth.org>

APInt: update asserts for base-36

Hexatridecimal was added in r139695.

And fix the unittest that now triggers the assert.

llvm-svn: 146754


# 54c9462c 01-Dec-2011 David Blaikie <dblaikie@gmail.com>

Fix unreachable return & simplify some branches.

llvm-svn: 145627


# 4f9a8081 23-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk>

Correctly byte-swap APInts with bit-widths greater than 64.

llvm-svn: 145111


Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1
# 19546418 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com>

Fix APInt::operator*= so that it computes the correct result for large integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common

Fix APInt::operator*= so that it computes the correct result for large integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086.

llvm-svn: 141441

show more ...


# c98ac850 20-Sep-2011 Douglas Gregor <dgregor@apple.com>

U is good enough

llvm-svn: 140166


# e4e20f43 20-Sep-2011 Douglas Gregor <dgregor@apple.com>

Eliminate sign-comparison warnings in APInt

llvm-svn: 140158


# c20a3ebb 19-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com>

Silence -Wsign-compare warnings from GCC.

llvm-svn: 140043


# 663c068d 14-Sep-2011 Douglas Gregor <dgregor@apple.com>

Add APInt support for converting to/from hexatridecimal strings

llvm-svn: 139695


# 7a162881 18-Jul-2011 Jeffrey Yasskin <jyasskin@google.com>

Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261. Migrate all LLVM callers of the old
constructor to the new one.

llvm-

Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261. Migrate all LLVM callers of the old
constructor to the new one.

llvm-svn: 135431

show more ...


# b05f02e9 15-Jun-2011 Ted Kremenek <kremenek@apple.com>

add option for literal formatting to APInt::toString()

toString() now takes an optional bool argument that,
depending on the radix, adds the appropriate prefix
to the integer's string representation

add option for literal formatting to APInt::toString()

toString() now takes an optional bool argument that,
depending on the radix, adds the appropriate prefix
to the integer's string representation that makes it into a
meaningful C literal, e.g.:

hexademical: '-f' becomes '-0xf'
octal: '77' becomes '077'
binary: '110' becomes '0b110'

Patch by nobled@dreamwidth.org!

llvm-svn: 133032

show more ...


# 9f1d2ded 22-May-2011 Chris Lattner <sabre@nondot.org>

fix a bug for hosts without round, PR8893.

llvm-svn: 131842


# 0ab5e2cd 15-Apr-2011 Chris Lattner <sabre@nondot.org>

Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558


Revision tags: llvmorg-2.9.0
# 0bb2ad2c 27-Mar-2011 Frits van Bommel <fvbommel@gmail.com>

Constant folding support for calls to umul.with.overflow(), basically identical to the smul.with.overflow() code.

llvm-svn: 128379


Revision tags: llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2
# 09a51bab 17-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com>

Add an argument to APInt's magic udiv calculation to specify the number of bits that are known zero in the divided number.

This will come in handy soon.

llvm-svn: 127828


Revision tags: llvmorg-2.9.0-rc1
# 8731d0cc 21-Feb-2011 Cameron Zwarich <zwarich@apple.com>

The signed version of our "magic number" computation for the integer approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approxima

The signed version of our "magic number" computation for the integer approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.

In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.

llvm-svn: 126097

show more ...


# 583abbc4 07-Dec-2010 Jay Foad <jay.foad@gmail.com>

PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead

PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

llvm-svn: 121120

show more ...


# f1a04edb 04-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com>

APInt: microoptimize a few methods.

llvm-svn: 120912


# 25a5e4ca 01-Dec-2010 Jay Foad <jay.foad@gmail.com>

PR5207: Rename overloaded APInt methods set(), clear(), flip() to
setAllBits(), setBit(unsigned), etc.

llvm-svn: 120564


# 15084f08 30-Nov-2010 Jay Foad <jay.foad@gmail.com>

PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.

llvm-svn: 120413


# 5ed61fe6 18-Nov-2010 Dan Gohman <gohman@apple.com>

Bounds-check APInt's operator[].

llvm-svn: 119708


# b9681ad4 14-Oct-2010 Chris Lattner <sabre@nondot.org>

fix a bug I introduced, no idea how this didn't repro right.

llvm-svn: 116462


# 698661c7 14-Oct-2010 Chris Lattner <sabre@nondot.org>

add uadd_ov/usub_ov to apint, consolidate constant folding
logic to use the new APInt methods. Among other things this
implements rdar://8501501 - llvm.smul.with.overflow.i32 should constant fold

w

add uadd_ov/usub_ov to apint, consolidate constant folding
logic to use the new APInt methods. Among other things this
implements rdar://8501501 - llvm.smul.with.overflow.i32 should constant fold

which comes from "clang -ftrapv", originally brought to my attention from PR8221.

llvm-svn: 116457

show more ...


# 2c819b03 13-Oct-2010 Chris Lattner <sabre@nondot.org>

constify these methods.

llvm-svn: 116455


# 79bdd88f 13-Oct-2010 Chris Lattner <sabre@nondot.org>

add a few operations for signed operations that also
return an overflow flag.

llvm-svn: 116452


1...<<1112131415161718