[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 08:31:24 PST 2025


================
@@ -33,6 +33,13 @@
 #define __DEVICE__ static __device__ inline __attribute__((always_inline))
 #endif
 
+#pragma push_macro("__PRIVATE_AS")
+
+#ifdef __SPIRV__
+#define __PRIVATE_AS __attribute__((address_space(0)))
+#else
+#define __PRIVATE_AS __attribute__((address_space(5)))
+#endif
----------------
arsenm wrote:

```suggestion
#define __PRIVATE_AS __attribute__((opencl_private))
```

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


More information about the cfe-commits mailing list