aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/IR/ConstantsTest.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-11-14 09:25:14 +0100
committerGitHub <noreply@github.com>2023-11-14 09:25:14 +0100
commit56c1d30183e156365f7057f5945b2bc48fdb32e7 (patch)
tree0d0886c0e43529c72a31c6f26a30d3e004528132 /llvm/unittests/IR/ConstantsTest.cpp
parent9cb1673fa5d267148ac81ee31b37f1d2f7c0f2b8 (diff)
downloadllvm-56c1d30183e156365f7057f5945b2bc48fdb32e7.zip
llvm-56c1d30183e156365f7057f5945b2bc48fdb32e7.tar.gz
llvm-56c1d30183e156365f7057f5945b2bc48fdb32e7.tar.bz2
[IR] Remove support for lshr/ashr constant expressions (#71955)
Remove support for the lshr and ashr constant expressions. All places creating them have been removed beforehand, so this just removes the APIs and uses of these constant expressions in tests. This is part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
Diffstat (limited to 'llvm/unittests/IR/ConstantsTest.cpp')
-rw-r--r--llvm/unittests/IR/ConstantsTest.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/unittests/IR/ConstantsTest.cpp b/llvm/unittests/IR/ConstantsTest.cpp
index cbe210d..314264b 100644
--- a/llvm/unittests/IR/ConstantsTest.cpp
+++ b/llvm/unittests/IR/ConstantsTest.cpp
@@ -62,14 +62,6 @@ TEST(ConstantsTest, Integer_i1) {
// @i = constant i1 true
EXPECT_EQ(One, ConstantExpr::getShl(One, Zero));
- // @j = constant i1 lshr(i1 1, i1 1) ; poison
- // @j = constant i1 poison
- EXPECT_EQ(Poison, ConstantExpr::getLShr(One, One));
-
- // @m = constant i1 ashr(i1 1, i1 1) ; poison
- // @m = constant i1 poison
- EXPECT_EQ(Poison, ConstantExpr::getAShr(One, One));
-
// @n = constant i1 mul(i1 -1, i1 1)
// @n = constant i1 true
EXPECT_EQ(One, ConstantExpr::getMul(NegOne, One));
@@ -228,12 +220,6 @@ TEST(ConstantsTest, AsInstructionsTest) {
CHECK(ConstantExpr::getShl(P0, P0, true), "shl nuw i32 " P0STR ", " P0STR);
CHECK(ConstantExpr::getShl(P0, P0, false, true),
"shl nsw i32 " P0STR ", " P0STR);
- CHECK(ConstantExpr::getLShr(P0, P0, false), "lshr i32 " P0STR ", " P0STR);
- CHECK(ConstantExpr::getLShr(P0, P0, true),
- "lshr exact i32 " P0STR ", " P0STR);
- CHECK(ConstantExpr::getAShr(P0, P0, false), "ashr i32 " P0STR ", " P0STR);
- CHECK(ConstantExpr::getAShr(P0, P0, true),
- "ashr exact i32 " P0STR ", " P0STR);
CHECK(ConstantExpr::getICmp(CmpInst::ICMP_EQ, P0, P4),
"icmp eq i32 " P0STR ", " P4STR);