[clang] [Clang][AMDGPU] Enable type-checking on __builtin_amdgcn_raw_ptr_buffer_atomic_{{add|fadd|fmin|fmax}} (PR #164824)

Juan Manuel Martinez CaamaƱo via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 24 07:36:10 PDT 2025


================
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -fsyntax-only -triple amdgcn -target-cpu gfx90a -verify %s -fcuda-is-device
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64 -aux-triple amdgcn -verify %s
+
+typedef _Float16 __attribute__((ext_vector_type(2))) float16x2_t;
----------------
jmmartinez wrote:

I'm using it as input and output for:

```cpp
  v2f16 = __builtin_amdgcn_raw_ptr_buffer_atomic_fadd_v2f16(v2f16, rsrc, offset, soffset, 0);
```

(the type-checking didn't complain surprisingly).

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


More information about the cfe-commits mailing list