summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/alignment.c
AgeCommit message (Collapse)Author
2023-08-28[clang] Remove rdar links; NFCAaron Ballman
We have a new policy in place making links to private resources something we try to avoid in source and test files. Normally, we'd organically switch to the new policy rather than make a sweeping change across a project. However, Clang is in a somewhat special circumstance currently: recently, I've had several new contributors run into rdar links around test code which their patch was changing the behavior of. This turns out to be a surprisingly bad experience, especially for newer folks, for a handful of reasons: not understanding what the link is and feeling intimidated by it, wondering whether their changes are actually breaking something important to a downstream in some way, having to hunt down strangers not involved with the patch to impose on them for help, accidental pressure from asking for potentially private IP to be made public, etc. Because folks run into these links entirely by chance (through fixing bugs or working on new features), there's not really a set of problematic links to focus on -- all of the links have basically the same potential for causing these problems. As a result, this is an omnibus patch to remove all such links. This was not a mechanical change; it was done by manually searching for rdar, radar, radr, and other variants to find all the various problematic links. From there, I tried to retain or reword the surrounding comments so that we would lose as little context as possible. However, because most links were just a plain link with no supporting context, the majority of the changes are simple removals. Differential Review: https://reviews.llvm.org/D158071
2023-07-17Revert "Remove rdar links; NFC"Mehdi Amini
This reverts commit d618f1c3b12effd0c2bdb7d02108d3551f389d3d. This commit wasn't reviewed ahead of time and significant concerns were raised immediately after it landed. According to our developer policy this warrants immediate revert of the commit. https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy Differential Revision: https://reviews.llvm.org/D155509
2023-07-07Remove rdar links; NFCAaron Ballman
This removes links to rdar, which is an internal bug tracker that the community doesn't have visibility into. See further discussion at: https://discourse.llvm.org/t/code-review-reminder-about-links-in-code-commit-messages/71847
2022-10-07[CodeGen] Convert tests to opaque pointers (NFC)Nikita Popov
Conversion performed using the script at: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34 These are only tests where no manual fixup was required.
2022-04-07[OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)Nikita Popov
This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be part of the migration approach described in https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9. The patch has been produced by replacing %clang_cc1 with %clang_cc1 -no-opaque-pointers for tests that fail with opaque pointers enabled. Worth noting that this doesn't cover all tests, there's a remaining ~40 tests not using %clang_cc1 that will need a followup change. Differential Revision: https://reviews.llvm.org/D123115
2022-02-15Use functions with prototypes when appropriate; NFCAaron Ballman
A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the tenth batch of tests being updated (there are a significant number of other tests left to be updated).
2020-08-12Limit Max Vector alignment on COFF targets to 8192.Erich Keane
COFF targets have a max object alignment of 8192, so trying to create one with a larger size results in an unreachable in WinCOFFObjectWriter. For the reproducer I have uses thread local storage, however other alignments are likely affected as well. This patch sets the MaxVectorAlign for COFF to 8192. Additionally, though there is no longer a way to reproduce that I could find, it correctly sets the MaxTLSAlign for COFF to that value as well, so that if anyone comes up with a situation where this is true, it will cause an error. Differential Revision: https://reviews.llvm.org/D85543
2020-03-09Recommit #2 "[Driver] Default to -fno-common for all targets"Sjoerd Meijer
After a first attempt to fix the test-suite failures, my first recommit caused the same failures again. I had updated CMakeList.txt files of tests that needed -fcommon, but it turns out that there are also Makefiles which are used by some bots, so I've updated these Makefiles now too. See the original commit message for more details on this change: 0a9fc9233e172601e26381810d093e02ef410f65
2020-03-09Revert "Recommit "[Driver] Default to -fno-common for all targets""Sjoerd Meijer
This reverts commit 2c36c23f3476baf3b9283ea387c579419a70b112. Still problems in the test-suite, which I really thought I had fixed...
2020-03-09Recommit "[Driver] Default to -fno-common for all targets"Sjoerd Meijer
This includes fixes for: - test-suite: some benchmarks need to be compiled with -fcommon, see D75557. - compiler-rt: one test needed -fcommon, and another a change, see D75520.
2020-03-03Revert "[Driver] Default to -fno-common for all targets"Sjoerd Meijer
This reverts commit 0a9fc9233e172601e26381810d093e02ef410f65. Going to look at the asan failures. I find the failures in the test suite weird, because they look like compile time test and I don't understand how that can be failing, but will have a brief look at that too.
2020-03-03[Driver] Default to -fno-common for all targetsSjoerd Meijer
This makes -fno-common the default for all targets because this has performance and code-size benefits and is more language conforming for C code. Additionally, GCC10 also defaults to -fno-common and so we get consistent behaviour with GCC. With this change, C code that uses tentative definitions as definitions of a variable in multiple translation units will trigger multiple-definition linker errors. Generally, this occurs when the use of the extern keyword is neglected in the declaration of a variable in a header file. In some cases, no specific translation unit provides a definition of the variable. The previous behavior can be restored by specifying -fcommon. As GCC has switched already, we benefit from applications already being ported and existing documentation how to do this. For example: - https://gcc.gnu.org/gcc-10/porting_to.html - https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common Differential revision: https://reviews.llvm.org/D75056
2020-02-03Revert "[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition"Fangrui Song
This reverts commit 789a46f2d742e11edaade28cb59a0f4d2a1d770e. Accidentally committed.
2020-02-03[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interpositionFangrui Song
Summary: Clang -fpic defaults to -fno-semantic-interposition (GCC -fpic defaults to -fsemantic-interposition). Users need to specify -fsemantic-interposition to get semantic interposition behavior. Semantic interposition is currently a best-effort feature. There may still be some cases where it is not handled well. Reviewers: peter.smith, rnk, serge-sans-paille, sfertile, jfb, jdoerfert Subscribers: dschuff, jyknight, dylanmckay, nemanjai, jvesely, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, arphaman, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73865
2015-09-29Honor the casted-to alignment of an explicit cast even whenJohn McCall
Sema thinks the cast is a no-op, as it does when (e.g.) the only thing that changes is an alignment attribute. Fixed PR24944. llvm-svn: 248775
2015-02-27Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie
llvm-svn: 230795
2013-08-07Correctly allign arrays on 32 bit systems.Rafael Espindola
Before this patch we would align long long int big[1024]; to 4 bytes on 32 bit systems. The problem is that we were only looking at the element type when getLargeArrayMinWidth returned non zero. llvm-svn: 187897
2012-08-16Remove names from the CHECK lines.Tanya Lattner
llvm-svn: 162003
2012-08-16Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner
Add test case. llvm-svn: 162002
2012-01-04fix test on -Asserts builds.Chris Lattner
llvm-svn: 147558
2012-01-04implement rdar://10639962 by keeping track of increased alignment Chris Lattner
information even in subscripting operations. llvm-svn: 147557
2011-12-19loads also handled of course.Chris Lattner
llvm-svn: 146910
2011-12-19Fix PR5279 - don't sliently drop alignment information on stores of types ↵Chris Lattner
that have alignment less than the natural alignment of the type when it comes from a typedef. llvm-svn: 146908
2011-12-19filecheckize.Chris Lattner
llvm-svn: 146907
2011-12-19rename test.Chris Lattner
llvm-svn: 146906