[llvm] Prevent LCSSA from creating phi operands for lifetime intrinsics. (PR #172929)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 17 13:49:05 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 h,cpp -- llvm/include/llvm/Analysis/LoopInfo.h llvm/include/llvm/Transforms/Utils/LoopUtils.h llvm/lib/Analysis/LoopInfo.cpp llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp llvm/lib/Transforms/Utils/LCSSA.cpp llvm/lib/Transforms/Utils/LoopPeel.cpp llvm/lib/Transforms/Utils/LoopUnroll.cpp llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp llvm/lib/Transforms/Vectorize/LoopVectorize.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/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
index 3757d2be3..deb544d2f 100644
--- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
@@ -587,9 +587,9 @@ llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI,
assert((!ULO.Runtime || canHaveUnrollRemainder(L)) &&
"Can't runtime unroll if loop contains a convergent operation.");
- bool EpilogProfitability =
- UnrollRuntimeEpilog.getNumOccurrences() ? UnrollRuntimeEpilog
- : isEpilogProfitable(L);
+ bool EpilogProfitability = UnrollRuntimeEpilog.getNumOccurrences()
+ ? UnrollRuntimeEpilog
+ : isEpilogProfitable(L);
if (ULO.Runtime &&
!UnrollRuntimeLoopRemainder(
L, ULO.Count, ULO.AllowExpensiveTripCount, EpilogProfitability,
``````````
</details>
https://github.com/llvm/llvm-project/pull/172929
More information about the llvm-commits
mailing list