[PATCH] D155986: [clang][AMDGPU]: Don't use byval for struct arguments in function ABI
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 11:52:15 PDT 2023
arsenm added inline comments.
================
Comment at: clang/lib/CodeGen/Targets/AMDGPU.cpp:253
+ if (Ty->isStructureOrClassType() || Ty->isUnionType()) {
+ return ABIArgInfo::getIndirectAliased(
----------------
Why does this need the type checks? Can this just go under the isIndirect handling?
================
Comment at: clang/test/CodeGenOpenCL/addr-space-struct-arg.cl:120
// AMDGCN-NOT: @llvm.memcpy
-// AMDGCN-NEXT: call void @FuncOneLargeMember(ptr addrspace(5) noundef byval(%struct.LargeStructOneMember) align 8 %[[p_s]])
+// AMDGCN-NEXT: call void @FuncOneLargeMember(ptr addrspace(5) byref(%struct.LargeStructOneMember) align 8 %[[p_s]])
void test_indirect_arg_private(void) {
----------------
These test checks are pretty thin, I'd like to see the memcpys in the IR. In a pre-commit, can you switch these tests to generated checks?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155986/new/
https://reviews.llvm.org/D155986
More information about the llvm-commits
mailing list