diff options
author | Jay Foad <jay.foad@amd.com> | 2021-09-30 09:54:57 +0100 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2021-10-04 08:57:44 +0100 |
commit | a9bceb2b059dc24870882a71baece895fe430107 (patch) | |
tree | df54e088f349b1acf32e20d3819ee000ec0a0677 /llvm/unittests/IR/ConstantRangeTest.cpp | |
parent | 0873b9bef4e03b4cfc44a4946c11103c763055df (diff) | |
download | llvm-a9bceb2b059dc24870882a71baece895fe430107.zip llvm-a9bceb2b059dc24870882a71baece895fe430107.tar.gz llvm-a9bceb2b059dc24870882a71baece895fe430107.tar.bz2 |
[APInt] Stop using soft-deprecated constructors and methods in llvm. NFC.
Stop using APInt constructors and methods that were soft-deprecated in
D109483. This fixes all the uses I found in llvm, except for the APInt
unit tests which should still test the deprecated methods.
Differential Revision: https://reviews.llvm.org/D110807
Diffstat (limited to 'llvm/unittests/IR/ConstantRangeTest.cpp')
-rw-r--r-- | llvm/unittests/IR/ConstantRangeTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/unittests/IR/ConstantRangeTest.cpp b/llvm/unittests/IR/ConstantRangeTest.cpp index 5fde024..3a37b732 100644 --- a/llvm/unittests/IR/ConstantRangeTest.cpp +++ b/llvm/unittests/IR/ConstantRangeTest.cpp @@ -643,8 +643,8 @@ TEST_F(ConstantRangeTest, losslessUnsignedTruncationZeroext) { EnumerateConstantRanges(Bits, [&](const ConstantRange &CR) { unsigned MinBitWidth = CR.getActiveBits(); if (MinBitWidth == 0) { - EXPECT_TRUE(CR.isEmptySet() || (CR.isSingleElement() && - CR.getSingleElement()->isNullValue())); + EXPECT_TRUE(CR.isEmptySet() || + (CR.isSingleElement() && CR.getSingleElement()->isZero())); return; } if (MinBitWidth == Bits) @@ -1225,7 +1225,7 @@ TEST_F(ConstantRangeTest, SDiv) { return; // SignedMin / -1 is UB. - if (N1.isMinSignedValue() && N2.isAllOnesValue()) + if (N1.isMinSignedValue() && N2.isAllOnes()) return; APInt N = N1.sdiv(N2); @@ -1298,7 +1298,7 @@ TEST_F(ConstantRangeTest, URem) { return CR1.urem(CR2); }, [](const APInt &N1, const APInt &N2) -> Optional<APInt> { - if (N2.isNullValue()) + if (N2.isZero()) return None; return N1.urem(N2); }); @@ -1372,7 +1372,7 @@ TEST_F(ConstantRangeTest, SRem) { return CR1.srem(CR2); }, [](const APInt &N1, const APInt &N2) -> Optional<APInt> { - if (N2.isNullValue()) + if (N2.isZero()) return None; return N1.srem(N2); }); |