llvm-project
llvm-project copied to clipboard
[CodeGen][LLVM] Make the `va_list` related intrinsics generic.
Currently, the builtins used for implementing va_list
handling unconditionally take their arguments as unqualified ptr
s i.e. pointers to AS 0. This does not work for targets where the default AS is not 0 or AS 0 is not a viable AS (for example, a target might choose 0 to represent the constant address space). This patch changes the builtins' signature to take generic anyptr
args, which corrects this issue. It is noisy due to the number of tests affected. A test for an upstream target which does not use 0 as its default AS (SPIRV for HIP device compilations) is added as well.