summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Add support for passing variables declared to use a xmm register to asmRafael Espindola2011-01-021-0/+32
| | | | | | statements using the "x" constraint. llvm-svn: 122679
* Add support for declaring register contraints in variables. They are only usedRafael Espindola2010-12-301-0/+27
| | | | | | | | | | | | | | in asm statements: register int foo asm("rdi"); asm("..." : ... "r" (foo) ... We also only accept these variables if the constraint in the asm statement is "r". This fixes most of PR3933. llvm-svn: 122643
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-251-1/+11
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Generalize this test to work without instruction names.Dan Gohman2010-12-141-2/+2
| | | | llvm-svn: 121742
* Implement CodeGen support for the may_alias attribute.Dan Gohman2010-12-131-0/+21
| | | | llvm-svn: 121734
* Start using DIBuilder. It provides cleaner interface.Devang Patel2010-12-081-1/+1
| | | | llvm-svn: 121302
* Fix PR8720 by printing an error message with a substring that the gcc ↵Rafael Espindola2010-12-072-2/+2
| | | | | | testsuite searches for. llvm-svn: 121137
* Silly special case: never load when dereferencing void*.John McCall2010-12-041-12/+12
| | | | llvm-svn: 120905
* First pass at implementing the intent of ANSI C DR106.John McCall2010-12-041-2/+16
| | | | llvm-svn: 120904
* Fix this test case on no-asserts builds by not trying to match the basicJohn McCall2010-12-041-1/+3
| | | | | | block line. llvm-svn: 120893
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-041-1/+11
| | | | | | | | | | | | | | | | | | | not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. llvm-svn: 120890
* Implement -cl-single-precision-constantPeter Collingbourne2010-12-041-0/+7
| | | | llvm-svn: 120877
* Implement -cl-opt-disablePeter Collingbourne2010-12-041-3/+3
| | | | llvm-svn: 120876
* IR Gen. part of API support for __block cxxFariborz Jahanian2010-12-021-2/+2
| | | | | | | | objects imported into blocks. //rdar://8594790. Will have a test case coming (as well as one sent to llvm test suite). llvm-svn: 120713
* Improve codegen for initializer lists to use memset more aggressivelyChris Lattner2010-12-021-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when an initializer is variable (I handled the constant case in a previous patch). This has three pieces: 1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that the memory being stored into has previously been memset to zero. 2. Teach CGExprAgg to not emit stores of zero to isZeroed memory. 3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine whether they are profitable to emit a memset + inividual stores vs stores for everything. The heuristic used is that a global has to be more than 16 bytes and has to be 3/4 zero to be candidate for this xform. The two testcases are illustrative of the scenarios this catches. We now codegen test9 into: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false) %.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0 %tmp = load i32* %X.addr, align 4 store i32 %tmp, i32* %.array and test10 into: call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false) %tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0 %tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0 %tmp2 = load i32* %X.addr, align 4 store i32 %tmp2, i32* %tmp1, align 4 %tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3 %tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4 %tmp11 = load i32* %X.addr, align 4 store i32 %tmp11, i32* %tmp10, align 4 Previously we produced 99 stores of zero for test9 and also tons for test10. This xforms should substantially speed up -O0 builds when it kicks in as well as reducing code size and optimizer heartburn on insane cases. This resolves PR279. llvm-svn: 120692
* Add support for the common and nocommon attributes.Eric Christopher2010-12-021-0/+9
| | | | | | rdar://8560647 llvm-svn: 120650
* FileCheckize.Eric Christopher2010-12-021-3/+7
| | | | llvm-svn: 120648
* FileCheckize.Eric Christopher2010-12-021-4/+4
| | | | llvm-svn: 120647
* Enhance the init generation logic to emit a memset followed by a few stores whenChris Lattner2010-12-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | a global is larger than 32 bytes and has fewer than 6 non-zero values in the initializer. Previously we'd turn something like this: char test8(int X) { char str[10000] = "abc"; into a 10K global variable which we then memcpy'd from. Now we generate: %str = alloca [10000 x i8], align 16 %tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0 call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false) store i8 97, i8* %tmp, align 16 %0 = getelementptr [10000 x i8]* %str, i64 0, i64 1 store i8 98, i8* %0, align 1 %1 = getelementptr [10000 x i8]* %str, i64 0, i64 2 store i8 99, i8* %1, align 2 Which is much smaller in space and also likely faster. This is part of PR279 llvm-svn: 120645
* Declaring local static in global blockFariborz Jahanian2010-11-301-0/+19
| | | | | | | literal declaration caused crash in CodeGen. This patch fixes it. pr8707 llvm-svn: 120486
* Replace \r\n with \n. No functional change.Nick Lewycky2010-11-301-99/+99
| | | | llvm-svn: 120379
* Fix a (probably very old) regression where we weren't using the typedef name ↵Anders Carlsson2010-11-242-2/+2
| | | | | | for anonymous tag types. llvm-svn: 120113
* This test does not need to test the alignment of pointers. Make it passJohn McCall2010-11-231-8/+8
| | | | | | on 64-bit systems. llvm-svn: 120014
* long => int to make the test pass on system where sizeof(long) = 64.Francois Pichet2010-11-231-4/+4
| | | | llvm-svn: 120005
* Microsoft C anonymous struct implementation.Francois Pichet2010-11-231-0/+99
| | | | | | Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx llvm-svn: 120000
* comparison of AltiVec vectors now gives bool result (fix for 7533)Anton Yartsev2010-11-181-0/+61
| | | | llvm-svn: 119678
* Re-enable test with modifications for Neon vector changes in clang.Bob Wilson2010-11-171-3/+3
| | | | | | | | | | I mistakenly thought that this was checking for vector name mangling, but it is not. Since we're no longer wrapping Neon vectors in structs, this test can just return a vector directly. There are already other tests for that, so just to make this interesting, change the test to return a struct of two vectors. llvm-svn: 119434
* Temporarily disable this check for Neon vector type mangling.Bob Wilson2010-11-161-1/+1
| | | | | | I'll reenable it soon when I'm done reworking <arm_neon.h>. llvm-svn: 119366
* This really seems like a boring set of fixes to our tests to make them moreChandler Carruth2010-11-161-1/+1
| | | | | | | independent of the underlying system. Let me know if any of these are too aggressive. llvm-svn: 119345
* Simplify some complex emission and implement correct semantics forJohn McCall2010-11-162-25/+185
| | | | | | | | | assignment to volatiles in C. This in effect reverts some of mjs's work in and around r72572. Basically, the C++ standard is quite clear, except that it lies about volatile behavior approximating C's, whereas the C standard is almost actively misleading. llvm-svn: 119344
* Restore these tests. I think I fixed the problem.Fariborz Jahanian2010-11-152-0/+200
| | | | | | We shall see. llvm-svn: 119158
* Always emit full loads from volatile complex l-values.John McCall2010-11-141-0/+23
| | | | | | | | Return the result of a complex assignment with the original values, not by performing a load from the l-value; this is the correct semantics in C, although not in C++. llvm-svn: 119037
* Removing these test till redo them so they won't dependFariborz Jahanian2010-11-132-200/+0
| | | | | | on the built compiler. llvm-svn: 119013
* Fix the test for Release.Argyrios Kyrtzidis2010-11-091-1/+1
| | | | llvm-svn: 118483
* Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.Argyrios Kyrtzidis2010-11-091-1/+14
| | | | | | Fixes rdar://8644873 & http://llvm.org/PR8567. llvm-svn: 118468
* ARM EH uses a different personality function in C.John McCall2010-11-071-0/+19
| | | | llvm-svn: 118366
* Tests for inline asm constraints, generic and x86.John Thompson2010-11-022-0/+657
| | | | llvm-svn: 118108
* Unbreak private_extern, which apparently we had zero tests for.John McCall2010-11-021-0/+14
| | | | llvm-svn: 118034
* When emitting l-values for bool non-__block decl references, make a pointerJohn McCall2010-10-281-0/+7
| | | | | | | | using the memory type; fixes an assert. Fixes rdar://problem/8605032 llvm-svn: 117610
* When computing visibility, use the latest declaration's explicit visibilityJohn McCall2010-10-281-0/+7
| | | | | | | | attribute. Part of rdar://problem/8595231 llvm-svn: 117526
* Restore r117403 (fixing IR gen for bool atomics), this time being less John McCall2010-10-271-2/+1
| | | | | | | aggressive about the form we expect bools to be in. I don't really have time to fix all the sources right now. llvm-svn: 117486
* Revert r117403 as it caused PR8480.Rafael Espindola2010-10-271-1/+2
| | | | llvm-svn: 117456
* Extract procedures to do scalar-to-memory and memory-to-scalar conversionsJohn McCall2010-10-261-2/+1
| | | | | | | in IR gen, and use those to fix a correctness issue with bool atomic intrinsics. rdar://problem/8461234 llvm-svn: 117403
* A couple of tweaks to the visibility rules: John McCall2010-10-261-24/+32
| | | | | | | | | | | - tags with C linkage should ignore visibility=hidden - functions and variables with explicit visibility attributes should ignore the linkage of their types Either of these should be sufficient to fix PR8457. Also, FileCheck-ize a test case. llvm-svn: 117351
* Implement GNU C extension: two types are compatible if they appearPeter Collingbourne2010-10-241-1/+4
| | | | | | | as a function argument, one of the types is a transparent union type and the other type is compatible with a union member llvm-svn: 117243
* Linux still needs these hacks.Bill Wendling2010-10-202-0/+9
| | | | llvm-svn: 116888
* Now that mm_malloc.h was rewritten to *not* include errno.h (seeBill Wendling2010-10-192-9/+0
| | | | | | | http://llvm.org/viewvc/llvm-project?rev=116771&view=rev) we can get rid of these hacks. llvm-svn: 116853
* test: FileCheck'ize and document test.Michael J. Spencer2010-10-191-8/+12
| | | | llvm-svn: 116799
* Reapply r116684 with fixes. The test cases needed to be updated.Bill Wendling2010-10-182-4/+4
| | | | llvm-svn: 116696
* support for AltiVec extensions from the Cell architectureAnton Yartsev2010-10-141-1/+956
| | | | llvm-svn: 116478
OpenPOWER on IntegriCloud