[llvm-branch-commits] [llvm] [CodeGen][LSR][NPM] Make LoopStrengthReduce pass preserve LCSSA (PR #176692)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Jan 18 21:52:54 PST 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/Scalar/LoopStrengthReduce.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/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 91d2f65a0..079168966 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -7135,7 +7135,7 @@ PreservedAnalyses LoopStrengthReducePass::run(Loop &L, LoopAnalysisManager &AM,
   if (!ReduceLoopStrength(&L, AM.getResult<IVUsersAnalysis>(L, AR), AR.SE,
                           AR.DT, AR.LI, AR.TTI, AR.AC, AR.TLI, AR.MSSA))
     return PreservedAnalyses::all();
-  
+
   // TODO: Remove this once the LSR handles LCSSA preservation completely.
   if (auto *OuterLoop = L.getOutermostLoop())
     formLCSSARecursively(*OuterLoop, AR.DT, &AR.LI, &AR.SE);

``````````

</details>


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


More information about the llvm-branch-commits mailing list