summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Enhance the IR type lowering code to be much smarter about recursively loweringChris Lattner2011-07-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | types. Fore xample, we used to lower: struct bar { int a; }; struct foo { void (*FP)(struct bar); } G; to: %struct.foo = type { {}* } since the function pointer would cause recursive translation of bar and we didn't know if that would get us into trouble. We are now smart enough to know that it is fine, so we get this type instead: %struct.foo = type { void (i32)* } Codegen still needs to be prepared for uncooperative types at any place, which is why I let the maximally uncooperative code sit around for awhile to help shake out the bugs. llvm-svn: 135244
* Reapply r134946 with fixes. Tested on Benjamin testcase and other test-suite ↵Bruno Cardoso Lopes2011-07-131-2/+2
| | | | | | failures. llvm-svn: 135091
* Emit debug info for extended vectors.Devang Patel2011-07-131-0/+5
| | | | llvm-svn: 135083
* PR10337 reminds me that calls return values, lets handle them justChris Lattner2011-07-131-0/+16
| | | | | | like arguments. Thanks PR10337! :) llvm-svn: 135030
* Revert r134946Bruno Cardoso Lopes2011-07-121-2/+2
| | | | llvm-svn: 135004
* fix an unintended behavior change in the type system rewrite, which caused ↵Chris Lattner2011-07-126-12/+12
| | | | | | | | | | | | | | | | | | | | | us to compile stuff like this: typedef struct { int x, y, z; } foo_t; foo_t g; into: %"struct.<anonymous>" = type { i32, i32, i32 } we now get: %struct.foo_t = type { i32, i32, i32 } This doesn't change the behavior of the compiler, but makes the IR much easier to read. llvm-svn: 134969
* fix PR10335 by watching out for IR type compatibility in call argument lists.Chris Lattner2011-07-121-2/+14
| | | | llvm-svn: 134966
* make test name less specificChris Lattner2011-07-121-0/+0
| | | | llvm-svn: 134964
* Do the same as r134946 for arrays. Add more testcases for avx x86_64 argBruno Cardoso Lopes2011-07-121-3/+15
| | | | | | passing. llvm-svn: 134951
* Fix one x86_64 abi issue and the test to actually look for the right thing,Bruno Cardoso Lopes2011-07-121-2/+2
| | | | | | which is: { <4 x float>, <4 x float> } should continue to go through memory. llvm-svn: 134946
* Reapply r134754, which turns out to be working correctly and alsoBruno Cardoso Lopes2011-07-111-0/+30
| | | | | | add one more testcase. llvm-svn: 134934
* Fix the clang bootstrap and Jay's testcase from llvm-dev by being completelyChris Lattner2011-07-101-0/+13
| | | | | | | | | | conservative when converting a functiontype to IR when in a "pointer within a struct" context. This has the unfortunate sideeffect of compiling all function pointers inside of structs into "{}*" which, though correct, is ugly. This has the positive side effect of being correct, and it is pretty straight-forward to improve on this. llvm-svn: 134861
* Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible sinceChris Lattner2011-07-101-0/+8
| | | | | | | | | | | | | | | | | | it is a predicate, not an action. Change the return type to be a bool, not the incomplete member. Enhace it to detect the recursive compilation case, allowing us to compile Eli's testcase on llvmdev: struct T { struct T (*p)(void); } t; into: %struct.T = type { {}* } @t = common global %struct.T zeroinitializer, align 8 llvm-svn: 134853
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-0926-74/+71
| | | | llvm-svn: 134831
* cc1 must initialize MC subtarget infos for inline asm parsing. Re-enable ↵Evan Cheng2011-07-091-4/+2
| | | | | | asm-errors.c llvm-svn: 134811
* disable this test to get the botz green again.Chris Lattner2011-07-091-2/+4
| | | | llvm-svn: 134808
* Silly typo in test for r134770.Eli Friedman2011-07-081-1/+1
| | | | llvm-svn: 134774
* Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx ↵Eli Friedman2011-07-083-3/+13
| | | | | | | | | | | | should not imply -mno-sse. Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__. clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much. <rdar://problem/9694837> llvm-svn: 134770
* Revert x86_64 ABI changes until I have time to check the items raised by Eli.Bruno Cardoso Lopes2011-07-081-15/+0
| | | | llvm-svn: 134765
* Introduce __builtin_expect() intrinsic support.Jakub Staszak2011-07-081-0/+26
| | | | llvm-svn: 134761
* Add support for AVX 256-bit in the x86_64 ABI (as in the 0.99.5 draft)Bruno Cardoso Lopes2011-07-081-0/+15
| | | | llvm-svn: 134754
* Add codegen support for the fma/fmal/fmaf builtins.Cameron Zwarich2011-07-081-0/+23
| | | | llvm-svn: 134743
* Add a testcase for the previous commit and update an existing test for anEric Christopher2011-07-071-6/+20
| | | | | | | | extra register. Part of PR10299 and rdar://9740322 llvm-svn: 134657
* r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,Cameron Zwarich2011-07-071-7/+0
| | | | | | so roll it out. llvm-svn: 134638
* A redeclaration of an inline method in C99 mode should trigger emission of thatNick Lewycky2011-07-071-0/+7
| | | | | | function. Fixes PR10233! llvm-svn: 134634
* revert patch for // rdar://9227352Fariborz Jahanian2011-07-061-16/+0
| | | | llvm-svn: 134536
* Testcase for r134441.Devang Patel2011-07-051-0/+35
| | | | llvm-svn: 134442
* Don't use x86_mmx where it isn't necessary.Eli Friedman2011-07-021-0/+3
| | | | | | The start of some work on getting -mno-mmx working the way we want it to. llvm-svn: 134300
* Add a testcase for r134292.Eric Christopher2011-07-021-0/+3
| | | | | | Part of rdar://9714064 llvm-svn: 134295
* Use existing -fcatch-undefined-behavior option,Fariborz Jahanian2011-06-291-1/+1
| | | | | | replacing -freset-local-blocks. // rdar://9227352 llvm-svn: 134082
* Under a compiler flag, -freset-local-blocks,Fariborz Jahanian2011-06-281-0/+16
| | | | | | | wipe out stack blocks when they go out of scope. // rdar://9227352 llvm-svn: 134045
* Merge this test into another.John McCall2011-06-272-7/+6
| | | | llvm-svn: 133957
* Revert parts of r133860 to fix a crash. Add a test.Nico Weber2011-06-271-0/+7
| | | | llvm-svn: 133931
* Mark the multiply which occurs as part of performing pointerJohn McCall2011-06-251-1/+44
| | | | | | | | arithmetic on a VLA as 'nsw', per discussion with djg, and implement pointer arithmetic (other than array accesses) and pointer subtraction for VLA types. llvm-svn: 133855
* Fix struct member's scope. Patch by Xi Wang.Devang Patel2011-06-241-0/+3
| | | | llvm-svn: 133829
* Change the IR-generation of VLAs so that we capture bounds,John McCall2011-06-241-8/+12
| | | | | | | not sizes; so that we use well-typed allocas; and so that we properly recurse through the full set of variably-modified types. llvm-svn: 133827
* Issue warning if weak_import attribute is added to an alreadyFariborz Jahanian2011-06-221-1/+1
| | | | | | declared variable and ignore it. // rdar://9538608 llvm-svn: 133654
* Canonicalize register names properly.Eric Christopher2011-06-211-0/+9
| | | | | | Fixes rdar://9425559 llvm-svn: 133486
* Move additional register names to their own lookup, separate fromEric Christopher2011-06-211-2/+1
| | | | | | | | register aliases. Fixes unnecessary renames of clobbers. Fixes part of rdar://9425559 llvm-svn: 133485
* llvm-gcc treats a tentative definition with a previousFariborz Jahanian2011-06-201-0/+26
| | | | | | | | | (or follow up) extern declaration with weak_import as an actual definition. make clang follows this behavior. // rdar://9538608 llvm-gcc treats an extern declaration with weak_import llvm-svn: 133450
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-204-9/+9
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
* Loosen up the IR matching slightlyDouglas Gregor2011-06-171-1/+1
| | | | llvm-svn: 133263
* Remove another variable.Eric Christopher2011-06-171-1/+1
| | | | llvm-svn: 133262
* When emitting a compound literal of POD type, continue to emit aDouglas Gregor2011-06-171-2/+23
| | | | | | | | | | | | | | | | | separate aggregate temporary and then memcpy it over to the destination. This fixes a regression I introduced with r133235, where the compound literal on the RHS of an assignment makes use of the structure on the LHS of the assignment. I'm deeply suspicious of AggExprEmitter::VisitBinAssign()'s optimization where it emits the RHS of an aggregate assignment directly into the LHS lvalue without checking whether there is any aliasing between the LHS/RHS. However, I'm not in a position to revisit this now. Big thanks to Eli for finding the regression! llvm-svn: 133261
* Clean up test to avoid using standard headers and remove an unneededEric Christopher2011-06-171-6/+2
| | | | | | #define. llvm-svn: 133241
* Make this test suitable for optimized builds by avoiding the name.Eric Christopher2011-06-171-1/+1
| | | | llvm-svn: 133238
* Check the specific target to figure out if a constraint is a validEric Christopher2011-06-171-0/+26
| | | | | | | | | register constraint. Note that we're not checking if the register itself is valid for the constraint. Fixes rdar://9382985 llvm-svn: 133226
* Set the visibility to 'hidden' when previousFariborz Jahanian2011-06-161-0/+39
| | | | | | | declaration of global var is __private_extern__. // rdar://9609649 llvm-svn: 133157
* Test for r133070.Eli Friedman2011-06-151-0/+4
| | | | llvm-svn: 133079
* Fix a regression from r132957 involving complex integers. (Fixes failures ↵Eli Friedman2011-06-151-0/+10
| | | | | | on gcc-testsuite bot.) llvm-svn: 133069
OpenPOWER on IntegriCloud