================
@@ -866,7 +866,8 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo(
assert(inserted && "Recursively being processed?");
// Compute ABI information.
- if (CC == llvm::CallingConv::SPIR_KERNEL) {
+ if (info.getCC() == CC_DeviceKernel &&
+ (CC == llvm::CallingConv::SPIR_KERNEL || CC == llvm::CallingConv::C)) {
----------------
sarnex wrote:
I wonder if this would work,
```suggestion
(CC == llvm::CallingConv::SPIR_KERNEL ||
getContext().getLangOpts().OpenCL)) {
```
I feel like if checking the generic C callingconv is a bit risky, my
understanding is we only want to call `computeSPIRKernelABIInfo` for non-SPIR
kernels if we are generating OpenCL
https://github.com/llvm/llvm-project/pull/191090
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits