Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6 |
|
#
3cb8347c |
| 06-Oct-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[APIntTest] Extend extractBits to check 'lshr+trunc' pattern for each case as well.
Noticed while triaging PR47731 that we don't have great coverage for such patterns.
|
Revision tags: llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2 |
|
#
ebdc886b |
| 20-Aug-2020 |
Vitaly Buka <vitalybuka@google.com> |
[APInt] Allow self-assignment with libstdc++
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/8256/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Athinlto-function-su
[APInt] Allow self-assignment with libstdc++
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/8256/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Athinlto-function-summary-paramaccess.ll
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D86053
show more ...
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
8aa52b19 |
| 09-Jun-2020 |
Chen Zheng <czhengsz@cn.ibm.com> |
[APInt] set all bits for getBitsSetWithWrap if loBit == hiBit
differentiate getBitsSetWithWrap & getBitsSet when loBit == hiBit getBitsSetWithWrap sets all bits; getBitsSet does nothing.
Reviewed B
[APInt] set all bits for getBitsSetWithWrap if loBit == hiBit
differentiate getBitsSetWithWrap & getBitsSet when loBit == hiBit getBitsSetWithWrap sets all bits; getBitsSet does nothing.
Reviewed By: lkail, RKSimon, lebedev.ri
Differential Revision: https://reviews.llvm.org/D81325
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
366ae9c9 |
| 15-Feb-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[APInt] byteSwap - handle any whole byte bitwidth greater than 16-bits
As noted on D74621, the bswap intrinsic has a self imposed limitation that the type's bitwidth must be divisible by 16, but the
[APInt] byteSwap - handle any whole byte bitwidth greater than 16-bits
As noted on D74621, the bswap intrinsic has a self imposed limitation that the type's bitwidth must be divisible by 16, but there's no reason that APInt::byteSwap must have the same limitation, given that it can already handle any byte width.
show more ...
|
#
4d5c3ade |
| 15-Feb-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[APInt] Add some procedural APInt::byteSwap unit tests
rGf0181cc7bac3 added specific tests up to i64, this adds a general loop to test some basic byte moves for larger APInts.
|
#
f0181cc7 |
| 14-Feb-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[APInt] Add some basic APInt::byteSwap unit tests
As noted on D74621 we currently have no test coverage
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1 |
|
#
b2924d99 |
| 30-Jan-2020 |
Jonas Devlieghere <jonas@devlieghere.com> |
[llvm] Replace SmallStr.str().str() with std::string conversion operator.
Use the std::string conversion operator introduced in d7049213d0fcda691c9e79f9b41e357198d99738.
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
7b771ed4 |
| 13-Nov-2019 |
Tim Shen <timshen@google.com> |
[APInt] Fix tests that had wrong assumption about sdivs with negative quotient.
Reviewers: sanjoy
Subscribers: bixia, dexonsmith, sanjoy.google, llvm-commits
Tags: #llvm
Differential Revision: ht
[APInt] Fix tests that had wrong assumption about sdivs with negative quotient.
Reviewers: sanjoy
Subscribers: bixia, dexonsmith, sanjoy.google, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70156
show more ...
|
#
444ac341 |
| 03-Dec-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APInt][PatternMatch] Add 'is non-positive' predicate
It will be useful for implementing the fold mentioned in https://bugs.llvm.org/show_bug.cgi?id=44100#c4
|
#
fd03be36 |
| 19-Nov-2019 |
czhengsz <czhengsz@cn.ibm.com> |
[APInt] add wrap support for `setBits` and `getBitsSet`
Add two new interfaces getBitsSet and getBitsSetWithWrap
Reviewed by: lebedev.ri, craig.topper
Differential Revision: https://reviews.llvm.o
[APInt] add wrap support for `setBits` and `getBitsSet`
Add two new interfaces getBitsSet and getBitsSetWithWrap
Reviewed by: lebedev.ri, craig.topper
Differential Revision: https://reviews.llvm.org/D69032
show more ...
|
#
9ca363d8 |
| 08-Nov-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APInt] Add saturating truncation methods
Summary: The signed one is needed for implementation of `ConstantRange::smul_sat()`, unsigned is for completeness only.
Reviewers: nikic, RKSimon, spatel
[APInt] Add saturating truncation methods
Summary: The signed one is needed for implementation of `ConstantRange::smul_sat()`, unsigned is for completeness only.
Reviewers: nikic, RKSimon, spatel
Reviewed By: nikic
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69993
show more ...
|
#
9d77ad57 |
| 26-Oct-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APInt] Introduce APIntOps::GetMostSignificantDifferentBit()
Summary: Compare two values, and if they are different, return the position of the most significant bit that is different in the values.
[APInt] Introduce APIntOps::GetMostSignificantDifferentBit()
Summary: Compare two values, and if they are different, return the position of the most significant bit that is different in the values.
Needed for D69387.
Reviewers: nikic, spatel, sanjoy, RKSimon
Reviewed By: nikic
Subscribers: xbolva00, hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69439
show more ...
|
#
1cc8e1e1 |
| 25-Oct-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APInt] Add saturating left-shift ops
Summary: There are `*_ov()` functions already, so at least for consistency it may be good to also have saturating variants. These may or may not be needed for `
[APInt] Add saturating left-shift ops
Summary: There are `*_ov()` functions already, so at least for consistency it may be good to also have saturating variants. These may or may not be needed for `ConstantRange`'s `shlWithNoWrap()`
Reviewers: spatel, nikic
Reviewed By: nikic
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69398
show more ...
|
#
b2c18445 |
| 25-Oct-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APInt] Add saturating multiply ops
Summary: There are `*_ov()` functions already, so at least for consistency it may be good to also have saturating variants. These may or may not be needed for `Co
[APInt] Add saturating multiply ops
Summary: There are `*_ov()` functions already, so at least for consistency it may be good to also have saturating variants. These may or may not be needed for `ConstantRange`'s `mulWithNoWrap()`
Reviewers: spatel, nikic
Reviewed By: nikic
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69397
show more ...
|
#
1723364a |
| 18-Sep-2019 |
Daniel Sanders <daniel_l_sanders@apple.com> |
Fix compile-time regression caused by rL371928
Summary: Also fixup rL371928 for cases that occur on our out-of-tree backend
There were still quite a few intermediate APInts and this caused the comp
Fix compile-time regression caused by rL371928
Summary: Also fixup rL371928 for cases that occur on our out-of-tree backend
There were still quite a few intermediate APInts and this caused the compile time of MCCodeEmitter for our target to jump from 16s up to ~5m40s. This patch, brings it back down to ~17s by eliminating pretty much all of them using two new APInt functions (extractBitsAsZExtValue(), insertBits() but with a uint64_t). The exact conditions for eliminating them is that the field extracted/inserted must be <=64-bit which is almost always true.
Note: The two new APInt API's assume that APInt::WordSize is at least 64-bit because that means they touch at most 2 APInt words. They statically assert that's true. It seems very unlikely that someone is patching it to be smaller so this should be fine.
Reviewers: jmolloy
Reviewed By: jmolloy
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67686
llvm-svn: 372243
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2 |
|
#
42ad452c |
| 05-Aug-2019 |
David Blaikie <dblaikie@gmail.com> |
Fix build when both gtest death tests and LLVM_NODISCARD are available.
(matching r367495)
llvm-svn: 367899
|
#
66068159 |
| 30-Jul-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APInt] Introduce clearLowBits()
Summary: Equivalent to `x & -2^K`.
Reviewers: RKSimon, craig.topper
Reviewed By: RKSimon, craig.topper
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differe
[APInt] Introduce clearLowBits()
Summary: Equivalent to `x & -2^K`.
Reviewers: RKSimon, craig.topper
Reviewed By: RKSimon, craig.topper
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65369
llvm-svn: 367287
show more ...
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4 |
|
#
1a5ebe1f |
| 02-Jul-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[APIntTest] multiplicativeInverse(): clarify test
Clarify that multiplicative inverse exists for all odd numbers, and does not exist for all even numbers (including 0).
llvm-svn: 364920
|
#
9e9eb62f |
| 29-Jun-2019 |
Dmitry Venikov <quolyk@gmail.com> |
[APInt] Fix getBitsNeeded for INT_MIN values
Summary: This patch fixes behaviour of APInt::getBitsNeeded for INT_MIN 10 bits values.
Reviewers: regehr, RKSimon
Reviewed By: RKSimon
Subscribers: g
[APInt] Fix getBitsNeeded for INT_MIN values
Summary: This patch fixes behaviour of APInt::getBitsNeeded for INT_MIN 10 bits values.
Reviewers: regehr, RKSimon
Reviewed By: RKSimon
Subscribers: grandinj, dexonsmith, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63691
llvm-svn: 364710
show more ...
|
#
2adab5a1 |
| 28-Jun-2019 |
Mikael Holmen <mikael.holmen@ericsson.com> |
Silence gcc warning in testcase [NFC]
Without the fix gcc (7.4.0) complains with
../unittests/ADT/APIntTest.cpp: In member function 'virtual void {anonymous}::APIntTest_MultiplicativeInverseExausti
Silence gcc warning in testcase [NFC]
Without the fix gcc (7.4.0) complains with
../unittests/ADT/APIntTest.cpp: In member function 'virtual void {anonymous}::APIntTest_MultiplicativeInverseExaustive_Test::TestBody()': ../unittests/ADT/APIntTest.cpp:2510:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for (unsigned Value = 0; Value < (1 << BitWidth); ++Value) { ~~~~~~^~~~~~~~~~~~~~~~~
llvm-svn: 364624
show more ...
|
#
a59cf878 |
| 27-Jun-2019 |
Roman Lebedev <lebedev.ri@gmail.com> |
[NFC][APInt] Add (exhaustive) test for multiplicativeInverse()
Else there is no direct test coverage at all. The function should either return '0' or precise answer.
llvm-svn: 364599
|
Revision tags: llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
#
a881ffea |
| 01-Jun-2019 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[APInt] Add PR40897 test case
In reality APInt::getBitsNeeded(INT_MIN, base) cases require one less bit than is returned
llvm-svn: 362301
|
Revision tags: llvmorg-8.0.1-rc1 |
|
#
acc7641b |
| 19-Apr-2019 |
Fangrui Song <maskray@google.com> |
[APInt] Optimize umul_ov
Change two costly udiv() calls to lshr(1)*RHS + left-shift + plus
On one 64-bit umul_ov benchmark, I measured an obvious improvement: 12.8129s -> 3.6257s
Note, there may b
[APInt] Optimize umul_ov
Change two costly udiv() calls to lshr(1)*RHS + left-shift + plus
On one 64-bit umul_ov benchmark, I measured an obvious improvement: 12.8129s -> 3.6257s
Note, there may be some value to special case 64-bit (the most common case) with __builtin_umulll_overflow().
Differential Revision: https://reviews.llvm.org/D60669
llvm-svn: 358730
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
#
7ef0b313 |
| 20-Nov-2018 |
Sanjay Patel <spatel@rotateright.com> |
[APInt] Add methods for saturated add and sub
This adds the sadd_sat, uadd_sat, ssub_sat, usub_sat methods for performing saturating additions and subtractions to APInt.
Split out from D54237.
Pat
[APInt] Add methods for saturated add and sub
This adds the sadd_sat, uadd_sat, ssub_sat, usub_sat methods for performing saturating additions and subtractions to APInt.
Split out from D54237.
Patch by: nikic (Nikita Popov)
Differential Revision: https://reviews.llvm.org/D54332
llvm-svn: 347324
show more ...
|