aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Instructions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index cbcc0974e4..3a88b99074 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -467,6 +467,9 @@ public:
/// @brief Return the predicate for this instruction.
Predicate getPredicate() const { return Predicate(SubclassData); }
+ /// @brief Set the predicate for this instruction to the specified value.
+ void setPredicate(Predicate P) { SubclassData = P; }
+
/// For example, EQ -> NE, UGT -> ULE, SLT -> SGE, etc.
/// @returns the inverse predicate for the instruction's current predicate.
/// @brief Return the inverse of the instruction's predicate.
@@ -609,6 +612,9 @@ public:
/// @brief Return the predicate for this instruction.
Predicate getPredicate() const { return Predicate(SubclassData); }
+ /// @brief Set the predicate for this instruction to the specified value.
+ void setPredicate(Predicate P) { SubclassData = P; }
+
/// For example, OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
/// @returns the inverse predicate for the instructions current predicate.
/// @brief Return the inverse of the predicate