[llvm] [InstCombine][CVP] Fold length-one memset with variable fill (PR #213240)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 9 10:40:18 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 -- llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.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/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
index 8ba7a4029..2d369dde0 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
@@ -2465,8 +2465,7 @@ static bool foldMulHigh(Instruction &I) {
/// Guard a memset whose nonconstant length is known to be either zero or one.
/// The following InstCombine pass can scalarize the length-one memset to a byte
/// store, including when the fill value is nonconstant.
-static bool foldMemSetWithSingleByteLength(Function &F,
- TargetLibraryInfo &TLI,
+static bool foldMemSetWithSingleByteLength(Function &F, TargetLibraryInfo &TLI,
AssumptionCache &AC,
DominatorTree &DT) {
SmallVector<MemSetInst *, 4> MemSets;
``````````
</details>
https://github.com/llvm/llvm-project/pull/213240
More information about the llvm-commits
mailing list