summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* clang/test/CodeGen/2008-01-25-ZeroSizedAggregate.c: [PR8833] Add REQUIRES: ↵NAKAMURA Takumi2012-09-121-0/+1
| | | | | | LP64. It fails with +Asserts for Win64. llvm-svn: 163708
* clang/test: [PR8833] Introduce the feature "LP64" to suppress ↵NAKAMURA Takumi2012-09-122-0/+2
| | | | | | | | LLP64-incompatible tests. I think some of them could be rewritten to fit also LLP64. llvm-svn: 163699
* [ms-inline asm] Add $$ before numeric constants in the IR.Chad Rosier2012-09-111-8/+14
| | | | llvm-svn: 163581
* -fcatch-undefined-behavior: Factor emission of the creation of, and branch to,Richard Smith2012-09-081-3/+6
| | | | | | | | | the trap BB out of the individual checks and into a common function, to prepare for making this code call into a runtime library. Rename the existing EmitCheck to EmitTypeCheck to clarify it and to move it out of the way of the new EmitCheck. llvm-svn: 163451
* [ms-inline asm] Output empty asm statements for the directives we don'tChad Rosier2012-09-061-0/+9
| | | | | | | handle. Otherwise, the AsmParser will explode if we try to generate an object files. llvm-svn: 163345
* [ms-inline asm] The IR representation of inline assembly enumerates the inputChad Rosier2012-09-061-1/+1
| | | | | | | and output expressions much like that in GNU-style inline assembly. Output expressions are first. Do this for MS-style inline asms. llvm-svn: 163342
* Use custom ABIInfo for le32/PNaCl argument codegenDerek Schuff2012-09-062-0/+102
| | | | | | | | | This patch uses a new ABIInfo implementation specific to the le32 target, rather than falling back to DefaultABIInfo. Its behavior is basically the same, but it also allows the regparm argument attribute. It also includes basic tests for argument codegen and attributes. llvm-svn: 163333
* Update for r163231.Chad Rosier2012-09-051-16/+16
| | | | llvm-svn: 163232
* [ms-inline asm] Update test case for r163181.Chad Rosier2012-09-051-16/+16
| | | | llvm-svn: 163182
* [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. ThisChad Rosier2012-09-041-16/+16
| | | | | | | implementation does not co-exist well with how the sideeffect and alignstack attributes are handled. llvm-svn: 163173
* [ms-inline asm] The MCInstrDesc only tracks register definitions. For now,Chad Rosier2012-09-041-2/+1
| | | | | | | assume that if the 1st operands is an expression and the instruction mayStore, then it is a memory definition. llvm-svn: 163144
* Fix test case for Release builds.Chad Rosier2012-08-281-1/+1
| | | | llvm-svn: 162800
* [ms-inline asm] Have MSAsmStmts use the generic EmitAsmStmt codegen function.Chad Rosier2012-08-281-1/+2
| | | | llvm-svn: 162796
* Make test pass in Release builds, which use a different naming scheme for ↵Benjamin Kramer2012-08-281-1/+1
| | | | | | llvm values. llvm-svn: 162771
* Merge test case for PR13704 into exprs.c to reduce test casesMichael Liao2012-08-282-9/+10
| | | | llvm-svn: 162769
* Fix PR13704Michael Liao2012-08-281-0/+9
| | | | | | | - The increment needs to be signed value to preserve the original value when its data type is larger than 64-bit integer. llvm-svn: 162766
* CodeGen: When emitting stores for an initializer, only emit a GEP if we ↵Benjamin Kramer2012-08-271-0/+2
| | | | | | | | really need the store. This avoids emitting many dead GEPs for large zero-initialized arrays. llvm-svn: 162701
* Support MIPS DSP Rev2 intrinsics.Simon Atanasyan2012-08-272-0/+233
| | | | | | The patch reviewed by Akira Hatanaka. llvm-svn: 162669
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-253-0/+35
| | | | | | | | | | | | | | | | by this mode, and also check for signed left shift overflow. The rules for the latter are a little subtle: * neither C89 nor C++98 specify the behavior of a signed left shift at all * in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior * in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has undefined behavior As of this change, we use the C99 rules for all C language variants, and the C++11 rules for all C++ language variants. Once we have individual -fcatch-undefined-behavior= flags, this should be revisited. llvm-svn: 162634
* New -fcatch-undefined-behavior features:Richard Smith2012-08-241-3/+7
| | | | | | | | * when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check * check that references are bound to appropriate storage * check that 'this' has appropriate storage in member accesses and member function calls llvm-svn: 162523
* Use the alignment from lvalue emission to more accurately compute the alignmentEli Friedman2012-08-231-0/+20
| | | | | | | of a pointer for builtin emission, instead of just depending on the type of the pointee. <rdar://problem/11314941>. llvm-svn: 162425
* [ms-inline asm] Start sending non-simple inline asms to the AsmParser.Chad Rosier2012-08-221-1/+1
| | | | | | | The parser still can't handle all cases, so fall back to emitting a simple MSAsmStmt if we get into trouble. llvm-svn: 162382
* Make ceil/floor/nearbyint/rint/round const even with -fmath-errno.Benjamin Kramer2012-08-221-1/+16
| | | | | | | | The conditions described by POSIX can never happen with IEEE-754 floats. When the function is const we can emit a single sse4.1 instruction for it, without losing anything :) llvm-svn: 162379
* Math builtin definition tweaks.Benjamin Kramer2012-08-221-0/+176
| | | | | | | | | | | | | | | | | There were missed optimizations when the system headers didn't have attributes in place, specifically: - Add copysign, exp2, log2, nearbyint, rint and trunc to the list. These are functions that get inlined by LLVM's optimizer, but only when they have the right attributes. - Mark copysign, fabs, fmax, fmin and trunc const unconditionally. Previously these were only const with -fno-math-errno, but they never set errno per POSIX. For ceil/floor/nearbyint/round I'm not aware of any implementation that sets errno, but POSIX says it may signal overflow so I left them alone for now. llvm-svn: 162375
* [ms-inline asm] Remove this test case and the associated special case code.Chad Rosier2012-08-211-17/+11
| | | | llvm-svn: 162288
* When this test case was first created it wasJack Carter2012-08-211-1/+6
| | | | | | | | | just trying to show it did not crash and burn. This patch checks that the resultant .ll contents are correct. llvm-svn: 162249
* Fix InitListExpr::isStringLiteralInit so it handles various edge cases ↵Eli Friedman2012-08-201-0/+15
| | | | | | correctly. PR13643. llvm-svn: 162226
* [ms-inline asm] Add a helper function, isMSAsmKeyword().Chad Rosier2012-08-161-0/+20
| | | | | | | | These require special handling, which we don't currently handle. This is being put in place to ensure we don't do invalid symbol table lookups or try to parse invalid assembly. The test cases just makes sure the latter isn't happening. llvm-svn: 162050
* Fixup test case for Release builds.Chad Rosier2012-08-161-1/+0
| | | | llvm-svn: 162038
* [ms-inline asm] Start tracking which tokens are registers and which areChad Rosier2012-08-161-0/+17
| | | | | | | | variables, function or label references. The former is a potential clobber. The latter is either an input or an output. Unfortunately, it's difficult to test this patch at the moment, but the added test case will eventually do so. llvm-svn: 162026
* Remove names from the CHECK lines.Tanya Lattner2012-08-161-1/+1
| | | | llvm-svn: 162003
* Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner2012-08-161-1/+2
| | | | | | Add test case. llvm-svn: 162002
* [ms-inline asm] Use a set container to remove redundant clobbers.Chad Rosier2012-08-151-1/+1
| | | | llvm-svn: 161991
* [ms-inline asm] MSVC parses multiple __asm statements on a single line as oneChad Rosier2012-08-151-5/+2
| | | | | | | | | | | | statement. For example, if (x) __asm out dx, ax __asm out dx, ax results in a single inline asm statement (i.e., both "out dx, ax" statements are predicated on if(x)). llvm-svn: 161986
* Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606John Criswell2012-08-151-0/+18
| | | | | | | Changed the alignment of an LValue to be 64 bits so that we can handle alignment values up to half of a 64-bit address space. llvm-svn: 161971
* [ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier2012-08-151-5/+5
| | | | | | | This is a reapplication of r161914 now that the scoping issue has been resolved in r161966. llvm-svn: 161967
* Revert this to try to bring the i386 bots back.Eric Christopher2012-08-151-5/+5
| | | | llvm-svn: 161931
* [ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier2012-08-151-5/+5
| | | | llvm-svn: 161914
* [ms-inline asm] More test cases to make sure buildMSAsmString() doesn't regress.Chad Rosier2012-08-141-0/+42
| | | | llvm-svn: 161908
* irgen: inline code for several of complex builtinFariborz Jahanian2012-08-141-0/+71
| | | | | | calls. // rdar://8315199 llvm-svn: 161891
* [ms-inline asm] Add a helpful assert.Chad Rosier2012-08-141-5/+10
| | | | llvm-svn: 161890
* Avoid using i64 types for vld1q_lane/vst1q_lane intrinsics.Bob Wilson2012-08-141-0/+34
| | | | | | | | | The backend has to legalize i64 types by splitting them into two 32-bit pieces, which leads to poor quality code. If we produce code for these intrinsics that uses one-element vector types, which can live in Neon vector registers without getting split up, then the generated code is much better. Radar 11998303. llvm-svn: 161879
* ARM: enable struct byval for AAPCS-VFP.Manman Ren2012-08-131-0/+4
| | | | | | rdar://9877866 llvm-svn: 161790
* [ms-inline asm] Have patchMSAsmStrings() return a vector or AsmStrings.Chad Rosier2012-08-131-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | The AsmParser expects a single asm instruction, but valid ms-style inline asm statements may contain multiple instructions. This happens with asm blocks __asm { mov ebx, eax mov ecx, ebx } or when multiple asm statements are adjacent to one another __asm mov ebx, eax __asm mov ecx, ebx and __asm mov ebx, eax __asm mov ecx, ebx Currently, asm blocks are not properly handled. llvm-svn: 161780
* ARM: enable struct byval for AAPCS.Manman Ren2012-08-101-0/+6
| | | | | | | rdar://9877866 PR://13350 llvm-svn: 161694
* [ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.Chad Rosier2012-08-102-1/+11
| | | | llvm-svn: 161642
* Fix AAPCS ABI. I can't actually test this, but it restores the behavior ↵Eli Friedman2012-08-091-0/+6
| | | | | | from before r159168. PR13562. llvm-svn: 161554
* [ms-inline asm] Add basic codegen support for simple asm stmts. Currently,Chad Rosier2012-08-081-1/+2
| | | | | | only machine specific clobbers are modeled. llvm-svn: 161524
* [ms-inline asm] Add a very simple test case. Basically, we're only testing forChad Rosier2012-08-081-0/+7
| | | | | | crashers at the moment (and coincidentally this case was causing a crash). llvm-svn: 161520
* Fix MIPS DSP Rev1 intrinsics memory properties.Simon Atanasyan2012-08-061-2/+98
| | | | | | The patch reviewed by Akira Hatanaka. llvm-svn: 161333
OpenPOWER on IntegriCloud