aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 76190f1..49ec4f5 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -642,6 +642,18 @@ public:
/// @brief Return the signed version of the predicate.
static Predicate getSignedPredicate(Predicate pred);
+ /// For example, EQ->EQ, SLE->ULE, UGT->UGT, etc.
+ /// @returns the predicate that would be the result if the operand were
+ /// regarded as unsigned.
+ /// @brief Return the unsigned version of the predicate
+ Predicate getUnsignedPredicate() const {
+ return getUnsignedPredicate(getPredicate());
+ }
+
+ /// This is a static version that you can use without an instruction.
+ /// @brief Return the unsigned version of the predicate.
+ static Predicate getUnsignedPredicate(Predicate pred);
+
/// isEquality - Return true if this predicate is either EQ or NE. This also
/// tests for commutativity.
static bool isEquality(Predicate P) {