[llvm] [AMDGPU] Allow 0 as min./max. of amdgpu-waves-per-eu (PR #138284)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 2 07:25:09 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 HEAD~1 HEAD --extensions cpp,h -- llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
index 4212d97eb..a966e485e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -201,8 +201,7 @@ std::pair<unsigned, unsigned> AMDGPUSubtarget::getEffectiveWavesPerEU(
       return Default;
   }
   // Requested maximum must not violate subtarget's specifications.
-  if (RequestedWavesPerEU.second &&
-      RequestedWavesPerEU.second > Default.second)
+  if (RequestedWavesPerEU.second && RequestedWavesPerEU.second > Default.second)
     return Default;
 
   // Replace unspecified bounds in the request with the default bounds.

``````````

</details>


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


More information about the llvm-commits mailing list