[llvm] [SimplifyCFG] Sink common code of cond preds (PR #173353)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 23 02:49:59 PST 2025
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/Utils/SimplifyCFG.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/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index e880ba547..f294dcd87 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -2400,9 +2400,9 @@ static void sinkLastInstruction(ArrayRef<BasicBlock *> Blocks,
/// Try to sink common instructions from predecessors of SinkBB into SinkBB.
static bool trySinkFromPredsIntoBB(BasicBlock *SinkBB,
- SmallVectorImpl<BasicBlock *> &Preds,
- bool HaveNonUnconditionalPredecessors,
- DomTreeUpdater *DTU) {
+ SmallVectorImpl<BasicBlock *> &Preds,
+ bool HaveNonUnconditionalPredecessors,
+ DomTreeUpdater *DTU) {
if (Preds.size() < 2)
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/173353
More information about the llvm-commits
mailing list