[llvm] [AMDGPU] Add waterfall intrinsics (PR #192409)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 09:24:42 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/AMDGPUInsertWaterfall.cpp llvm/lib/Target/AMDGPU/AMDGPUInsertWaterfall.h llvm/lib/Target/AMDGPU/AMDGPU.h llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp llvm/lib/Target/AMDGPU/SIISelLowering.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/AMDGPUInsertWaterfall.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInsertWaterfall.cpp
index a7e1d97c3..60b6997de 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInsertWaterfall.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInsertWaterfall.cpp
@@ -1,4 +1,5 @@
-//===- AMDGPUInsertWaterfall.cpp - insert waterfall loops at intrinsic markers -===//
+//===- AMDGPUInsertWaterfall.cpp - insert waterfall loops at intrinsic markers
+//-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
index 3cabd3adc..fb212e685 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
@@ -98,8 +98,8 @@ public:
 
   // Combine support to remove amdgcn_waterfall_readfirstlane or
   // amdgcn_waterfall_begin intrinsics if the index is determined to be
-  // uniform. The AMDGPUInsertWaterfall pass can handle their removal and in some
-  // cases remove the waterfall altogether
+  // uniform. The AMDGPUInsertWaterfall pass can handle their removal and in
+  // some cases remove the waterfall altogether
   bool matchRmUniformWF(MachineInstr &MI,
                         RmUniformWFMatchInfo &MatchInfo) const;
   void applyRmUniformWF(MachineInstr &MI,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index f6a24ad1f..55db73c4f 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -25,6 +25,7 @@
 #include "AMDGPUHazardLatency.h"
 #include "AMDGPUIGroupLP.h"
 #include "AMDGPUISelDAGToDAG.h"
+#include "AMDGPUInsertWaterfall.h"
 #include "AMDGPULowerVGPREncoding.h"
 #include "AMDGPUMacroFusion.h"
 #include "AMDGPUNextUseAnalysis.h"
@@ -53,7 +54,6 @@
 #include "SIFixVGPRCopies.h"
 #include "SIFoldOperands.h"
 #include "SIFormMemoryClauses.h"
-#include "AMDGPUInsertWaterfall.h"
 #include "SILoadStoreOptimizer.h"
 #include "SILowerControlFlow.h"
 #include "SILowerSGPRSpills.h"

``````````

</details>


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


More information about the llvm-commits mailing list