Commit Graph

1357 Commits

Author SHA1 Message Date
Eric Christopher af6431077c Add support for AVX registers to clang inline asm. Add a small testcase
and update the Sema testcase with a register that we won't hit for a while
I hope.

Fixes rdar://10510405

llvm-svn: 145671
2011-12-02 02:12:16 +00:00
Eric Christopher 5037249cc3 Clean up some oddly gratuitous vertical whitespace.
llvm-svn: 145670
2011-12-02 02:12:12 +00:00
Eric Christopher 86e6c07a0c Rename function.
llvm-svn: 145669
2011-12-02 02:12:09 +00:00
Eli Friedman bfd5addf4c When we're passing a vector with an illegal type through memory on x86-64, use byval so we're sure the backend does the right thing. Fixes va_arg with illegal vectors and an obscure ABI mismatch with __m64 vectors.
llvm-svn: 145652
2011-12-02 00:11:43 +00:00
Eli Friedman f37bd2f2f1 Don't use a varargs convention for calls unprototyped functions where one of the arguments is an AVX vector.
llvm-svn: 145574
2011-12-01 04:53:19 +00:00
Tanya Lattner 71f1b2dcd4 Correct the code generation for function arguments of vec3 types on x86_64 when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2.
Add test case.

llvm-svn: 145312
2011-11-28 23:18:11 +00:00
Benjamin Kramer ddbb2b85ab CodeGen: allow __asm renaming on static local variables.
Fixes PR4777.

llvm-svn: 145015
2011-11-20 21:05:04 +00:00
Eli Friedman f22fa9eaef Finish r144971, which was an incomplete commit.
llvm-svn: 144972
2011-11-18 04:01:36 +00:00
Eli Friedman 0b3f201b61 Fix the meaning of an "empty" record for the case of a zero-length array. Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty.
llvm-svn: 144971
2011-11-18 03:47:20 +00:00
Eli Friedman a1748564b4 Make va_arg on x86-64 compute alignment the same way as argument passing.
Fixes <rdar://problem/10463281>.

llvm-svn: 144966
2011-11-18 02:44:19 +00:00
Eli Friedman 1d7dd3b682 A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.
llvm-svn: 144963
2011-11-18 02:12:09 +00:00
Eli Friedman e5c85622c9 Don't try to expand struct arguments containing holes on x86-32. From gcc struct layout tests.
llvm-svn: 144961
2011-11-18 01:32:26 +00:00
Eli Friedman ee94534662 Simplify code for returning a struct for Darwin x86-32 ABI. Use a better type for a function returning a struct containing only a pointer. Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting.
llvm-svn: 144960
2011-11-18 01:25:50 +00:00
Eli Friedman 9f061a37bb Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.
llvm-svn: 144944
2011-11-18 00:28:11 +00:00
Richard Smith 027bf11eb3 Constant expression evaluation: add support for evaluation of member pointers
and base-to-derived casts, and add proper handling of temporaries.

llvm-svn: 144926
2011-11-17 22:56:20 +00:00
Eli Friedman 95ff70021c Fix crash in calling convention code expanding an struct with a complex member.
llvm-svn: 144612
2011-11-15 02:46:03 +00:00
Nico Weber d60b72f696 Fix a regression in wide character codegen. See PR11369.
llvm-svn: 144521
2011-11-14 05:17:37 +00:00
Eli Friedman ce6733a542 Fix test so that it XFAILs consistently.
llvm-svn: 143771
2011-11-05 00:49:47 +00:00
Devang Patel 45124500bb Add new test.
llvm-svn: 143706
2011-11-04 17:12:03 +00:00
Devang Patel f1faeefb32 Add new test.
llvm-svn: 143704
2011-11-04 16:57:26 +00:00
Eli Friedman 3d9f47fe6f Fix alignment on alloca's for parameters using ABIArgInfo::Expand.
llvm-svn: 143658
2011-11-03 21:39:02 +00:00
Eli Friedman eadd3e81a0 Fix the alignment on scalar parameter variables so that it matches what the AST thinks it should be. Per report on cfe-dev.
llvm-svn: 143645
2011-11-03 20:31:28 +00:00
Bob Wilson 1d9269a8d6 Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.
llvm-svn: 143530
2011-11-02 04:51:36 +00:00
Eli Friedman 86fe42d184 Correct test for additional comment line.
llvm-svn: 143436
2011-11-01 04:46:08 +00:00
Eli Friedman e1f2ce8fd3 Mark test as requiring x86 backend.
llvm-svn: 143427
2011-11-01 03:48:36 +00:00
Eli Friedman 97ed64081d Don't depend on system includes in test.
llvm-svn: 143426
2011-11-01 03:35:57 +00:00
Eli Friedman fc08bdcc57 Tests for UTF-8 encoding in strings in source code. Patch by Seth Cantrell.
llvm-svn: 143418
2011-11-01 02:26:36 +00:00
Eli Friedman fcec630a57 Fix the representation of wide strings in the AST and IR so that it uses the native representation of integers for the elements. This fixes a bunch of nastiness involving
treating wide strings as a series of bytes.

