aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/InstrTypes.h12
-rw-r--r--include/llvm/Instructions.h8
2 files changed, 12 insertions, 8 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index 9e9052c..6b84857 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -718,6 +718,18 @@ public:
/// @brief Determine if this is an equals/not equals predicate.
bool isEquality();
+ /// @returns true if the comparison is signed, false otherwise.
+ /// @brief Determine if this instruction is using a signed comparison.
+ bool isSigned() const {
+ return isSigned(getPredicate());
+ }
+
+ /// @returns true if the comparison is unsigned, false otherwise.
+ /// @brief Determine if this instruction is using an unsigned comparison.
+ bool isUnsigned() const {
+ return isUnsigned(getPredicate());
+ }
+
/// This is just a convenience.
/// @brief Determine if this is true when both operands are the same.
bool isTrueWhenEqual() const {
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 43f0929..1e2c93f 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -693,14 +693,6 @@ public:
return !isEquality(P);
}
- /// @returns true if the predicate of this ICmpInst is signed, false otherwise
- /// @brief Determine if this instruction's predicate is signed.
- bool isSignedPredicate() const { return isSignedPredicate(getPredicate()); }
-
- /// @returns true if the predicate provided is signed, false otherwise
- /// @brief Determine if the predicate is signed.
- static bool isSignedPredicate(Predicate pred);
-
/// Initialize a set of values that all satisfy the predicate with C.
/// @brief Make a ConstantRange for a relation with a constant value.
static ConstantRange makeConstantRange(Predicate pred, const APInt &C);