[llvm] [InstCombine] Drop alignment assumptions more aggressively (PR #196060)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 05:52:30 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/include/llvm/Analysis/ValueTracking.h llvm/include/llvm/Analysis/WithCache.h llvm/include/llvm/IR/IRBuilder.h llvm/include/llvm/Transforms/InstCombine/InstCombiner.h llvm/lib/Analysis/ValueTracking.cpp llvm/lib/IR/IRBuilder.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h
index a354dc6a6..6aaea53e3 100644
--- a/llvm/include/llvm/Analysis/ValueTracking.h
+++ b/llvm/include/llvm/Analysis/ValueTracking.h
@@ -58,12 +58,13 @@ constexpr unsigned MaxLookupSearchDepth = 10;
/// where V is a vector, the known zero and known one values are the
/// same width as the vector element, and the bit is set only if it is true
/// for all of the elements in the vector.
-LLVM_ABI void
-computeKnownBits(const Value *V, KnownBits &Known, const DataLayout &DL,
- AssumptionCache *AC = nullptr,
- const Instruction *CxtI = nullptr,
- const DominatorTree *DT = nullptr, bool UseInstrInfo = true,
- bool AllowEphemerals = true, unsigned Depth = 0);
+LLVM_ABI void computeKnownBits(const Value *V, KnownBits &Known,
+ const DataLayout &DL,
+ AssumptionCache *AC = nullptr,
+ const Instruction *CxtI = nullptr,
+ const DominatorTree *DT = nullptr,
+ bool UseInstrInfo = true,
+ bool AllowEphemerals = true, unsigned Depth = 0);
template <class T>
void computeKnownBits(const Value *, KnownBits &, const DataLayout &,
@@ -97,8 +98,7 @@ void computeKnownBits(const Value *, const APInt &, const SimplifyQuery &, T,
// The original declaration is in "llvm/Analysis/WithCache.h"
LLVM_ABI KnownBits computeKnownBits(const Value *V, const SimplifyQuery &Q,
- bool AllowEphemerals,
- unsigned Depth);
+ bool AllowEphemerals, unsigned Depth);
LLVM_ABI void computeKnownBits(const Value *V, KnownBits &Known,
const SimplifyQuery &Q, bool AllowEphemerals,
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index a382307b2..c65cbe314 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1430,8 +1430,7 @@ static void computeKnownBitsFromOperator(const Operator *I,
const APInt &DemandedElts,
KnownBits &Known,
const SimplifyQuery &Q,
- bool AllowEphemerals,
- unsigned Depth) {
+ bool AllowEphemerals, unsigned Depth) {
unsigned BitWidth = Known.getBitWidth();
KnownBits Known2(BitWidth);
``````````
</details>
https://github.com/llvm/llvm-project/pull/196060
More information about the llvm-commits
mailing list