mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
add some static icmpinst predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8dcf751310
commit
c2bfadb9df
@ -640,24 +640,34 @@ public:
|
|||||||
/// @brief Return the signed version of the predicate.
|
/// @brief Return the signed version of the predicate.
|
||||||
static Predicate getSignedPredicate(Predicate pred);
|
static Predicate getSignedPredicate(Predicate pred);
|
||||||
|
|
||||||
/// This also tests for commutativity. If isEquality() returns true then
|
/// isEquality - Return true if this predicate is either EQ or NE. This also
|
||||||
/// the predicate is also commutative.
|
/// tests for commutativity.
|
||||||
/// @returns true if the predicate of this instruction is EQ or NE.
|
static bool isEquality(Predicate P) {
|
||||||
/// @brief Determine if this is an equality predicate.
|
return P == ICMP_EQ || P == ICMP_NE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// isEquality - Return true if this predicate is either EQ or NE. This also
|
||||||
|
/// tests for commutativity.
|
||||||
bool isEquality() const {
|
bool isEquality() const {
|
||||||
return SubclassData == ICMP_EQ || SubclassData == ICMP_NE;
|
return isEquality(getPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @returns true if the predicate of this ICmpInst is commutative
|
/// @returns true if the predicate of this ICmpInst is commutative
|
||||||
/// @brief Determine if this relation is commutative.
|
/// @brief Determine if this relation is commutative.
|
||||||
bool isCommutative() const { return isEquality(); }
|
bool isCommutative() const { return isEquality(); }
|
||||||
|
|
||||||
/// @returns true if the predicate is relational (not EQ or NE).
|
/// isRelational - Return true if the predicate is relational (not EQ or NE).
|
||||||
/// @brief Determine if this a relational predicate.
|
///
|
||||||
bool isRelational() const {
|
bool isRelational() const {
|
||||||
return !isEquality();
|
return !isEquality();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// isRelational - Return true if the predicate is relational (not EQ or NE).
|
||||||
|
///
|
||||||
|
static bool isRelational(Predicate P) {
|
||||||
|
return !isEquality(P);
|
||||||
|
}
|
||||||
|
|
||||||
/// @returns true if the predicate of this ICmpInst is signed, false otherwise
|
/// @returns true if the predicate of this ICmpInst is signed, false otherwise
|
||||||
/// @brief Determine if this instruction's predicate is signed.
|
/// @brief Determine if this instruction's predicate is signed.
|
||||||
bool isSignedPredicate() const { return isSignedPredicate(getPredicate()); }
|
bool isSignedPredicate() const { return isSignedPredicate(getPredicate()); }
|
||||||
|
Loading…
Reference in New Issue
Block a user