================
----------------
michele-scandale wrote:
I did notice the issue on the first command line where `aux-triple` is
`x86_64-unknown-linux-gnu`.
In there you can clearly see that there is an issue since
`VAListAddr.getElementType()->dump()` at the entry of `emitVoidPtrDirectVAArg `
produces `%struct.__va_list_tag = type { i32, i32, ptr addrspace(4), ptr
addrspace(4) }`.
> We could modify SPIRVABIInfo::EmitVAArg()
> ([here](https://github.com/llvm/llvm-project/blob/6fd0aae1d6f59bf0b0b1fdbdbf217ccb6662d32c/clang/lib/CodeGen/Targets/SPIR.cpp#L204-L210))
> to implement target (and auxiliary target) dependent behavior. I think that
> would be inline with what you are suggesting.
Yes, that's would make sense to me. In this change the SPIRV target properties
are adjusted based on the host-target ones, so altering the SPIRV codegen
behavior for the `va_arg` case to match the host-target one seems ok
https://github.com/llvm/llvm-project/pull/208196
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits