[clang] [llvm] [LLVM] Fix incorrect alignment on AMDGPU variadics (PR #96370)
Jon Chesterfield via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 05:54:54 PDT 2024
JonChesterfield wrote:
This PR is invalid.
First, the alignment on the eight byte pointer is supposed to be four. Increasing it to 8 makes things worse.
Second, I can't see any support for the claim that the code is incrementing by the alignment of the value, as opposed to the size.
The frame is setup as a struct instance with explicit padding by Int8Tys and the calculation there is correct.
The va_arg increment is done in CodeGen:emitVoidPtrVAArg, where DirectSize is ValueInfo.Width, aligned to the 4 byte slot size, then stored. It does not increment the iterator by the alignment of the type.
The lowering pass is doing exactly what was intended.
https://github.com/llvm/llvm-project/pull/96370
More information about the llvm-commits
mailing list