llvm-project
42750194 - [clang][SPIRV] Don't addrspacecast nullptr for function pointer types (#167379)

Commit
71 days ago
[clang][SPIRV] Don't addrspacecast nullptr for function pointer types (#167379) According to the [spec](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_function_pointers.asciidoc), it is illegal to addrspacecast to the generic AS, so use the function pointer AS for null constants. "It is illegal to use Function Pointer as 'Pointer' argument of OpPtrCastToGeneric." This was found when compiling the OpenMP Device RTL for SPIR-V. Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
Author
Parents
Loading