[llvm] [ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (PR #85863)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 08:21:38 PDT 2024


================
@@ -2314,7 +2314,7 @@ static bool despeculateCountZeros(IntrinsicInst *CountZeros,
 
   // Bail if the value is never zero.
   Use &Op = CountZeros->getOperandUse(0);
-  if (isKnownNonZero(Op, *DL))
+  if (isKnownNonZero(Op, /*Depth=*/0, SimplifyQuery(*DL)))
----------------
goldsteinn wrote:

Can just be `Op, /*Depth=*/0, *DL` no?

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


More information about the llvm-commits mailing list