summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/APIntTest.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-24 05:38:26 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-24 05:38:26 +0000
commitfc03d2d21f9f364b2d5ab41f42625a1c98eab351 (patch)
treed30fb88f74ee5aace8857b28b2ad021ba79f544d /llvm/unittests/ADT/APIntTest.cpp
parent4bac44c8054f30ace47088d7a22e992c02e6c12b (diff)
downloadbcm5719-llvm-fc03d2d21f9f364b2d5ab41f42625a1c98eab351.tar.gz
bcm5719-llvm-fc03d2d21f9f364b2d5ab41f42625a1c98eab351.zip
[APInt] Make behavior of ashr by BitWidth consistent between single and multi word.
Previously single word would always return 0 regardless of the original sign. Multi word would return all 0s or all 1s based on the original sign. Now single word takes into account the sign as well. llvm-svn: 301159
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
-rw-r--r--llvm/unittests/ADT/APIntTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index 1e20ebb320c..e0a53a56455 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(zero, one.ashr(1));
+ EXPECT_EQ(one, one.ashr(1));
// Rotates.
EXPECT_EQ(one, one.rotl(0));
OpenPOWER on IntegriCloud