[llvm] [AMDGPU] Fix SSID merge in SIMemoryLegalizer to use smallest inclusiv… (PR #208300)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 07:06:22 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/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.h llvm/lib/Target/AMDGPU/SIMemoryLegalizer.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/Target/AMDGPU/AMDGPUMachineModuleInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.h
index 5062fd8f0..eb77f11ad 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.h
@@ -122,8 +122,7 @@ public:
 
     // Returns {level, isOneAS} for a given scope, or nullopt if unsupported.
     auto GetLevelAndOneAS =
-        [&](SyncScope::ID SSID)
-        -> std::optional<std::pair<unsigned, bool>> {
+        [&](SyncScope::ID SSID) -> std::optional<std::pair<unsigned, bool>> {
       for (unsigned I = 0; I < std::size(CrossAS); ++I) {
         if (CrossAS[I] == SSID)
           return std::make_pair(I, false);

``````````

</details>


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


More information about the llvm-commits mailing list