aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-01-28 03:48:02 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-01-28 03:48:02 +0000
commit4189a538e4ae10e6ed359b07cdcc96fd0822c811 (patch)
tree7bec3284da2ad606d0a1fec9d5e75fd5db2bab30 /include/llvm/Instructions.h
parent25feae555d7c50c35a156373fa79ce50453746fd (diff)
downloadexternal_llvm-4189a538e4ae10e6ed359b07cdcc96fd0822c811.zip
external_llvm-4189a538e4ae10e6ed359b07cdcc96fd0822c811.tar.gz
external_llvm-4189a538e4ae10e6ed359b07cdcc96fd0822c811.tar.bz2
Handle some more combinations of extend and icmp. Fixes PR1940.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46431 91177308-0d34-0410-b5e6-96231b3b80d8
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) {