[llvm] [PeepholeOptimizer] Add REG_SEQUENCE subregister use folding (PR #205795)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 05:14:08 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/CodeGen/TargetInstrInfo.h llvm/lib/CodeGen/PeepholeOptimizer.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.h --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/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
index 8ac336e8d..d9c3823be 100644
--- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp
+++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp
@@ -161,8 +161,10 @@ STATISTIC(NumSelects, "Number of selects optimized");
 STATISTIC(NumUncoalescableCopies, "Number of uncoalescable copies optimized");
 STATISTIC(NumRewrittenCopies, "Number of copies rewritten");
 STATISTIC(NumNAPhysCopies, "Number of non-allocatable physical copies removed");
-STATISTIC(NumRegSeqUsesRewritten, "Number of REG_SEQUENCE subregister uses rewritten");
-STATISTIC(NumRegSeqEliminated, "Number of REG_SEQUENCE instructions eliminated");
+STATISTIC(NumRegSeqUsesRewritten,
+          "Number of REG_SEQUENCE subregister uses rewritten");
+STATISTIC(NumRegSeqEliminated,
+          "Number of REG_SEQUENCE instructions eliminated");
 
 namespace {
 

``````````

</details>


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


More information about the llvm-commits mailing list