aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-03-06 13:12:55 +0100
committerNikita Popov <npopov@redhat.com>2023-03-06 13:16:27 +0100
commitaff18638591b40dbba51e9e9f75973a242bcb276 (patch)
tree379268625301f67c4f7c440c05094b769da3d216 /llvm/lib/IR/Constants.cpp
parentced0327dd4a380e1702dccbb4072fd99b201e22c (diff)
downloadllvm-aff18638591b40dbba51e9e9f75973a242bcb276.zip
llvm-aff18638591b40dbba51e9e9f75973a242bcb276.tar.gz
llvm-aff18638591b40dbba51e9e9f75973a242bcb276.tar.bz2
[IR] Remove ConstantExpr::getUMin() (NFC)
This is part of select constant expression removal. As there is only a single place where this is used, just expand it to explicit constant folding calls. (Normally we'd just use the IRBuilder here, but this isn't possible due to mergeUndefsWith use).
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 6e25e22..6a6209c 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2690,11 +2690,6 @@ Constant *ConstantExpr::getXor(Constant *C1, Constant *C2) {
return get(Instruction::Xor, C1, C2);
}
-Constant *ConstantExpr::getUMin(Constant *C1, Constant *C2) {
- Constant *Cmp = ConstantExpr::getICmp(CmpInst::ICMP_ULT, C1, C2);
- return getSelect(Cmp, C1, C2);
-}
-
Constant *ConstantExpr::getShl(Constant *C1, Constant *C2,
bool HasNUW, bool HasNSW) {
unsigned Flags = (HasNUW ? OverflowingBinaryOperator::NoUnsignedWrap : 0) |