[llvm] VT: squash compile-time regression from 66badf2 (PR #122700)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 06:41:19 PST 2025


================
@@ -53,6 +53,12 @@ class CmpPredicate {
   static std::optional<CmpPredicate> getMatching(CmpPredicate A,
                                                  CmpPredicate B);
 
+  /// Attempts to return a signed CmpInst::Predicate from the CmpPredicate. If
+  /// the CmpPredicate has samesign, return ICmpInst::getSignedPredicate,
+  /// dropping samesign information. Otherwise, return the predicate, dropping
+  /// samesign information.
+  CmpInst::Predicate getSignedPredicate() const;
----------------
nikic wrote:

I'm a bit concerned this will cause confusion because people think it works like `ICmpInst::getSignedPredicate()`, i.e. always return signed predicate.

I'm not sure what a good name for this to clarify the difference. Maybe `getPreferredSignedPredicate()`?

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


More information about the llvm-commits mailing list