llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[CodeGen][LLVM] Make the `va_list` related intrinsics generic.

Open AlexVlx opened this issue 4 months ago • 9 comments

Currently, the builtins used for implementing va_list handling unconditionally take their arguments as unqualified ptrs 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.

AlexVlx avatar Mar 15 '24 20:03 AlexVlx