[clang] [CIR][AMDGPU] Add support for AMDGCN grid_size builtins (PR #230798)
Steffen Larsen via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 11 23:41:12 PDT 2026
================
@@ -84,3 +84,21 @@ __device__ float test_logb(float x) {
// OGCG: load float, ptr addrspace(4) %{{.*}}
// OGCG: call contract{{.*}} @llvm.fabs.f32
// OGCG: fcmp contract one float %{{.*}}, +inf
+
+__device__ unsigned test_grid_size_x() {
+ return __builtin_amdgcn_grid_size_x();
----------------
steffenlarsen wrote:
For the sake of coverage, could we also test the other dimensions?
https://github.com/llvm/llvm-project/pull/230798
More information about the cfe-commits
mailing list