llvm-project/clang/test
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
..
ARCMT Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
ASTMerge [Hexagon] Reapply 238773 after fix to LLVM. 2015-06-03 17:34:22 +00:00
Analysis [Static Analyzer] Basic per checker command line option validation. 2015-07-09 21:43:45 +00:00
CXX Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
CodeCompletion [Preprocessor] Iterating over all macros should include those from modules. 2015-06-24 19:27:02 +00:00
CodeGen Respect alignment when loading up a coerced function argument 2015-07-10 11:31:43 +00:00
CodeGenCUDA [cuda] Fixed test case failure on s390x 2015-05-11 18:35:58 +00:00
CodeGenCXX Respect alignment when loading up a coerced function argument 2015-07-10 11:31:43 +00:00
CodeGenObjC Substitute type arguments into uses of Objective-C interface members. 2015-07-07 03:57:53 +00:00
CodeGenObjCXX Implement the Objective-C __kindof type qualifier. 2015-07-07 03:58:42 +00:00
CodeGenOpenCL Account for calling convention specifiers in function definitions in IR test cases 2015-06-29 17:29:50 +00:00
Coverage
CoverageMapping InstrProf: Pack the coverage mapping structs that we write out 2015-07-02 00:42:32 +00:00
Driver Add GCC-compatible flags -fprofile-generate and -fprofile-use. 2015-07-09 17:23:53 +00:00
FixIt Replace __double_underscored type nullability qualifiers with _Uppercase_underscored 2015-06-24 22:02:08 +00:00
Format Disable style-on-command-line test on Windows 2015-06-09 17:47:59 +00:00
Frontend Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
Headers Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
Index Revert test lines added in r241811, "[CodeCompletion] Don't crash on member inits of templated constructors.", for now. 2015-07-10 03:09:19 +00:00
Integration
Layout __declspec is not a core Clang language extension. Instead, require -fms-extensions or -fborland to enable the language extension. 2015-05-26 19:44:52 +00:00
Lexer [ASan] Initial support for Kernel AddressSanitizer 2015-06-19 12:19:07 +00:00
Misc Reenable Misc/interpreter.c as r239388 correctly handles such targets 2015-06-09 06:33:13 +00:00
Modules [modules] Fix merging support for forward-declared enums with fixed underlying types. A visible declaration is enough to make the type complete, but not enough to make the definition visible. 2015-07-08 21:49:31 +00:00
OpenMP Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
PCH Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
Parser Revert "parser: wordsmith diagnostic message" and "parser: diagnose empty attribute blocks" 2015-07-08 05:55:00 +00:00
Preprocessor Avoid false positive/negative test results from line directive interference.NFC. 2015-06-26 17:49:10 +00:00
Profile Remove test that tests referring to the current working directory. You 2015-07-10 05:57:23 +00:00
Rewriter __declspec is not a core Clang language extension. Instead, require -fms-extensions or -fborland to enable the language extension. 2015-05-26 19:44:52 +00:00
Sema Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
SemaCUDA [cuda] Preserve TLS storage class of host variable even if it's a 2015-04-28 20:31:49 +00:00
SemaCXX PR24030, PR24033: Consistently check whether a new declaration conflicts with 2015-07-06 04:43:58 +00:00
SemaObjC s/__nonnull/_Nonnull in a test for Objective-C __kindof. 2015-07-07 06:20:41 +00:00
SemaObjCXX Implement variance for Objective-C type parameters. 2015-07-07 03:58:54 +00:00
SemaOpenCL Restores r228382, which was reverted in r228406. 2015-02-25 05:48:23 +00:00
SemaTemplate DR1909: Diagnose all invalid cases of a class member sharing its name with the class. 2015-07-06 01:45:27 +00:00
TableGen
Tooling Change the expectation for test/Tooling/ms-asm-no-target.cpp since 2015-07-08 01:39:38 +00:00
Unit
VFS Commit some test changes somehow missed in r239789. 2015-06-16 00:19:29 +00:00
.clang-format
CMakeLists.txt Revert "Revert r241620 and follow-up commits" and move the initialization 2015-07-08 01:00:30 +00:00
Makefile
TestRunner.sh
cxx-sections.data
lit.cfg test: Set lit features appropriately when using asan and ubsan together 2015-06-22 18:47:10 +00:00
lit.site.cfg.in Check for backtraces in tests which are verifying pretty stack traces from a crashing clang. 2015-02-10 19:53:38 +00:00
make_test_dirs.pl