================
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -triple spirv64-intel %s -emit-llvm -o - | FileCheck %s
+
+// Test that function pointer casts properly handle address space conversions
+// on targets like spirv64-intel that use a non-default program address space.
+
+void foo() {}
+
+// CHECK-LABEL: define spir_func void @_Z21test_func_to_void_ptrv()
addrspace(9)
+void test_func_to_void_ptr() {
+ void *ptr = (void*)foo;
+ // CHECK: store ptr addrspace(4) addrspacecast (ptr addrspace(9) @_Z3foov
to ptr addrspace(4))
----------------
sarnex wrote:
Thanks for the quick review guys. Do you guys have any other comments? If not
I'd appreciate an approval :)
https://github.com/llvm/llvm-project/pull/186210
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits