summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* The following patch adds __attribute__((no_address_safety_analysis)) which ↵Kostya Serebryany2012-01-241-0/+35
| | | | | | | | | | | | | | | will allow to disable address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function. When building with AddressSanitizer, add AddressSafety function attribute to every generated function except for those that have __attribute__((no_address_safety_analysis)). With this patch we will be able to 1. disable AddressSanitizer for a particular function 2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on. llvm-svn: 148842
* add tests for wide character encodingsSeth Cantrell2012-01-211-3/+17
| | | | | | and fix typo llvm-svn: 148603
* rename -ccc-host-triple into -targetSebastian Pop2012-01-206-9/+9
| | | | llvm-svn: 148582
* Add and update tests for character literalsSeth Cantrell2012-01-182-44/+16
| | | | llvm-svn: 148392
* Add testcase for r148375!Nick Lewycky2012-01-182-0/+19
| | | | llvm-svn: 148378
* Add new line.Tanya Lattner2012-01-161-1/+1
| | | | llvm-svn: 148255
* Add support for OpenCL 1.1 logical operations.Tanya Lattner2012-01-161-0/+9
| | | | llvm-svn: 148254
* Some improvements to the handling of C11 atomic types:David Chisnall2012-01-162-0/+28
| | | | | | | | | | | | | | | | | | - Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases llvm-svn: 148242
* constexpr irgen: Add irgen support for APValue::Struct, APValue::Union,Richard Smith2012-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | APValue::Array and APValue::MemberPointer. All APValue values can now be emitted as constants. Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other entrypoints dealing with constant member pointers are no longer necessary and will be removed in a later change. Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to VarDecl::evaluateValue. This performs caching and deals with the nasty cases in C++11 where a non-const object's initializer can refer indirectly to previously-initialized fields within the same object. Building the intermediate APValue object incurs a measurable performance hit on pathological testcases with huge initializer lists, so we continue to build IR directly from the Expr nodes for array and record types outside of C++11. llvm-svn: 148178
* Revert r148138; it's causing test failures.Eli Friedman2012-01-136-9/+9
| | | | llvm-svn: 148141
* rename -ccc-host-triple into -targetSebastian Pop2012-01-136-9/+9
| | | | llvm-svn: 148138
* Fix test case committed in r147986.Akira Hatanaka2012-01-121-3/+3
| | | | llvm-svn: 147993
* Take into account the pointer to an aggregate that is passed as a hiddenAkira Hatanaka2012-01-121-0/+12
| | | | | | argument when Offset is initialized. llvm-svn: 147986
* clang/test/CodeGen/vla-4.c: Relax expression for -Asserts.NAKAMURA Takumi2012-01-111-1/+1
| | | | llvm-svn: 147934
* Fixed VLA code generation.Abramo Bagnara2012-01-111-0/+24
| | | | llvm-svn: 147933
* Add field IsIEEE in FloatingLiteral to distinguish between different 128-bitAkira Hatanaka2012-01-101-0/+9
| | | | | | floating point formats. llvm-svn: 147887
* The `-fwritable-strings' flag doesn't make the backing store strings of allBill Wendling2012-01-101-0/+10
| | | | | | | | | | | CFStrings writable. The strings (both Unicode and ASCII) should reside in a read-only section. E.g., __TEXT,__cstring instead of __DATA,__data. This is done by making the global variable created for the strings constant despite the value of that flag. <rdar://problem/10657500> llvm-svn: 147845
* Insert padding before unaligned long double arguments.Akira Hatanaka2012-01-091-1/+13
| | | | llvm-svn: 147791
* Fixed TypeofExpr AST and code generation.Abramo Bagnara2012-01-071-3/+0
| | | | llvm-svn: 147730
* Add field PaddingType to ABIArgInfo which specifies the type of padding thatAkira Hatanaka2012-01-071-0/+19
| | | | | | | | is inserted before the real argument. Padding is needed to ensure the backend reads from or writes to the correct argument slots when the original alignment of a byval structure is unavailable due to flattening. llvm-svn: 147699
* Revert r147655; it's breaking the compiler_rt build on OSX.Eli Friedman2012-01-061-20/+0
| | | | llvm-svn: 147677
* If we are compiling with -fno-builtin then don't do constant folding ofDavid Chisnall2012-01-061-0/+20
| | | | | | | | builtins. This fixes PR11711. llvm-svn: 147655
* fix test on -Asserts builds.Chris Lattner2012-01-041-1/+1
| | | | llvm-svn: 147558
* implement rdar://10639962 by keeping track of increased alignment Chris Lattner2012-01-041-0/+10
| | | | | | information even in subscripting operations. llvm-svn: 147557
OpenPOWER on IntegriCloud