summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Use clang::VarDecl name instead of llvm::GlobalVariable name.Devang Patel2010-04-291-2/+6
| | | | | | llvm::GLobalVariable name may not match user visibile name for function static variables. llvm-svn: 102644
* A not equal for an unordered relation should return true as specified in ↵Mon P Wang2010-04-291-0/+7
| | | | | | | | IEEE-754, e.g., NAN != NAN ? 1 : 0 should return 1. Also fix the case for complex. llvm-svn: 102598
* Properly pass the address of a lazily-generated function declaration withJohn McCall2010-04-281-0/+12
| | | | | | incomplete type. Fixes PR6911. llvm-svn: 102473
* Implement PR6845. We allow matching constraints to have differentChris Lattner2010-04-231-0/+21
| | | | | | | | input and output types when the smaller value isn't mentioned in the asm string. Extend this support from integers to also allowing fp values to be mismatched (if not mentioned in the asm string). llvm-svn: 102188
* rename testChris Lattner2010-04-231-0/+0
| | | | llvm-svn: 102182
* david conrad points out that {|} in inline assembly on arm are not asmChris Lattner2010-04-231-1/+12
| | | | | | variants. This fixes neon inline asm which my patch for PR6780 broke. llvm-svn: 102181
* ARM/APCS: Don't respect bit-field types when laying out structures.Daniel Dunbar2010-04-221-1/+1
| | | | | | | | | | | - This fixes the last known ABI issues with ARM/APCS. - I've run the first 1k ABITests with '--no-unsigned --no-vector --no-complex' on {armv6, armv7} x {-mno-thumb, -mthumb}, and the first 10k tests for armv7 -mthumb, for both function return types and single argument calls. These all pass now (they failed horribly before without --no-bitfield). llvm-svn: 102070
* IRgen: Fix another case where we generated an invalid access component when weDaniel Dunbar2010-04-221-0/+21
| | | | | | | immediately narrowed the access size. Fix this (and previous case) by just choosing a better access size up-front. llvm-svn: 102068
* IRgen: Fix case where we might generate an access component with width == 0, ifDaniel Dunbar2010-04-221-0/+35
| | | | | | | we have to narrow the access side immediately (can happen with packed, -fno-bitfield-type-align). llvm-svn: 102067
* IRgen: Set alignment correctly on bit-field accesses.Daniel Dunbar2010-04-221-6/+36
| | | | llvm-svn: 102046
* IRgen: Rewrite bit-field access policy to not access data beyond the bounds ↵Daniel Dunbar2010-04-221-3/+49
| | | | | | | | | | | | of the structure, which we also now verify as part of the post-layout consistency checks. - This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align. - Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues. - Review appreciated. llvm-svn: 102045
* ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignmentDaniel Dunbar2010-04-212-1/+27
| | | | | | exceeds the minimum ABI alignment. llvm-svn: 102019
* Convert test to FileCheck.Daniel Dunbar2010-04-211-57/+57
| | | | llvm-svn: 102018
* Convert test to FileCheck.Daniel Dunbar2010-04-211-32/+35
| | | | llvm-svn: 102016
* IRgen: Always use i8 arrays to access union bit-fields. This is ugly, butDaniel Dunbar2010-04-201-10/+23
| | | | | | | matches how we currently handle structs, and this correctly handles -fno-bitfield-type-align. llvm-svn: 101918
* don't slap noalias attribute on stret result arguments.Chris Lattner2010-04-205-28/+28
| | | | | | | | | This mirror's Dan's patch for llvm-gcc in r97989, and fixes the miscompilation in PR6525. There is some contention over whether this is the right thing to do, but it is the conservative answer and demonstrably fixes a miscompilation. llvm-svn: 101877
* recommit r101568 to fix PR6766Nuno Lopes2010-04-182-3/+16
| | | | | | as a side-effect, remove two FIXMEs now fixed llvm-svn: 101726
* Fix an assert when assigning a boolean value to a bitfield of type _Bool.Anders Carlsson2010-04-171-0/+16
| | | | llvm-svn: 101678
* revert r101568, which miscompiles this testcase, distilled from ldecod:Chris Lattner2010-04-172-12/+3
| | | | | | | | | | void exit_picture() { char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"}; foo(yuv_types); } llvm-svn: 101623
* fix PR6766: codegen of var initialized with wide charNuno Lopes2010-04-162-3/+12
| | | | llvm-svn: 101568
* add another test for the undef patch just for to have peace of mind :)Nuno Lopes2010-04-161-0/+3
| | | | | | this follows from C99 6.7.8p10: if it is a union, the first named member is initialized llvm-svn: 101539
* fix a bogus assertion exposed by a recent change: packing theChris Lattner2010-04-161-0/+5
| | | | | | | | | | | | | | | | | struct may cause it to shrink more than one byte. Before my recent changes we compiled the new test into: %0 = type { [6 x i8] } @x = global %0 { [6 x i8] undef }, align 2 ; <%0*> [#uses=0] which is obviously bogus. Now we compile it into: %0 = type <{ i32, i8, i8 }> @x = global %0 zeroinitializer, align 2 ; <%0*> [#uses=0] Where the last byte only is tail padding. llvm-svn: 101536
* emit padding as undef values, take 2Nuno Lopes2010-04-164-17/+44
| | | | | | merge also a few tests I had here for this feature, and FileCheck'ize one file llvm-svn: 101535
* IRgen: (Reapply 101222, with fixes) Move EmitStoreThroughBitfieldLValue to ↵Daniel Dunbar2010-04-151-0/+207
| | | | | | | | | | | | | | | | use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself. - Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job. - No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit. The new fixes from r101222 are: 1. The shift to the target position needs to occur after the value is extended to the correct size. This broke Clang bootstrap, among other things no doubt. 2. Swap the order of arguments to OR, to get a tad more constant folding. llvm-svn: 101339
* Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.Eric Christopher2010-04-151-4/+15
| | | | | | | | | Stop multiplying constant by 8 accordingly in the header and change intrinsic definition for what types we expect. Add to existing palignr test to check that we're emitting the correct things. llvm-svn: 101332
* improve altivec c++ support by adding casts, patch byChris Lattner2010-04-141-30/+29
| | | | | | Anton Yartsev! llvm-svn: 101281
* Speculatively revert "IRgen: Move EmitStoreThroughBitfieldLValue to use new ↵Daniel Dunbar2010-04-141-176/+0
| | | | | | CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.", I think it might be breaking bootstrap. llvm-svn: 101235
* IRgen: Move EmitStoreThroughBitfieldLValue to use new ↵Daniel Dunbar2010-04-141-0/+176
| | | | | | | | | | CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself. - Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job. - No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit. llvm-svn: 101222
* implement altivec.h and a bunch of support code, patch by Anton Yartsev!Chris Lattner2010-04-141-0/+333
| | | | llvm-svn: 101215
* Rework the ConstStructBuilder code to emit missing initializerChris Lattner2010-04-131-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | elements with explicit zero values instead of with tail padding. On an example like this: struct foo { int a; int b; }; struct foo fooarray[] = { {1, 2}, {4}, }; We now lay this out as: @fooarray = global [2 x %struct.foo] [%struct.foo { i32 1, i32 2 }, %struct.foo { i32 4, i32 0 }] instead of as: @fooarray = global %0 <{ %struct.foo { i32 1, i32 2 }, %1 { i32 4, [4 x i8] zeroinitializer } }> Preserving both the struct type of the second element, but also the array type of the entire thing. llvm-svn: 101155
* fix PR6660/6168: emit padding as zeros instead of undef. Because Chris Lattner2010-04-122-3/+21
| | | | | | | | trailing fields may not be represented in initializer lists, they are being handled as padding and those fields *must* be zero initialized. llvm-svn: 101067
* Fix run line so this test actually tests something.Benjamin Kramer2010-04-111-1/+1
| | | | llvm-svn: 100962
* fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.Chris Lattner2010-04-101-0/+7
| | | | llvm-svn: 100938
* @llvm.sqrt isn't really close enough to C's sqrt to justify emitting callsJohn McCall2010-04-071-10/+40
| | | | | | | | to the intrinsic, even when math-errno is off. Fixes rdar://problem/7828230 by falling back on the library function. llvm-svn: 100613
* add a testcase that the integrated assembler rejects, this verifies Chris Lattner2010-04-061-0/+8
| | | | | | that the integrated assembler is working. llvm-svn: 100545
* fix PR6780, properly handling the IR {|} escapes in inline asm strings.Chris Lattner2010-04-051-0/+12
| | | | llvm-svn: 100449
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-041-5/+7
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Avoid unneeded calls to opt/llvm-dis.Daniel Dunbar2010-04-022-3/+3
| | | | llvm-svn: 100236
* Merge several tests into switch.c.Daniel Dunbar2010-04-026-88/+94
| | | | llvm-svn: 100235
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-021-7/+5
| | | | llvm-svn: 100200
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-021-5/+7
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* Slightly relax test case. An upcoming LLVM commit will change the xor ↵Jakob Stoklund Olesen2010-03-301-1/+1
| | | | | | instruction. llvm-svn: 99962
* Fix test in -Asserts build.Daniel Dunbar2010-03-301-1/+1
| | | | llvm-svn: 99960
* Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.Bob Wilson2010-03-301-7/+5
| | | | llvm-svn: 99949
* Remember the regparm attribute in FunctionType::ExtInfo.Rafael Espindola2010-03-301-2/+6
| | | | | | Fixes PR3782. llvm-svn: 99940
* Fix this test on windows. When running on windows we printRafael Espindola2010-03-301-1/+1
| | | | | | | | double 0.000000e+000 instead of double 0.000000e+00 llvm-svn: 99932
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-5/+7
| | | | | | memmove, and memset llvm-svn: 99930
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-1/+2
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* When mapping restrict to noalias, look for 'restrict' on the parameter variableJohn McCall2010-03-271-0/+26
| | | | | | | instead of the canonical parameter type (which has correctly dropped all such direct qualifiers). Fixes PR6695. llvm-svn: 99688
* Implement new mangling for vectors.Nick Lewycky2010-03-261-0/+4
| | | | llvm-svn: 99616
OpenPOWER on IntegriCloud