aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/InstrTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/InstrTypes.h')
-rw-r--r--include/llvm/InstrTypes.h12
1 files changed, 12 insertions, 0 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 {