llvm
da093ea5 - [SYCL][ESIMD] Fix regcall ReturnValue address space on SPIR targets

Commit
13 days ago
[SYCL][ESIMD] Fix regcall ReturnValue address space on SPIR targets Regression caused by 0dd21ad1c6a3 which removed address space casts from CreateIRTemp assuming temporaries are only used for loads/stores. However, on SPIR targets, regcall functions (like invoke_simd helpers) may call spir_func functions with different calling conventions. When the callee uses sret with generic address space (ptr addrspace(4)), the ReturnValue temporary must have the correct address space: - invoke_simd's simd_func_call_helper uses x86_regcallcc - It calls user functions with spir_func that expect sret with ptr addrspace(4) - Without address space cast, ReturnValue is ptr (private AS 0) - This causes: "Calling a function with a bad signature!" This patch adds a targeted fix: only apply address space cast for regcall functions on SPIR/SPIRV targets, implementing CreateIRTemp inline to avoid modifying headers. Fixes: sycl/test/invoke_simd/return-type-struct.cpp
Author
Committer
Parents
Loading