Patch by Seth Cantrell.

llvm-svn: 143417
2011-11-01 02:23:42 +00:00
Peter Collingbourne f1d76db466 Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

llvm-svn: 143314
2011-10-30 17:30:44 +00:00
Rafael Espindola 77a4538c6c Fix this on the bots and make the test more complete by enabling optimizations.
llvm-svn: 143223
2011-10-28 20:52:18 +00:00
Rafael Espindola fffc1ce1d7 Fix PR9614 for functions with the always_inline attribute. Try to keep
the common case (-O0, no always_inline) fast.

llvm-svn: 143222
2011-10-28 20:43:56 +00:00
Nick Lewycky b25abd1a54 Move these test from checking assembly to checking LLVM IR. Should fix fallout
from r143097.

llvm-svn: 143098
2011-10-27 07:11:43 +00:00
Rafael Espindola be069cb3d0 Fix this tests on the bots.
llvm-svn: 143052
2011-10-26 20:46:27 +00:00
Rafael Espindola c594135b68 Fix pr9614 by not emitting an available_externally function when it calls
itself via an asm label.

available_externally functions are supposed to correspond to an external
function, and that is not the case in the examples in pr9614.

llvm-svn: 143049
2011-10-26 20:41:06 +00:00
Dan Gohman 50c756b76f Remove another Blackfin test.
llvm-svn: 142894
2011-10-25 01:02:36 +00:00
Dan Gohman c44b95c3b5 Remove more SystemZ (s390) tests.
llvm-svn: 142883
2011-10-25 00:15:21 +00:00
Eric Christopher 4b4beb2fe7 Fix PR11073 by adding the argument type information to the decl we construct
for the function type. Update a testcase accordingly.

Patch initially by Anders Waldenborg!

llvm-svn: 142700
2011-10-21 23:30:10 +00:00
Douglas Gregor 0a92de06f0 Switch tests from grep to FileCheck
llvm-svn: 142699
2011-10-21 23:20:41 +00:00
Nick Lewycky ba743b75cb Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.

llvm-svn: 142633
2011-10-21 02:32:14 +00:00
Eli Friedman cc66a2b067 Add missing newline.
llvm-svn: 142285
2011-10-17 21:48:31 +00:00
Eli Friedman a4c2602b71 Initial implementation of __atomic_is_lock_free. The input is the size of an atomic type rather than an atomic type itself just to save some implementation pain; I can change that if it seems worthwhile.
I think this is the last hook needed for <atomic> besides defines for ATOMIC_CHAR_LOCK_FREE and friends.

llvm-svn: 142281
2011-10-17 21:44:23 +00:00
Tanya Lattner 49b3841398 The comparison of two vectors should return a signed result. hasIntegerRepresentation() used to always return false for vectors, but since it was changed, it also
changed the return type of a compare of two unsigned vectors to be unsigned. This patch removes the check for hasIntegerRepresentation since its not needed and returns the appropriate signed type.
I added a new test case and updated exisiting test cases that assumed an unsigned result.

llvm-svn: 142250
2011-10-17 21:00:38 +00:00
Anton Korobeynikov f82017f3fe Missed tests for half FP support
llvm-svn: 142017
2011-10-14 23:32:50 +00:00
Eli Friedman 4b72fddd99 Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.
llvm-svn: 142002
2011-10-14 20:59:01 +00:00
Benjamin Kramer 73eb8c7a8e Harden test for windows paths.
llvm-svn: 141973
2011-10-14 19:03:46 +00:00
Richard Smith 9ca5c42582 Update all tests other than Driver/std.cpp to use -std=c++11 rather than
-std=c++0x. Patch by Ahmed Charles!

llvm-svn: 141900
2011-10-13 22:29:44 +00:00
Eric Christopher 7cdf948601 Recommit:
Start handling debug line and scope information better:

    Migrate most of the location setting within the larger API in CGDebugInfo and
    update a lot of callers.
    Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
    and replace it with DILexicalBlockFile usage.

    Finishes off the rest of rdar://10246360

after fixing a few bugs that were exposed in gdb testsuite testing.

llvm-svn: 141893
2011-10-13 21:45:18 +00:00
Rafael Espindola 2d21ab024e Add returns_twice to functions that are known to return twice. This implements
the same behavior of gcc by keeping the attribute out of the function type.

llvm-svn: 141803
2011-10-12 19:51:18 +00:00
Eric Christopher 93663b3c62 Revert file/scope handling patches. gdb testing revealed a couple of bugs.
llvm-svn: 141796
2011-10-12 18:39:35 +00:00
Eric Christopher 498b7fd7fe Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.

Finishes off the rest of rdar://10246360

llvm-svn: 141732
2011-10-11 23:00:55 +00:00