[llvm] [AMDGPU] Identify vector idiom to unlock SROA (PR #156791)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 19:56:55 PDT 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,h -- llvm/lib/Target/AMDGPU/AMDGPUVectorIdiom.cpp llvm/lib/Target/AMDGPU/AMDGPUVectorIdiom.h llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
``````````

: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/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 2b3168a80..c569a6a25 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -978,8 +978,8 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
           // We only want to run this with O2 or higher since inliner and SROA
           // don't run in O1.
           if (Level != OptimizationLevel::O1) {
-            PM.addPass(
-                createModuleToFunctionPassAdaptor(AMDGPUVectorIdiomCombinePass()));
+            PM.addPass(createModuleToFunctionPassAdaptor(
+                AMDGPUVectorIdiomCombinePass()));
             PM.addPass(
                 createModuleToFunctionPassAdaptor(InferAddressSpacesPass()));
           }

``````````

</details>


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


More information about the llvm-commits mailing list