[llvm] [ValueTracking] Handle `not` in `isImpliedCondition` (PR #85397)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 09:29:09 PDT 2024


================
@@ -8663,21 +8678,21 @@ std::optional<bool> llvm::isImpliedCondition(const Value *LHS, const Value *RHS,
     if (std::optional<bool> Imp =
             isImpliedCondition(LHS, RHS1, DL, LHSIsTrue, Depth + 1))
       if (*Imp == true)
-        return true;
+        return !InvertRHS;
----------------
goldsteinn wrote:

Its confusing enough I think it deserves a comment.

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


More information about the llvm-commits mailing list