[llvm] [ValueTracking][NFC] move isKnownInversion to ValueTracking (PR #95321)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 22:41:43 PDT 2024


================
@@ -136,6 +136,13 @@ bool isKnownNonZero(const Value *V, const SimplifyQuery &Q, unsigned Depth = 0);
 bool isKnownNegation(const Value *X, const Value *Y, bool NeedNSW = false,
                      bool AllowPoison = true);
 
+/// Return true iff:
+/// 1. X is poison implies Y is poison.
+/// 2. X is true implies Y is false.
+/// 3. X is false implies Y is true.
+/// Otherwise, return false.
+bool isKnownInversion(Value *X, Value *Y);
----------------
dtcxzyw wrote:

```suggestion
bool isKnownInversion(const Value *X, const Value *Y);
```

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


More information about the llvm-commits mailing list