[llvm] [NFC][AMDGPU] Replace direct arch comparison with `isAMDGCN()` (PR #131357)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 14 09:45:40 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 cbbcc3d13b7747be4587e36ddc0699587ff31904 fa677266d8dfb2c5a5583e484ef7d6f69fe64a69 --extensions cpp,h -- llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp llvm/lib/Target/AMDGPU/GCNSubtarget.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp llvm/tools/llvm-objdump/llvm-objdump.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index eadd57750b..a71731ecf8 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -161,9 +161,7 @@ public:
return isAmdHsaOS() || isMesaKernel(F);
}
- bool isGCN() const {
- return TargetTriple.isAMDGCN();
- }
+ bool isGCN() const { return TargetTriple.isAMDGCN(); }
bool isGCN3Encoding() const {
return GCN3Encoding;
``````````
</details>
https://github.com/llvm/llvm-project/pull/131357
More information about the llvm-commits
mailing list