aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-02-01 16:38:14 +0000
committerDan Gohman <gohman@apple.com>2010-02-01 16:38:14 +0000
commitd75ff3104c2298ecb4abb18fb4bfc3f20a9099f8 (patch)
tree8de32453e65be31451f09fd4fd1a7b075d7c30ca /lib/VMCore/Constants.cpp
parent2544a1de666ad7197c755b4dab6419f42df01f65 (diff)
Add a getNUWMul function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r--lib/VMCore/Constants.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index b1c942c214..ad654ee796 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -656,6 +656,11 @@ Constant* ConstantExpr::getNSWSub(Constant* C1, Constant* C2) {
OverflowingBinaryOperator::NoSignedWrap);
}
+Constant* ConstantExpr::getNUWMul(Constant* C1, Constant* C2) {
+ return getTy(C1->getType(), Instruction::Mul, C1, C2,
+ OverflowingBinaryOperator::NoUnsignedWrap);
+}
+
Constant* ConstantExpr::getNSWMul(Constant* C1, Constant* C2) {
return getTy(C1->getType(), Instruction::Mul, C1, C2,
OverflowingBinaryOperator::NoSignedWrap);