Go to file
Ulrich Weigand 6e2cea6f0c Respect alignment when loading up a coerced function argument
Code in CGCall.cpp that loads up function arguments that need to be
coerced to a different type may in some cases ignore the fact that
the source of the argument is not naturally aligned. This may cause
incorrect code to be generated. In some places in CreateCoercedLoad,
we already have setAlignment calls to address this, but I ran into one
where it was missing, causing wrong code generation on SystemZ.

However, in that location, we do not actually know what alignment of
the source location we can rely on; the callers do not pass anything
to this routine. This is already an issue in other places in
CreateCoercedLoad; and the same problem exists for CreateCoercedStore.

To avoid pessimising code, and to fix the FIXMEs already in place,
this patch also adds an alignment argument to the CreateCoerced*
routines and uses it instead of forcing an alignment of 1. The
callers are changed to pass in the best information they have.

This actually requires changes in a number of existing test cases
since we now get better alignment in many places.

Differential Revision: http://reviews.llvm.org/D11033

llvm-svn: 241898
2015-07-10 11:31:43 +00:00
clang Respect alignment when loading up a coerced function argument 2015-07-10 11:31:43 +00:00
clang-tools-extra Added mechanism to modularize for doing a compilation precheck 2015-07-10 00:37:25 +00:00
compiler-rt [TSan] Fix dl_iterate_phdr callback for the case when info->dlpi_name is overwritten by user. 2015-07-10 00:03:54 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Properly initialize Module pointer 2015-06-27 12:35:54 +00:00
libcxx Fix error string in test suite 2015-07-08 23:10:20 +00:00
libcxxabi fallback_malloc: silence conversion warning (NFC) 2015-06-03 17:25:35 +00:00
libunwind Fix unw_getcontext() return value on AArch64. 2015-06-25 15:12:46 +00:00
lld COFF: Fix locally-imported symbol's base relocations. 2015-07-10 04:30:54 +00:00
lldb Don't let a test fail because of a teardown command returning an error. Use a function that doesn't check the return value. 2015-07-10 00:30:22 +00:00
llgo [llgo] cmd/llgoi: use line editor 2015-05-23 15:16:09 +00:00
llvm Disable loop re-rotation for -Oz (patch by Andrey Turetsky) 2015-07-10 10:37:09 +00:00
openmp Turn debugger interface off by default. 2015-07-09 20:17:16 +00:00
polly Make non-affine statement names isl compatible 2015-07-09 07:31:45 +00:00