[llvm] [ValueTracking] Respect `samesign` flag in `isKnownInversion` (PR #112390)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 10:49:38 PDT 2024


================
@@ -8526,14 +8526,26 @@ bool llvm::isKnownInversion(const Value *X, const Value *Y) {
       !match(Y, m_c_ICmp(Pred2, m_Specific(A), m_Value(C))))
     return false;
 
+  // If they are only differ in predicate. They must both have samesign flag or
----------------
nikic wrote:

```suggestion
  // If they only differ in predicate. They must both have samesign flag or
```

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


More information about the llvm-commits mailing list