[clang] [Clang] Allow all address spaces to be converted to the default (PR #112248)

Alexey Bader via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 14 19:34:02 PDT 2024


================
@@ -721,7 +721,9 @@ class Qualifiers {
            // to implicitly cast into the default address space.
            (A == LangAS::Default &&
             (B == LangAS::cuda_constant || B == LangAS::cuda_device ||
-             B == LangAS::cuda_shared));
+             B == LangAS::cuda_shared)) ||
+           // Otherwise, assume the default address space is compatible.
+           (A == LangAS::Default);
----------------
bader wrote:

@jhuber6, I agree with you, but you might want to check with @AnastasiaStulova.

We had a couple of lengthy discussions about re-using OpenCL attributes in SYCL mode ([here](https://reviews.llvm.org/D80932) and [here](https://github.com/intel/llvm/pull/1039/files)), but if I recall it correctly the conclusion was that OpenCL attributes inherit OpenCL semantics in non-OpenCL modes as well. The solution for SYCL mode was adding new attributes ([review](https://reviews.llvm.org/D89909)).

@Naghasan, FYI.

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


More information about the cfe-commits mailing list