diff options
author | Harald van Dijk <harald.vandijk@codeplay.com> | 2024-04-16 15:21:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 15:21:09 +0100 |
commit | 60de56c743c414240b293a8b8ee10bc2129d7e10 (patch) | |
tree | 12ce76dd2345cff4217feaa90e794d162337063f /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 3d118f92081ea0c7048749dc5d08c8e8217be4eb (diff) | |
download | llvm-60de56c743c414240b293a8b8ee10bc2129d7e10.zip llvm-60de56c743c414240b293a8b8ee10bc2129d7e10.tar.gz llvm-60de56c743c414240b293a8b8ee10bc2129d7e10.tar.bz2 |
[ValueTracking] Restore isKnownNonZero parameter order. (#88873)
Prior to #85863, the required parameters of llvm::isKnownNonZero were
Value and DataLayout. After, they are Value, Depth, and SimplifyQuery,
where SimplifyQuery is implicitly constructible from DataLayout. The
change to move Depth before SimplifyQuery needed callers to be updated
unnecessarily, and as commented in #85863, we actually want Depth to be
after SimplifyQuery anyway so that it can be defaulted and the caller
does not need to specify it.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 22dbb31..e657872 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -2314,7 +2314,7 @@ static bool despeculateCountZeros(IntrinsicInst *CountZeros, // Bail if the value is never zero. Use &Op = CountZeros->getOperandUse(0); - if (isKnownNonZero(Op, /*Depth=*/0, *DL)) + if (isKnownNonZero(Op, *DL)) return false; // The intrinsic will be sunk behind a compare against zero and branch. |