summaryrefslogtreecommitdiffstats
path: root/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Merging r155342:Bill Wendling2012-04-231-1/+3
| | | | | | | | | | | | | ------------------------------------------------------------------------ r155342 | asl | 2012-04-23 02:02:13 -0700 (Mon, 23 Apr 2012) | 3 lines Do not use stdint.h, driver might provide invalid location for it. Instead, provide the types directly. This should fix PR12628 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_31@155376 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert vperm2f128 and vperm2i128 intrinsics back to using llvm intrinsics. ↵Craig Topper2012-04-173-4/+7
| | | | | | Unfortunately, these instructions have behavior that can't be modeled with shuffle vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154906 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix test.Eli Friedman2012-04-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154897 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure EmitMoveFromReturnSlot is passing the correct alignment toChad Rosier2012-04-171-0/+8
| | | | | | | | EmitFinalDestCopy (and thus pass EmitAggregateCopy the correct alignment). rdar://11220251 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154883 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for -fast-math metadata for the moment.Duncan Sands2012-04-161-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154851 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate fpmath metadata when -ffast-math. Note that no optimizations are hookedDuncan Sands2012-04-161-0/+8
| | | | | | | up to this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154835 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate alignment on lvalues through EmitLValueForField. PR12395.Eli Friedman2012-04-161-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154789 91177308-0d34-0410-b5e6-96231b3b80d8
* Change _mm256_permute4x64_epi64 and _mm256_permute4x64_pd to use ↵Craig Topper2012-04-151-2/+2
| | | | | | builtin_shufflevector instead of specific builtins. Old builtins will be removed from llvm now that vpermq/vpermpd are supported by shuffle lowering code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154777 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MDBuilder to help with metadata creation.Duncan Sands2012-04-152-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154767 91177308-0d34-0410-b5e6-96231b3b80d8
* First set of tests for ARM homogenous aggregates. C only. C++ will follow.Anton Korobeynikov2012-04-131-0/+158
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154666 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set ofRichard Smith2012-04-131-0/+15
| | | | | | | GNU __atomic builtins. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154659 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the missing pieces needed to support libstdc++4.7's <atomic>:Richard Smith2012-04-131-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | | __atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_* predefined macros. Implement library fallback for __atomic_is_lock_free and __c11_atomic_is_lock_free, and implement __atomic_always_lock_free. Contrary to their documentation, GCC's __atomic_fetch_add family don't multiply the operand by sizeof(T) when operating on a pointer type. libstdc++ relies on this quirk. Remove this handling for all but the __c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins. Contrary to their documentation, __atomic_test_and_set and __atomic_clear take a first argument of type 'volatile void *', not 'void *' or 'bool *', and __atomic_is_lock_free and __atomic_always_lock_free have an argument of type 'const volatile void *', not 'void *'. With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite, except for a couple of libstdc++ bugs and some cases where libc++'s test suite tests for properties which implementations have latitude to vary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154640 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for 18 of the GNU-compatible __atomic builtins.Richard Smith2012-04-122-23/+134
| | | | | | | | | | | | | This is not quite sufficient for libstdc++'s <atomic>: we still need __atomic_test_and_set and __atomic_clear, and may need a more complete __atomic_is_lock_free implementation. We are also missing an implementation of __atomic_always_lock_free, __atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed for libstdc++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154579 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide, and document, a set of __c11_atomic_* intrinsics to implement C11'sRichard Smith2012-04-112-20/+20
| | | | | | | | | | <stdatomic.h> header. In passing, fix LanguageExtensions to note that C11 and C++11 are no longer "upcoming standards" but are now actually standardized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154513 91177308-0d34-0410-b5e6-96231b3b80d8
* AtomicExpr: make ASTStmtReader a friend and remove setters. Also fix savingRichard Smith2012-04-101-0/+9
| | | | | | | | of an uninitialized Stmt* in serialization of __atomic_init and add a test of atomics serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154448 91177308-0d34-0410-b5e6-96231b3b80d8
* This test actually needs label names.Eric Christopher2012-04-101-1/+2
| | | | | | PR9796 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154422 91177308-0d34-0410-b5e6-96231b3b80d8
* For debug and coverage analysis if we're not optimizing go aheadEric Christopher2012-04-102-22/+28
| | | | | | | | | and emit a relatively empty block for a plain break statement. This enables us to track where we went through a switch. PR9796 & rdar://11215207 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154420 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the variant of __builtin_shufflevector that takes the shuffle indexes ↵Eli Friedman2012-04-051-0/+35
| | | | | | as a vector actually usable. Patch by David Neto. PR12465. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154128 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more constraint registers for mips.Eric Christopher2012-04-031-0/+44
| | | | | | Patch by Jack Carter. Testcase cleanup by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153921 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly check argument types for some vector macros in smmintrin.h. Put ↵Craig Topper2012-03-301-0/+44
| | | | | | parentheses around uses of vector macro arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153732 91177308-0d34-0410-b5e6-96231b3b80d8
* Add _mm_minpos_epu16 to smmintrin.h. Fixes PR12399.Craig Topper2012-03-301-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153726 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix shuffle vector calculation for mm_permute_ps. Fixes PR 12401.Craig Topper2012-03-301-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153724 91177308-0d34-0410-b5e6-96231b3b80d8
* The UTF16 string referenced by a CFString should go into the __TEXT,__ustringBill Wendling2012-03-302-2/+15
| | | | | | | | | | | | | | section. A 'normal' string will go into the __TEXT,__const section, but this isn't good for UTF16 strings. The __ustring section allows for coalescing, among other niceties (such as allowing the linker to easily split up strings). Instead of outputting the UTF16 string as a series of bytes, output it as a series of shorts. The back-end will then nicely place the UTF16 string into the correct section, because it's a mensch. <rdar://problem/10655949> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153710 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax the test slightly so that it should pass on other people's computers.David Chisnall2012-03-291-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153670 91177308-0d34-0410-b5e6-96231b3b80d8
* Call out to GCC-compatible runtime functions for atomic ops that we can't useDavid Chisnall2012-03-291-0/+36
| | | | | | | | | | | | | | | | LLVM intrinsics for. I have an implementation of these functions, which wants to go in a libgcc_s equivalent in compiler-rt. It's currently here: http://people.freebsd.org/~theraven/atomic.c It will be committed to compiler-rt as soon as I work out where would be a sensible place to put it... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153666 91177308-0d34-0410-b5e6-96231b3b80d8
* Add better support for $fp and $sp for mips inline asm support.Eric Christopher2012-03-271-0/+80
| | | | | | Patch by Jack Carter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153530 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Fix test failure in release mode.Daniel Dunbar2012-03-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153460 91177308-0d34-0410-b5e6-96231b3b80d8
* add tbaa metadata to vtable pointer loads/storesKostya Serebryany2012-03-261-0/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153447 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back r153360 with a fix for enums that cover all the 32 bit values.Rafael Espindola2012-03-241-0/+11
| | | | | | Thanks to NAKAMURA Takumi for finding it! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153383 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r153360 (and r153380), "Second part of PR12251. Produce the range ↵NAKAMURA Takumi2012-03-241-11/+0
| | | | | | | | | | metadata in clang for booleans and". For i686 targets (eg. cygwin), I saw "Range must not be empty!" in verifier. It produces (i32)[0x80000000:0x80000000) from (uint64_t)[0xFFFFFFFF80000000ULL:0x0000000080000000ULL), for signed i32 on MDNode::Range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153382 91177308-0d34-0410-b5e6-96231b3b80d8
* Second part of PR12251. Produce the range metadata in clang for booleans andRafael Espindola2012-03-241-0/+11
| | | | | | c++ enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153360 91177308-0d34-0410-b5e6-96231b3b80d8
* Small cleanup.Bill Wendling2012-03-221-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153292 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct FileCheck regexp.Bill Wendling2012-03-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153291 91177308-0d34-0410-b5e6-96231b3b80d8
* When an MMX output variable is tied to the input variable, we have to implicitlyBill Wendling2012-03-221-0/+9
| | | | | | | | cast the value to x86_mmx. This gives the ASM string the correct call signature. <rdar://problem/10919182> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153290 91177308-0d34-0410-b5e6-96231b3b80d8
* line endingsMatt Beaumont-Gay2012-03-221-27/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153289 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure we correctly set the alignment for vector loads and stores ↵Eli Friedman2012-03-221-0/+27
| | | | | | associated with vector element lvalues. Patch by Kevin Schoedel (with some minor modifications by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153285 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152891 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152873 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152861 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix codegen for vld{3,4}_dup intrinsics.James Molloy2012-03-151-0/+49
| | | | | | | | Patch by Silviu Baranga! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152788 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152754 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152647 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ZeroLengthBitfieldAlignment for AAPCS, as well as APCS-GNU.James Molloy2012-03-121-0/+236
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152552 91177308-0d34-0410-b5e6-96231b3b80d8
* 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? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152462 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] What was implemented in r152130 was actually -fno-inline-functions, notChad Rosier2012-03-061-2/+2
| | | | | | | | -fno-inline. Part of rdar://10972766 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152145 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.Chad Rosier2012-03-061-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152134 91177308-0d34-0410-b5e6-96231b3b80d8
* [driver] Add support for -fno-inline.Chad Rosier2012-03-061-0/+14
| | | | | | | rdar://10972766 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152130 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151994 91177308-0d34-0410-b5e6-96231b3b80d8
* add a testcase for PR12094 and fix a crash on pointer to incomplete type,Chris Lattner2012-03-041-0/+11
| | | | | | | reported by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151993 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151746 91177308-0d34-0410-b5e6-96231b3b80d8