[clang] [CIR][AMDGPU] Add support for AMDGCN grid_size builtins (PR #230798)

Arseniy Obolenskiy via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 11 23:51:56 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();
----------------
aobolensk wrote:

Sure, done

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


More information about the cfe-commits mailing list