summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Don't try to create "store atomic" instructions of non-integer types; they ↵Eli Friedman2012-03-161-2/+6
| | | | | | aren't supported at the moment. PR12040. llvm-svn: 152891
* When a variable has a specified asm name, but isn't using the register ↵Eli Friedman2012-03-151-0/+6
| | | | | | storage class, the asm name doesn't specify a register. PR12244. llvm-svn: 152873
* [frontend] Fix how the frontend handles -fno-inline. AFAIK clang now matchesChad Rosier2012-03-151-1/+1
| | | | | | | the behavior of gcc with respect to the -fno-inline and -fno-inline-functions flags. llvm-svn: 152861
* Fix codegen for vld{3,4}_dup intrinsics.James Molloy2012-03-151-0/+49
| | | | | | Patch by Silviu Baranga! llvm-svn: 152788
* [frontend] Add support for disabling the "inline" keyword using Chad Rosier2012-03-141-1/+2
| | | | | | | | | | | -fno-inline-functions. This behaves much like -fno-inline in gcc, but based on a discussion with Daniel it was decided that -fno-inline-functions should subsume -fno-inline. Please speak up if you object. The -fno-inline flag remains ignored. Final part of rdar://10972766 llvm-svn: 152754
* Fix the long double to be of width/align 64. Rename va_list_test toRoman Divacky2012-03-131-0/+4
| | | | | | powerpc_types and add testing for the (long) double there. llvm-svn: 152647
* Use ZeroLengthBitfieldAlignment for AAPCS, as well as APCS-GNU.James Molloy2012-03-121-0/+236
| | | | llvm-svn: 152552
* IRgen/ABI/x86_64: Avoid passing small structs using byval sometimes.Daniel Dunbar2012-03-102-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We do this when it is easy to determine that the backend will pass them on the stack properly by itself. Currently LLVM codegen is really bad in some cases with byval, for example, on the test case here (which is derived from Sema code, which likes to pass SourceLocations around):: struct s47 { unsigned a; }; void f47(int,int,int,int,int,int,struct s47); void test47(int a, struct s47 b) { f47(a, a, a, a, a, a, b); } we used to emit code like this:: ... movl %esi, -8(%rbp) movl -8(%rbp), %ecx movl %ecx, (%rsp) ... to handle moving the struct onto the stack, which is just appalling. Now we generate:: movl %esi, (%rsp) which seems better, no? llvm-svn: 152462
* [driver] What was implemented in r152130 was actually -fno-inline-functions, notChad Rosier2012-03-061-2/+2
| | | | | | | -fno-inline. Part of rdar://10972766 llvm-svn: 152145
* Whitespace.Chad Rosier2012-03-061-1/+0
| | | | llvm-svn: 152134
* [driver] Add support for -fno-inline.Chad Rosier2012-03-061-0/+14
| | | | | | rdar://10972766 llvm-svn: 152130
* From his comment in PR12168, Eli seems confused about the alignment assumptionsChris Lattner2012-03-041-1/+5
| | | | | | | we're making. We only ignore implicit casts. Add a testcase showing that we get the right behavior with explicit casts. llvm-svn: 151994
* add a testcase for PR12094 and fix a crash on pointer to incomplete type,Chris Lattner2012-03-041-0/+11
| | | | | | reported by Richard Smith. llvm-svn: 151993
* I referenced the incorrect rdar in my previous commit (r151745). Add the Chad Rosier2012-02-291-0/+1
| | | | | | | correct radar number to the test case for tracking purposes. rdar://10551066 llvm-svn: 151746
* Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiatedChad Rosier2012-02-291-0/+27
| | | | | | | | | by the BAA pass, which uses the default TargetLibraryInfo constructor. Unfortunately, the default TargetLibraryInfo constructor assumes all library calls are available and thus ignores -fno-builtin. rdar://10947759 llvm-svn: 151745
* Reapply r151638 and r151641.James Molloy2012-02-291-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug that was caught by Apple's internal buildbots was valid and also showed another bug in my implementation. These are now fixed, with regression tests added to catch them both (not Darwin-specific). Original log: ==================== Revert r151638 because it causes assertion hit on PCH creation for Cocoa.h Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. ==================== llvm-svn: 151712
* Revert r151638 because it causes assertion hit on PCH creation for Cocoa.hArgyrios Kyrtzidis2012-02-281-15/+0
| | | | | | | | | | | | | | | | | | | | Original log: --------------------- Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. --------------------- I also reverted r151641 which was enhancement on top of r151638. llvm-svn: 151667
* Correctly track tags and enum members defined in the prototype of a ↵James Molloy2012-02-281-0/+15
| | | | | | | | | | | | | | | function, and ensure they are properly scoped. This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. llvm-svn: 151638
* Add missing code for compound literals of complex type. ↵Eli Friedman2012-02-271-1/+7
| | | | | | <rdar://problem/10938628> llvm-svn: 151549
* Test case for r151429/r151430, which ensures llvm.lifetime intrinsics are notChad Rosier2012-02-271-0/+23
| | | | | | being emitted at -O0, but are emitted when optimizations are enabled. llvm-svn: 151533
* Fix a stupid mistake in r151133. Reported to me by Joerg Sonnenberger.Eli Friedman2012-02-241-0/+7
| | | | llvm-svn: 151407
* Turned on support for __declspecs: noreturn, noinline, nothrow and naked in ↵Aaron Ballman2012-02-231-0/+16
| | | | | | MS compatibility mode. llvm-svn: 151295
* Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ toChandler Carruth2012-02-201-0/+156
| | | | | | | | | | | | | | | | match the behavior of GCC. Also add a test for these intrinsics, which apparently have *zero* tests. =[ Not surprisingly, Clang crashed when compiling these. Fix the bug in CodeGen where we failed to bitcast the argument type to x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the new 3dnow-builtins.c test. This is one issue impacting the efforts to get Clang to emulate the Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made available there. llvm-svn: 150948
* Implement #pragma redefine_extname.David Chisnall2012-02-181-0/+15
| | | | | | This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers. llvm-svn: 150881
* Loosen the test from r150238 a bit to make some of our bots happy.Evgeniy Stepanov2012-02-101-4/+4
| | | | llvm-svn: 150242
* Fix function prolog codegen whe coerce-to type is a struct.Evgeniy Stepanov2012-02-101-0/+12
| | | | | | | | | | This changes function prolog in such a way as to avoid out-of-bounds stack store in the case when coerce-to type has a larger storage size than the real argument type. Fixes PR11905. llvm-svn: 150238
* Class objects passed by value follow the same rules as structure objects.Akira Hatanaka2012-02-091-0/+15
| | | | | | | Double fields of by-value class objects should be passed in floating point registers. llvm-svn: 150200
* Fix bugs in function MipsABIInfo::returnAggregateInRegs. Functions returningAkira Hatanaka2012-02-091-0/+31
| | | | | | class objects follow the same rules as those returning struct objects. llvm-svn: 150196
* Remove vperm2f* and vperm2i builtins. Same effect can be achieved with ↵Craig Topper2012-02-083-5/+20
| | | | | | builtin_shufflevector. llvm-svn: 150064
* Remove vpermilp* builtins. Same effect can be achieved with ↵Craig Topper2012-02-082-4/+24
| | | | | | builtin_shufflevector. llvm-svn: 150056
* Do not return records with non trivial destructors or copy constructors inAkira Hatanaka2012-02-081-0/+17
| | | | | | registers. llvm-svn: 150035
* Make FunctionDecl::doesDeclarationForceExternallyVisibleDefinition use the ↵Eli Friedman2012-02-071-3/+28
| | | | | | same logic as FunctionDecl::isInlineDefinitionExternallyVisible to figure out whether to emit a definition. Based on work by Anton Yartsev. llvm-svn: 149963
* Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.Bob Wilson2012-02-041-0/+10
| | | | | | | | We had been generating load/store instructions with the default alignment for the vector element type, even when the pointer argument had less alignment. <rdar://problem/10538555> llvm-svn: 149794
* Update tests so that they don't rely upon LLVMDebugVersion number.Devang Patel2012-02-031-2/+2
| | | | llvm-svn: 149726
* [frontend] Don't allow a mapping to a warning override an error/fatal mapping.Chad Rosier2012-02-031-1/+1
| | | | | | rdar://10736625 llvm-svn: 149662
* r149587 revertedAnton Yartsev2012-02-022-34/+34
| | | | llvm-svn: 149594
* Fix for PR10657 (http://llvm.org/bugs/show_bug.cgi?id=10657)Anton Yartsev2012-02-022-34/+34
| | | | | | extern inline case considered llvm-svn: 149587
* Cleanup 3dnow builtin handling. Most of them were already handled by LLVM ↵Craig Topper2012-01-301-1/+0
| | | | | | connecting intrinsics and builtins in IntrinsicsX86.td. llvm-svn: 149233
* Make the __builtin_c[lt]zs builtins target independent.Benjamin Kramer2012-01-282-17/+33
| | | | | | | | | There is really no reason to have these only available on x86. It's just __builtin_c[tl]z for shorts. Modernize the test while at it. llvm-svn: 149183
* Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455Bob Wilson2012-01-261-2/+6
| | | | | | | | | | | | | | | | ARM supports clz and ctz directly and both operations have well-defined results for zero. There is no disadvantage in performance to using the defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into ARM-specific code written with the assumption that __builtin_clz(0) == 32, even though that value is technically undefined. The code is failing now because of llvm optimizations that are taking advantage of the undef behavior (specifically svn r147255). There's nothing wrong with that optimization on x86 where any incorrect assumptions about __builtin_clz(0) will quickly be exposed. For ARM, though, optimizations based on that undef behavior are likely to cause subtle bugs. Other targets with defined-at-zero clz/ctz support may want to override the default behavior as well. llvm-svn: 149086
* Try harder to get X7 definedDouglas Gregor2012-01-261-0/+1
| | | | llvm-svn: 149072
* Force layout of more of the unions and structures in this testDouglas Gregor2012-01-261-1/+7
| | | | llvm-svn: 149066
* Suppress any warnings from this test. They aren't interesting, and theyChandler Carruth2012-01-261-3/+3
| | | | | | | | | | end up in the same output file as the layout stuff. There may even be a race condition which is causing this output to confuse the FileCheck in some cases. I actually don't know how on earth the parsing of the layout file even works given that there are diagnostics in the middle of it. ;] llvm-svn: 149058
* Extend the ExternalASTSource interface to allow the AST source toDouglas Gregor2012-01-261-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provide the layout of records, rather than letting Clang compute the layout itself. LLDB provides the motivation for this feature: because various layout-altering attributes (packed, aligned, etc.) don't get reliably get placed into DWARF, the record layouts computed by LLDB from the reconstructed records differ from the actual layouts, and badness occurs. This interface lets the DWARF data drive layout, so we don't need the attributes preserved to get the answer write. The testing methodology for this change is fun. I've introduced a variant of -fdump-record-layouts called -fdump-record-layouts-simple that always has the simple C format and provides size/alignment/field offsets. There is also a -cc1 option -foverride-record-layout=<file> to take the output of -fdump-record-layouts-simple and parse it to produce a set of overridden layouts, which is introduced into the AST via a testing-only ExternalASTSource (called LayoutOverrideSource). Each test contains a number of records to lay out, which use various layout-changing attributes, and then dumps the layouts. We then run the test again, using the preprocessor to eliminate the layout-changing attributes entirely (which would give us different layouts for the records), but supplying the previously-computed record layouts. Finally, we diff the layouts produced from the two runs to be sure that they are identical. Note that this code makes the assumption that we don't *have* to provide the offsets of bases or virtual bases to get the layout right, because the alignment attributes don't affect it. I believe this assumption holds, but if it does not, we can extend LayoutOverrideSource to also provide base offset information. Fixes the Clang side of <rdar://problem/10169539>. llvm-svn: 149055
* Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an ↵Eli Friedman2012-01-251-0/+48
| | | | | | MSVC-compatible way. Patch by Joe Groff. llvm-svn: 148992
* test/CodeGen/avx-builtins.c: Fix more for -Asserts.NAKAMURA Takumi2012-01-251-1/+1
| | | | llvm-svn: 148944
* Re-enable test that was broken by r148919Craig Topper2012-01-251-6/+2
| | | | llvm-svn: 148932
* disable this test for now.Chris Lattner2012-01-251-2/+3
| | | | llvm-svn: 148928
* fix broken testcase.Chris Lattner2012-01-251-2/+2
| | | | llvm-svn: 148925
* Represent 256-bit unaligned loads natively and remove the builtins. Similar ↵Craig Topper2012-01-251-0/+25
| | | | | | change was made for 128-bit versions a while back. llvm-svn: 148919
OpenPOWER on IntegriCloud