summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/APIntTest.cpp
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-04-23 12:02:07 +0000
committerRenato Golin <renato.golin@linaro.org>2017-04-23 12:02:07 +0000
commitcc4a9120f6944a48d1df4c676ee77af3904b4442 (patch)
tree6dd41ba00fdfbb394e8dc3fd2107ede0cea9db8b /llvm/unittests/ADT/APIntTest.cpp
parent137c44fe64ad900e234e38b8c61f5b972b58e051 (diff)
downloadbcm5719-llvm-cc4a9120f6944a48d1df4c676ee77af3904b4442.tar.gz
bcm5719-llvm-cc4a9120f6944a48d1df4c676ee77af3904b4442.zip
Revert "[APInt] Add ashrInPlace method and implement ashr using it. Also fix a bug in the shift by BitWidth handling."
This reverts commit r301094, as it broke all ARM self-hosting bots. PR32754. llvm-svn: 301110
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
-rw-r--r--llvm/unittests/ADT/APIntTest.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index 6b889bf2dfd..5d3afe9a159 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -288,7 +288,7 @@ TEST(APIntTest, i1) {
EXPECT_EQ(zero, one.shl(1));
EXPECT_EQ(one, one.shl(0));
EXPECT_EQ(zero, one.lshr(1));
- EXPECT_EQ(one, one.ashr(1));
+ EXPECT_EQ(zero, one.ashr(1));
// Rotates.
EXPECT_EQ(one, one.rotl(0));
@@ -2024,24 +2024,6 @@ TEST(APIntTest, LogicalRightShift) {
EXPECT_EQ(0, neg_one.lshr(128));
}
-TEST(APIntTest, ArithmeticRightShift) {
- // Ensure we handle large shifts of multi-word.
- const APInt signmin32(APInt::getSignedMinValue(32));
- EXPECT_TRUE(signmin32.ashr(32).isAllOnesValue());
-
- // Ensure we handle large shifts of multi-word.
- const APInt umax32(APInt::getSignedMaxValue(32));
- EXPECT_EQ(0, umax32.ashr(32));
-
- // Ensure we handle large shifts of multi-word.
- const APInt signmin128(APInt::getSignedMinValue(128));
- EXPECT_TRUE(signmin128.ashr(128).isAllOnesValue());
-
- // Ensure we handle large shifts of multi-word.
- const APInt umax128(APInt::getSignedMaxValue(128));
- EXPECT_EQ(0, umax128.ashr(128));
-}
-
TEST(APIntTest, LeftShift) {
APInt i256(APInt::getLowBitsSet(256, 2));
OpenPOWER on IntegriCloud