[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 31 15:57:17 PDT 2024
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 cf3464bbb796d492bcd4e764ada945304e0c874f 137659649078fe978fb9d7d262df9b7a512d2770 --extensions cpp,h -- llvm/lib/Target/AMDGPU/AMDGPUExpandPseudoIntrinsics.cpp llvm/lib/Target/AMDGPU/AMDGPU.h llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUExpandPseudoIntrinsics.cpp b/llvm/lib/Target/AMDGPU/AMDGPUExpandPseudoIntrinsics.cpp
index faa23bb855..ca1d0bad11 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUExpandPseudoIntrinsics.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUExpandPseudoIntrinsics.cpp
@@ -33,14 +33,14 @@ static inline PreservedAnalyses expandWaveSizeIntrinsic(const GCNSubtarget &ST,
return PreservedAnalyses::all();
for (auto &&U : WaveSize->users())
- U->replaceAllUsesWith(ConstantInt::get(WaveSize->getReturnType(),
- ST.getWavefrontSize()));
+ U->replaceAllUsesWith(
+ ConstantInt::get(WaveSize->getReturnType(), ST.getWavefrontSize()));
return PreservedAnalyses::none();
}
PreservedAnalyses
- AMDGPUExpandPseudoIntrinsicsPass::run(Module &M, ModuleAnalysisManager &) {
+AMDGPUExpandPseudoIntrinsicsPass::run(Module &M, ModuleAnalysisManager &) {
if (auto WS = M.getFunction("llvm.amdgcn.wavefrontsize"))
return expandWaveSizeIntrinsic(TM.getSubtarget<GCNSubtarget>(*WS), WS);
``````````
</details>
https://github.com/llvm/llvm-project/pull/114481
More information about the cfe-commits
mailing list