[CodeGen] Add an alignment attribute to all sret parameters
authorErik Pilkington <erik.pilkington@gmail.com>
Tue, 24 Mar 2020 16:36:19 +0000 (12:36 -0400)
committerErik Pilkington <erik.pilkington@gmail.com>
Tue, 24 Mar 2020 19:31:57 +0000 (15:31 -0400)
commitde98cf92e301ab559a7417f1eca5cfa53624c9e1
tree9935c82baf7daffc9a7f62a994615c0f6bf2a980
parent43a6d285bfead762ac472a6e62beedc9f88bce89
[CodeGen] Add an alignment attribute to all sret parameters

This fixes a miscompile when the parameter is actually underaligned.
rdar://58316406

Differential revision: https://reviews.llvm.org/D74183
101 files changed:
clang/lib/CodeGen/CGCall.cpp
clang/test/CodeGen/2006-05-19-SingleEltReturn.c
clang/test/CodeGen/aarch64-varargs.c
clang/test/CodeGen/aggregate-assign-call.c
clang/test/CodeGen/aligned-sret.c [new file with mode: 0644]
clang/test/CodeGen/arc/arguments.c
clang/test/CodeGen/arm-aapcs-vfp.c
clang/test/CodeGen/arm-homogenous.c
clang/test/CodeGen/arm-neon-vld.c
clang/test/CodeGen/arm-varargs.c
clang/test/CodeGen/arm-vector-arguments.c
clang/test/CodeGen/arm-vfp16-arguments.c
clang/test/CodeGen/arm-vfp16-arguments2.cpp
clang/test/CodeGen/arm64-arguments.c
clang/test/CodeGen/arm64-microsoft-arguments.cpp
clang/test/CodeGen/arm64_32.c
clang/test/CodeGen/arm_neon_intrinsics.c
clang/test/CodeGen/blocks.c
clang/test/CodeGen/c11atomics-ios.c
clang/test/CodeGen/c11atomics.c
clang/test/CodeGen/lanai-arguments.c
clang/test/CodeGen/le32-arguments.c
clang/test/CodeGen/mcu-struct-return.c
clang/test/CodeGen/mingw-long-double.c
clang/test/CodeGen/mips-zero-sized-struct.c
clang/test/CodeGen/mips64-padding-arg.c
clang/test/CodeGen/ms_abi.c
clang/test/CodeGen/ppc64-align-struct.c
clang/test/CodeGen/ppc64-elf-abi.c
clang/test/CodeGen/ppc64-qpx-vector.c
clang/test/CodeGen/ppc64-soft-float.c
clang/test/CodeGen/ppc64-vector.c
clang/test/CodeGen/ppc64le-aggregates.c
clang/test/CodeGen/ppc64le-f128Aggregates.c
clang/test/CodeGen/regparm-struct.c
clang/test/CodeGen/renderscript.c
clang/test/CodeGen/riscv32-ilp32-abi.c
clang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c
clang/test/CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c
clang/test/CodeGen/riscv32-ilp32d-abi.c
clang/test/CodeGen/riscv32-ilp32f-abi.c
clang/test/CodeGen/riscv32-ilp32f-ilp32d-abi.c
clang/test/CodeGen/riscv64-lp64-abi.c
clang/test/CodeGen/riscv64-lp64-lp64f-abi.c
clang/test/CodeGen/riscv64-lp64-lp64f-lp64d-abi.c
clang/test/CodeGen/riscv64-lp64d-abi.c
clang/test/CodeGen/sparcv9-abi.c
clang/test/CodeGen/struct-passing.c
clang/test/CodeGen/systemz-abi-vector.c
clang/test/CodeGen/systemz-abi.c
clang/test/CodeGen/systemz-abi.cpp
clang/test/CodeGen/systemz-inline-asm.c
clang/test/CodeGen/vectorcall.c
clang/test/CodeGen/wasm-arguments.c
clang/test/CodeGen/wasm-varargs.c
clang/test/CodeGen/windows-struct-abi.c
clang/test/CodeGen/x86_32-arguments-darwin.c
clang/test/CodeGen/x86_32-arguments-iamcu.c
clang/test/CodeGen/x86_64-arguments-nacl.c
clang/test/CodeGen/x86_64-arguments-win32.c
clang/test/CodeGen/x86_64-arguments.c
clang/test/CodeGenCXX/arm-cc.cpp
clang/test/CodeGenCXX/builtin-source-location.cpp
clang/test/CodeGenCXX/call-with-static-chain.cpp
clang/test/CodeGenCXX/conditional-gnu-ext.cpp
clang/test/CodeGenCXX/cxx1z-copy-omission.cpp
clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp
clang/test/CodeGenCXX/exceptions.cpp
clang/test/CodeGenCXX/homogeneous-aggregates.cpp
clang/test/CodeGenCXX/lambda-expressions.cpp
clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp
clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
clang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
clang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp
clang/test/CodeGenCXX/regcall.cpp
clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
clang/test/CodeGenCXX/stack-reuse.cpp
clang/test/CodeGenCXX/temporaries.cpp
clang/test/CodeGenCXX/thiscall-struct-return.cpp
clang/test/CodeGenCXX/thunk-returning-memptr.cpp
clang/test/CodeGenCXX/thunks.cpp
clang/test/CodeGenCXX/trivial_abi.cpp
clang/test/CodeGenCXX/unknown-anytype.cpp
clang/test/CodeGenCXX/wasm-args-returns.cpp
clang/test/CodeGenCXX/x86_32-arguments.cpp
clang/test/CodeGenCXX/x86_64-arguments.cpp
clang/test/CodeGenCoroutines/coro-await.cpp
clang/test/CodeGenCoroutines/coro-gro-nrvo.cpp
clang/test/CodeGenObjC/arc.m
clang/test/CodeGenObjC/direct-method.m
clang/test/CodeGenObjC/nontrivial-c-struct-exception.m
clang/test/CodeGenObjC/objc-non-trivial-struct-nrvo.m
clang/test/CodeGenObjC/stret-1.m
clang/test/CodeGenObjC/weak-in-c-struct.m
clang/test/CodeGenObjCXX/objc-struct-cxx-abi.mm
clang/test/CodeGenOpenCL/addr-space-struct-arg.cl
clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
clang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
clang/test/Modules/templates.mm