aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix pcrel relocations that cross sections.Rafael Espindola2010-12-071-0/+107
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121107 91177308-0d34-0410-b5e6-96231b3b80d8
* test/Archive/check_binary_output.ll: Add a new test to check output of ↵NAKAMURA Takumi2010-12-071-0/+4
| | | | | | 'llvm-ar -p' is sane. Thanks to Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121106 91177308-0d34-0410-b5e6-96231b3b80d8
* test/Other/close-stderr.ll: Require the feature 'shell'. It is not ↵NAKAMURA Takumi2010-12-071-0/+1
| | | | | | executable on Win32 but it is executable on MSYS-bash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121105 91177308-0d34-0410-b5e6-96231b3b80d8
* test: Add the feature 'shell' on LLVM_ON_UNIX.NAKAMURA Takumi2010-12-071-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121104 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r121100 as it's causing clang to failEric Christopher2010-12-071-23/+0
| | | | | | | CodeGenCXX/virtual-base-ctor.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121102 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR8710 - teach global opt that some constantexprs are too complex toChris Lattner2010-12-071-0/+23
| | | | | | | put in a global variable's initializer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121100 91177308-0d34-0410-b5e6-96231b3b80d8
* Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath ↵Michael J. Spencer2010-12-072-0/+14
| | | | | | | | defaults to \Windows\. If I typed anything else it would just decline into cursing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121095 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a crash reduced from gcc produced assembly.Rafael Espindola2010-12-071-0/+122
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121085 91177308-0d34-0410-b5e6-96231b3b80d8
* Second attempt at converting Thumb2's LDRpci, including updating the ↵Owen Anderson2010-12-071-1/+1
| | | | | | gazillion places that need to know about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121082 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement jump threading of 'indirectbr' by keeping track of whether we're ↵Frits van Bommel2010-12-061-0/+61
| | | | | | looking for ConstantInt*s or BlockAddress*s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121066 91177308-0d34-0410-b5e6-96231b3b80d8
* If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG ↵Devang Patel2010-12-0612-288/+227
| | | | | | message instead of creating DBG_VALUE for undefined value in reg0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121059 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed reversed operands for IDIV and CMP instructions in MBlaze backend.Wesley Peck2010-12-062-4/+4
| | | | | | | | | Use BRAD instead of BRD for indirect branches in MBlaze backend. patch contributed by Jack Whitham! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121044 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a 16-bit immediate value detection bug in the MBlaze delay slot filler.Wesley Peck2010-12-061-1/+1
| | | | | | | | | Address more hazards in the MBlaze delay slot filler. patch contributed by Jack Whitham! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121037 91177308-0d34-0410-b5e6-96231b3b80d8
* Second try at making direct object emission produce the same resultsRafael Espindola2010-12-061-2/+2
| | | | | | | as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc bootstrap on darwin10 using darwin9's assembler and linker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121006 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert previous two patches while I try to find out how to make bothRafael Espindola2010-12-061-1/+1
| | | | | | linux and darwin assemblers happy :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121004 91177308-0d34-0410-b5e6-96231b3b80d8
* Update test for the extra =.Rafael Espindola2010-12-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121001 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add shift instructionsChe-Liang Chiou2010-12-062-0/+65
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120982 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PadSectionToAlignment on windows.Rafael Espindola2010-12-062-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120978 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8728, a miscompilation I recently introduced. When optimizingChris Lattner2010-12-061-1/+15
| | | | | | | | | | | | | | | | | | | | | | | memcpy's like: memcpy(A, B) memcpy(A, C) we cannot delete the first memcpy as dead if A and C might be aliases. If so, we actually get: memcpy(A, B) memcpy(A, A) which is not correct to transform into: memcpy(A, A) This patch was heavily influenced by Jakub Staszak's patch in PR8728, thanks Jakub! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120974 91177308-0d34-0410-b5e6-96231b3b80d8
* Making use of VFP / NEON floating point multiply-accumulate / subtraction isEvan Cheng2010-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | difficult on current ARM implementations for a few reasons. 1. Even though a single vmla has latency that is one cycle shorter than a pair of vmul + vadd, a RAW hazard during the first (4? on Cortex-a8) can cause additional pipeline stall. So it's frequently better to single codegen vmul + vadd. 2. A vmla folowed by a vmul, vmadd, or vsub causes the second fp instruction to stall for 4 cycles. We need to schedule them apart. 3. A vmla followed vmla is a special case. Obvious issuing back to back RAW vmla + vmla is very bad. But this isn't ideal either: vmul vadd vmla Instead, we want to expand the second vmla: vmla vmul vadd Even with the 4 cycle vmul stall, the second sequence is still 2 cycles faster. Up to now, isel simply avoid codegen'ing fp vmla / vmls. This works well enough but it isn't the optimial solution. This patch attempts to make it possible to use vmla / vmls in cases where it is profitable. A. Add missing isel predicates which cause vmla to be codegen'ed. B. Make sure the fmul in (fadd (fmul)) has a single use. We don't want to compute a fmul and a fmla. C. Add additional isel checks for vmla, avoid cases where vmla is feeding into fp instructions (except for the #3 exceptional case). D. Add ARM hazard recognizer to model the vmla / vmls hazards. E. Add a special pre-regalloc case to expand vmla / vmls when it's likely the vmla / vmls will trigger one of the special hazards. Work in progress, only A+B are enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120960 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR 4170 by having ExtractValueInst::getIndexedType() reject ↵Frits van Bommel2010-12-052-0/+15
| | | | | | | | | out-of-bounds indexing. Also add asserts that the indices are valid in InsertValueInst::init(). ExtractValueInst already asserts when constructed with invalid indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120956 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach SimplifyCFG to turnFrits van Bommel2010-12-051-0/+118
| | | | | | | | | | (indirectbr (select cond, blockaddress(@fn, BlockA), blockaddress(@fn, BlockB))) into (br cond, BlockA, BlockB). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120943 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach X86ISelLowering that the second result of X86ISD::UMUL is a flagsChris Lattner2010-12-051-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | result. This allows us to compile: void *test12(long count) { return new int[count]; } into: test12: movl $4, %ecx movq %rdi, %rax mulq %rcx movq $-1, %rdi cmovnoq %rax, %rdi jmp __Znam ## TAILCALL instead of: test12: movl $4, %ecx movq %rdi, %rax mulq %rcx seto %cl testb %cl, %cl movq $-1, %rdi cmoveq %rax, %rdi jmp __Znam Of course it would be even better if the regalloc inverted the cmov to 'cmovoq', which would eliminate the need for the 'movq %rdi, %rax'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120936 91177308-0d34-0410-b5e6-96231b3b80d8
* it turns out that when ".with.overflow" intrinsics were added to the X86Chris Lattner2010-12-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backend that they were all implemented except umul. This one fell back to the default implementation that did a hi/lo multiply and compared the top. Fix this to check the overflow flag that the 'mul' instruction sets, so we can avoid an explicit test. Now we compile: void *func(long count) { return new int[count]; } into: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] seto %cl ## encoding: [0x0f,0x90,0xc1] testb %cl, %cl ## encoding: [0x84,0xc9] movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff] cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8] jmp __Znam ## TAILCALL instead of: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2] movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff] cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8] jmp __Znam ## TAILCALL Other than the silly seto+test, this is using the o bit directly, so it's going in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120935 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the rest of the linux miscompares :)Chris Lattner2010-12-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120933 91177308-0d34-0410-b5e6-96231b3b80d8
* generalize the previous check to handle -1 on either side of the Chris Lattner2010-12-051-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | select, inserting a not to compensate. Add a missing isZero check that I lost somehow. This improves codegen of: void *func(long count) { return new int[count]; } from: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] testq %rdx, %rdx ## encoding: [0x48,0x85,0xd2] movq $-1, %rdi ## encoding: [0x48,0xc7,0xc7,0xff,0xff,0xff,0xff] cmoveq %rax, %rdi ## encoding: [0x48,0x0f,0x44,0xf8] jmp __Znam ## TAILCALL ## encoding: [0xeb,A] to: __Z4funcl: ## @_Z4funcl movl $4, %ecx ## encoding: [0xb9,0x04,0x00,0x00,0x00] movq %rdi, %rax ## encoding: [0x48,0x89,0xf8] mulq %rcx ## encoding: [0x48,0xf7,0xe1] cmpq $1, %rdx ## encoding: [0x48,0x83,0xfa,0x01] sbbq %rdi, %rdi ## encoding: [0x48,0x19,0xff] notq %rdi ## encoding: [0x48,0xf7,0xd7] orq %rax, %rdi ## encoding: [0x48,0x09,0xc7] jmp __Znam ## TAILCALL ## encoding: [0xeb,A] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120932 91177308-0d34-0410-b5e6-96231b3b80d8
* relax this to handle linux defaulting to -static.Chris Lattner2010-12-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120930 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve an integer select optimization in two ways:Chris Lattner2010-12-051-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. generalize (select (x == 0), -1, 0) -> (sign_bit (x - 1)) to: (select (x == 0), -1, y) -> (sign_bit (x - 1)) | y 2. Handle the identical pattern that happens with !=: (select (x != 0), y, -1) -> (sign_bit (x - 1)) | y cmov is often high latency and can't fold immediates or memory operands. For example for (x == 0) ? -1 : 1, before we got: < testb %sil, %sil < movl $-1, %ecx < movl $1, %eax < cmovel %ecx, %eax now we get: > cmpb $1, %sil > sbbl %eax, %eax > orl $1, %eax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120929 91177308-0d34-0410-b5e6-96231b3b80d8
* merge some tests into select.ll and make them more specific.Chris Lattner2010-12-057-99/+88
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120928 91177308-0d34-0410-b5e6-96231b3b80d8
* rename testChris Lattner2010-12-051-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120927 91177308-0d34-0410-b5e6-96231b3b80d8
* remove two tests that aren't really testing anything.Chris Lattner2010-12-052-88/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120926 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patterns for the x86 popcnt instruction.Benjamin Kramer2010-12-041-0/+38
| | | | | | | | - Also adds a new POPCNT subtarget feature that is currently enabled if the target supports SSE4.2 (nehalem) or SSE4A (barcelona). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120917 91177308-0d34-0410-b5e6-96231b3b80d8
* The Thumb tADDrSPi instruction is not valid when the destination is SP.Bob Wilson2010-12-041-0/+11
| | | | | | Check for that and try narrowing it to tADDspi instead. Radar 8724703. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120892 91177308-0d34-0410-b5e6-96231b3b80d8
* There are two reasons why we might want to useRafael Espindola2010-12-041-1/+1
| | | | | | | | | | | | | | | | foo = a - b .long foo instead of just .long a - b First, on darwin9 64 bits the assembler produces the wrong result. Second, if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not consider a - b to be a constant but will if the dummy foo is created. Split how we handle these cases. The first one is something MC should take care of. The second one has to be handled by the caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120889 91177308-0d34-0410-b5e6-96231b3b80d8
* Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoidRafael Espindola2010-12-042-0/+46
| | | | | | | | | | | doing that if the target is darwin10 or newer. This fixes *) Direct object emission was producing objects without the workaround on darwin9. *) Assembly printing was producing objects with the workaround on linux. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120866 91177308-0d34-0410-b5e6-96231b3b80d8
* Encode the 32-bit wide Thumb (and Thumb2) instructions with the high orderJim Grosbach2010-12-0314-448/+448
| | | | | | halfword being emitted to the stream first. rdar://8728174 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120848 91177308-0d34-0410-b5e6-96231b3b80d8
* When using the 'push' mnemonic for Thumb2 stmdb, be explicit when it's theJim Grosbach2010-12-032-3/+3
| | | | | | 32-bit wide version by adding the .w suffix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120838 91177308-0d34-0410-b5e6-96231b3b80d8
* Hide tests, that check .loc, .file in output assembly, from darwin9 buildbot.Devang Patel2010-12-022-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120750 91177308-0d34-0410-b5e6-96231b3b80d8
* Use set directive for StartMinusEndExpr.Devang Patel2010-12-021-0/+22
| | | | | | | This is a fix for llvm-gcc-i386-darwin9 buildbot failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120742 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for r120740. Radar 8712503.Stuart Hastings2010-12-021-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120741 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust this test for the fact that the stores are no longerDuncan Sands2010-12-021-1/+1
| | | | | | | being combined (which is being tracked as PR8699). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120734 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL for now. If someone with access to an ARM/Linux host wants to have a lookJim Grosbach2010-12-022-0/+2
| | | | | | that would be great. They're ARM JIT failures, so without that, it's tough. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120731 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test.Evan Cheng2010-12-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120730 91177308-0d34-0410-b5e6-96231b3b80d8
* This test dates from the time when llvm-gcc had problems if two types wereDuncan Sands2010-12-021-12/+0
| | | | | | | | | | | | named the same, so it had to qualify type names according to the enclosing scope to ensure uniqueness. This is no longer needed for correctness (though it may be helpful when reading the IR), so this test has lost its importance. Zap it because dragonegg will never be able to produce the qualified type name since modern gcc zaps language specific info (such as whether a type is nested inside another - needed to get X::Y here) before dragonegg is reached. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120721 91177308-0d34-0410-b5e6-96231b3b80d8
* test/Archive/extract.ll: Use cmp instead of diff. Thanks to Danil Malyshev!NAKAMURA Takumi2010-12-021-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120698 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix and re-enable tail call optimization of expanded libcalls.Evan Cheng2010-12-011-6/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120622 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename temporary symbols if they conflict with artificial symbols createdRafael Espindola2010-12-011-0/+10
| | | | | | | | | by the assembler. This was blocking parsing any large .s produced by clang for example. Fixes PR8596. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120603 91177308-0d34-0410-b5e6-96231b3b80d8
* Add correct encodings for STRD and LDRD, including fixup support. ↵Owen Anderson2010-12-012-2/+2
| | | | | | Additionally, update these to unified syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120589 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively disable x86 portion of r120501 to appease the x86_64 buildbot.Evan Cheng2010-12-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120549 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM/MC/ELF relocation "hello world" for movw/movt.Jason W Kim2010-12-011-0/+42
| | | | | | | | | | | | | Lifted adjustFixupValue() from Darwin for sharing w ELF. Test added TODO: refactor ELFObjectWriter::RecordRelocation more. Possibly share more code with Darwin? Lots more relocations... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120534 91177308-0d34-0410-b5e6-96231b3b80d8