[llvm] IR: introduce CmpInst::PredicateSign (PR #116867)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 12:14:49 PST 2024


================
@@ -722,6 +722,31 @@ class CmpInst : public Instruction {
                               force_iteration_on_noniterable_enum);
   }
 
+  /// An abstraction over a floating-point predicate, and a pack of an integer
+  /// predicate with samesign information. The getPredicateSign() family of
+  /// functions in ICmpInst construct and return this type. It is also implictly
+  /// constructed with a Predicate, dropping samesign information.
+  class PredicateSign {
+    Predicate Pred;
+    std::optional<bool> HasSameSign;
----------------
arsenm wrote:

If it's useful for this theoretically assertion, you can add it in with that theoretical assertion? 

https://github.com/llvm/llvm-project/pull/116867


More information about the llvm-commits mailing list