summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* macho-dump: Fix CMake build, following up to r121466.NAKAMURA Takumi2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121476 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121471 91177308-0d34-0410-b5e6-96231b3b80d8
* macho-dump: Switch to C++ macho-dump tool.Daniel Dunbar2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121466 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121461 91177308-0d34-0410-b5e6-96231b3b80d8
* Add dependency to "make check".NAKAMURA Takumi2010-12-10
| | | | | | cmake/modules/AddLLVM.cmake: Add empty "phony" target in add_llvm_loadable_module() even if loadable module were not supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121455 91177308-0d34-0410-b5e6-96231b3b80d8
* Formalize the notion that AVX and SSE are non-overlapping extensions from ↵Nate Begeman2010-12-10
| | | | | | the compiler's point of view. Per email discussion, we either want to always use VEX-prefixed instructions or never use them, and are taking "HasAVX" to mean "Always use VEX". Passing -mattr=-avx,+sse42 should serve to restore legacy SSE support when desirable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121439 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-09
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121434 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for parsing ARM arithmetic instructions that update or don't updateKevin Enderby2010-12-09
| | | | | | | | | | the condition codes. Where the ones that do have an 's' suffix and the ones that don't don't have the suffix. The trick is if MatchInstructionImpl() fails we try again after adding a CCOut operand with the correct value and removing the 's' if present. Four simple test cases added for now, lots more to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121401 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM stm/ldm instructions require more than one register in the register list.Jim Grosbach2010-12-09
| | | | | | | | Otherwise, a plain str/ldr should be used instead. Make sure we account for that in prologue/epilogue code generation. rdar://8745460 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121391 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ROTR and ROTRV mips32 instructions. Patch by Akira HatanakaBruno Cardoso Lopes2010-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121377 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance memcpyopt to zap memcpy's that have the same src/dst.Chris Lattner2010-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121362 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR8753, eliminating a case where we'd infinitely make a Chris Lattner2010-12-09
| | | | | | | | | substitution because it doesn't actually change the IR. Patch by Jakub Staszak! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121361 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the darwin tlv support to use a chain and return to copyingEric Christopher2010-12-09
| | | | | | | | | the output to the correct register. Fixes a hidden problem uncovered by the last patch where we'd try to DAG combine our MVT::Other node oddly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121358 91177308-0d34-0410-b5e6-96231b3b80d8
* Really check that the bits that will become zero are actually already zeroDan Gohman2010-12-09
| | | | | | | before eliminating the operation that zeros them. This fixes rdar://8739316. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121353 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous copy from DAG conversion for darwin tls. This wasEric Christopher2010-12-09
| | | | | | | | popping up at O0 when it wasn't folded and the fast allocator would complain. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121330 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow a slash, '/', as a prefix separator for X86. rdar://8741045Kevin Enderby2010-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121320 91177308-0d34-0410-b5e6-96231b3b80d8
* Move this test to tlv* to make it easier to notice versus linux tlsEric Christopher2010-12-08
| | | | | | | support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121316 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM/MC/ELF TPsoft is now a proper pseudo inst.Jason W Kim2010-12-08
| | | | | | | | | | | Added test to check bl __aeabi_read_tp gets emitted properly for ELF/ASM as well as ELF/OBJ (including fixup) Also added support for ELF::R_ARM_TLS_IE32 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121312 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bad prologue / epilogue codegen bug where the compiler would emit illegalEvan Cheng2010-12-07
| | | | | | | | | | | | vpush instructions to save / restore VFP / NEON registers like this: vpush {d8,d10,d11} vpop {d8,d10,d11} vpush and vpop do not allow gaps in the register list. rdar://8728956 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121197 91177308-0d34-0410-b5e6-96231b3b80d8
* Match a pattern generated by a dag combiner opt where:Bruno Cardoso Lopes2010-12-07
| | | | | | | | | | (select (load (load tga0)) (load tga1)) => (load (select (load tga0) tga1)) Thanks to Akira for pointing that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121163 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix absolute recording of differences of symbols in two sections. Reduced ↵Rafael Espindola2010-12-07
| | | | | | from ctor_dtor_count-2.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121152 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix relocations with weak definitions.Rafael Espindola2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121114 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert test/Archive/check_binary_output.ll". It fails on a buildbot.NAKAMURA Takumi2010-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121113 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r121100 with a tweak to constant fold ConstExprs with TargetDataChris Lattner2010-12-07
| | | | | | | | | (if available) as we go so that we get simple constantexprs not insane ones. This fixes the failure of clang/test/CodeGenCXX/virtual-base-ctor.cpp that the previous iteration of this patch had. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121111 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pcrel relocations that cross sections.Rafael Espindola2010-12-07
| | | | 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-07
| | | | | | '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-07
| | | | | | 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-07
| | | | 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-07
| | | | | | | 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-07
| | | | | | | 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-07
| | | | | | | | 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-07
| | | | 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-07
| | | | | | 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-06
| | | | | | 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-06
| | | | | | 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-06
| | | | | | | | | 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-06
| | | | | | | | | 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-06
| | | | | | | 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-06
| | | | | | 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-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121001 91177308-0d34-0410-b5e6-96231b3b80d8
* ptx: add shift instructionsChe-Liang Chiou2010-12-06
| | | | 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-06
| | | | 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-06
| | | | | | | | | | | | | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05
| | | | | | | | | 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-05
| | | | | | | | | | (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-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-05
| | | | 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-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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