================
@@ -5402,6 +5407,10 @@ LangAS CodeGenModule::GetGlobalConstantAddressSpace() 
const {
     // UniformConstant storage class is not viable as pointers to it may not be
     // casted to Generic pointers which are used to model HIP's "flat" 
pointers.
     return LangAS::cuda_device;
+  if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV())
+    // OpenMP SPIR-V global constants should map to UniformConstant, different
+    // from the HIPSPV case above.
+    return LangAS::opencl_constant;
----------------
sarnex wrote:

Yeah I hit something similar when trying to use `addrspace(4)` for generic. For 
constants it seems to be working okay for now, hopefully it's okay with you if 
I try this for now and then extend the solution if a problem comes up.

https://github.com/llvm/llvm-project/pull/134399
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to