From: Roman Lebedev Date: Fri, 6 Nov 2020 07:40:25 +0000 (+0300) Subject: [IR] CmpInst: add isRelational() X-Git-Tag: llvmorg-13-init~6890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4f70d64547a1cf9a39e29dc4b70e53158df49fb;p=platform%2Fupstream%2Fllvm.git [IR] CmpInst: add isRelational() Since there's CmpInst::isEquality(), it only makes sense to have it's inverse for consistency. --- diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h index 563b9d9..2757548 100644 --- a/llvm/include/llvm/IR/InstrTypes.h +++ b/llvm/include/llvm/IR/InstrTypes.h @@ -899,6 +899,12 @@ public: /// Determine if this is an equals/not equals predicate. bool isEquality() const { return isEquality(getPredicate()); } + /// Return true if the predicate is relational (not EQ or NE). + static bool isRelational(Predicate P) { return !isEquality(P); } + + /// Return true if the predicate is relational (not EQ or NE). + bool isRelational() const { return !isEquality(); } + /// @returns true if the comparison is signed, false otherwise. /// Determine if this instruction is using a signed comparison. bool isSigned() const {