summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Do not rely on getCompileUnit() to find source file information for a ↵Devang Patel2010-03-24
| | | | | | subprogram. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99410 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix memory leak in liveintervals: the destructor for VNInfos must be called,Torok Edwin2010-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | otherwise the SmallVector it contains doesn't free its memory. In most cases LiveIntervalAnalysis could get away by not calling the destructor, because VNInfos are bumpptr-allocated, and smallvectors usually don't grow. However when the SmallVector does grow it always leaks. This is the valgrind shown leak from the original testcase: ==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164 ==8206== at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220) ==8206== by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul t/libclamav/.libs/libclamav.so.6.1.0) ==8206== by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl amav.so.6.1.0) ==8206== by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau lt/libclamav/.libs/libclamav.so.6.1.0) ==8206== by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav .so.6.1.0) ==8206== by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc lamav.so.6.1.0) ==8206== by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de fault/libclamav/.libs/libclamav.so.6.1.0) ==8206== by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama v/.libs/libclamav.so.6.1.0) ==8206== by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama v/.libs/libclamav.so.6.1.0) ==8206== by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l ibs/libclamav.so.6.1.0) ==8206== by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0) ==8206== by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99400 91177308-0d34-0410-b5e6-96231b3b80d8
* add some accessors to callsite/callinst/invokeinst to checkChris Lattner2010-03-23
| | | | | | | | | for the noinline attribute, and make the inliner refuse to inline a call site when the call site is marked noinline even if the callee isn't. This fixes PR6682. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99341 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for llvm-gcc r99305. Radar 7659636.Stuart Hastings2010-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99306 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable ↵Evan Cheng2010-03-23
| | | | | | optimizations down stream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99282 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an incorrect logic causing instcombine to miss some _chk -> non-chk ↵Evan Cheng2010-03-23
| | | | | | transformations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99263 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6673: updating the callback should not clear the map.Chris Lattner2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99227 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit.Devang Patel2010-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99225 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL tests from LLVMC on valgrind or valgrind+leak-checking. WeJeffrey Yasskin2010-03-21
| | | | | | | | | don't care about leaks from tblgen, and I assume we don't care about valgrind errors in llvm-gcc/g++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99115 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for XFAILing valgrind runs with memory leak checking independentlyJeffrey Yasskin2010-03-20
| | | | | | | | | | of runs without leak checking. We add -vg to the triple for non-checked runs, or -vg_leak for checked runs. Also use this to XFAIL the TableGen tests, since tablegen leaks like a sieve. This includes some valgrindArgs refactoring. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99103 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Remove Darwin host specific tests, we don't need them anymore.Daniel Dunbar2010-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99100 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Tweak optimal_nop test to be host independent.Daniel Dunbar2010-03-20
| | | | | | - This also avoids us running valgrind on /usr/bin/as, which has leaks. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99099 91177308-0d34-0410-b5e6-96231b3b80d8
* pr6652: Use LDM to restore PC to the return address on ARMv4.Bob Wilson2010-03-20
| | | | | | | Patch by John Tytgat! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99096 91177308-0d34-0410-b5e6-96231b3b80d8
* tests: Mangle '-vg' onto the end of the triple when running under valgrind, soDaniel Dunbar2010-03-20
| | | | | | | we can use the standard XFAIL and XTARGET to conditional tests based on valgrind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99088 91177308-0d34-0410-b5e6-96231b3b80d8
* Stupid svn. Add back to the lost sibcall tests.Evan Cheng2010-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99033 91177308-0d34-0410-b5e6-96231b3b80d8
* call void @llvm.dbg.declare(metadata !{i32* null}, metadata !1)Devang Patel2010-03-19
| | | | | | | is valid, but not useful, when variable identified by !1 is optimized away by the optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98986 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the encoding problems of the crc32 instructions. All had the Operand sizeKevin Enderby2010-03-19
| | | | | | | | | | override prefix and only the r/m16 forms should have had that. Also for variant one, the AT&T syntax, added suffixes to all forms. Also added the missing 64-bit form for 'CRC32 r64, r/m8'. Plus added test cases for all forms and tweaked one test case to add the needed suffixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98980 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Add relocation support.Daniel Dunbar2010-03-19
| | | | | | | | - This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information. - There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily). - 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98974 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen ↵Daniel Dunbar2010-03-19
| | | | | | only" so they don't get selected by the asm matcher. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98972 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix ↵Daniel Dunbar2010-03-19
| | | | | | some corner cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98924 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a widening bug where we were not using the correct size for the loadMon P Wang2010-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98920 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Fix encoding for TEST64rr.Daniel Dunbar2010-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98919 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove `ignore` from LLVMC/TestWarnings.td. This avoidsJeffrey Yasskin2010-03-19
| | | | | | | | | https://bugs.kde.org/show_bug.cgi?id=231257 and seems not to have been needed in the first place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98917 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r98892. BSD systems may not have bash installed at all.Jeffrey Yasskin2010-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98909 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around a valgrind oddity where it doesn't pass the full path of aJeffrey Yasskin2010-03-18
| | | | | | | | | | | | script to the #! command by using bash instead of /bin/sh. Bash searches $PATH for its script argument, but dash, which /bin/sh resolves to on some systems, does not. https://bugs.kde.org/show_bug.cgi?id=231257 tracks the valgrind problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98892 91177308-0d34-0410-b5e6-96231b3b80d8
* X86MCCodeEmitter: Fix two minor issues with reloc_riprel_4byte_movq_load, weDaniel Dunbar2010-03-18
| | | | | | | were missing it on some movq instructions and were not including the appropriate PCrel bias. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98880 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement aDaniel Dunbar2010-03-18
| | | | | | | | temporary workaround for matching inc/dec on x86_64 to the correct instruction. - This hack will eventually be replaced with a robust mechanism for handling matching instructions based on the available target features. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98858 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an x86-64 encoding bug Daniel found.Chris Lattner2010-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98855 91177308-0d34-0410-b5e6-96231b3b80d8
* add a special relocation type for movq loads for objectChris Lattner2010-03-18
| | | | | | | | files that produce special relocation types where the linker changes movq's into lea's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98839 91177308-0d34-0410-b5e6-96231b3b80d8
* Turning off post-ra scheduling for x86. It isn't a consistent win.Evan Cheng2010-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98810 91177308-0d34-0410-b5e6-96231b3b80d8
* X86 address mode matching code MatchAddressRecursively does some aggressive ↵Evan Cheng2010-03-17
| | | | | | hack which require doing a RAUW. It may end up deleting some SDNode up stream. It should avoid referencing deleted nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98780 91177308-0d34-0410-b5e6-96231b3b80d8
* Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrmJohnny Chen2010-03-17
| | | | | | | | | | | | | instructions to help disassembly. We also changed the output of the addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. See, for example, A8.6.57/58/60. And modified test cases to not expect '+' in +reg or #+num. For example, ; CHECK: ldr.w r9, [r7, #28] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98745 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for r98728.Stuart Hastings2010-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98744 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix liveintervals handling of dbg_value instructions.Evan Cheng2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98686 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r98666 too; it's checkin-without-testing day!Daniel Dunbar2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98673 91177308-0d34-0410-b5e6-96231b3b80d8
* temporarily xfailChris Lattner2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98666 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an rdar number to this test.Dan Gohman2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98654 91177308-0d34-0410-b5e6-96231b3b80d8
* Chris pointed out that producing undef here is wrong inDuncan Sands2010-03-16
| | | | | | | general. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98649 91177308-0d34-0410-b5e6-96231b3b80d8
* --- Reverse-merging r98637 into '.':Bob Wilson2010-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U test/CodeGen/ARM/tls2.ll U test/CodeGen/ARM/arm-negative-stride.ll U test/CodeGen/ARM/2009-10-30.ll U test/CodeGen/ARM/globals.ll U test/CodeGen/ARM/str_pre-2.ll U test/CodeGen/ARM/ldrd.ll U test/CodeGen/ARM/2009-10-27-double-align.ll U test/CodeGen/Thumb2/thumb2-strb.ll U test/CodeGen/Thumb2/ldr-str-imm12.ll U test/CodeGen/Thumb2/thumb2-strh.ll U test/CodeGen/Thumb2/thumb2-ldr.ll U test/CodeGen/Thumb2/thumb2-str_pre.ll U test/CodeGen/Thumb2/thumb2-str.ll U test/CodeGen/Thumb2/thumb2-ldrh.ll U utils/TableGen/TableGen.cpp U utils/TableGen/DisassemblerEmitter.cpp D utils/TableGen/RISCDisassemblerEmitter.h D utils/TableGen/RISCDisassemblerEmitter.cpp U Makefile.rules U lib/Target/ARM/ARMInstrNEON.td U lib/Target/ARM/Makefile U lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/AsmPrinter/ARMInstPrinter.h D lib/Target/ARM/Disassembler U lib/Target/ARM/ARMInstrFormats.td U lib/Target/ARM/ARMAddressingModes.h U lib/Target/ARM/Thumb2ITBlockPass.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98640 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial ARM/Thumb disassembler check-in. It consists of a tablgen backendJohnny Chen2010-03-16
| | | | | | | | | | | | | | | | | | | (RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb, and the disassembler core which invokes the decoder function and builds up the MCInst based on the decoded Opcode. Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm instructions to help disassembly. We also changed the output of the addressing modes to omit the '+' from the assembler syntax #+/-<imm> or +/-<Rm>. See, for example, A8.6.57/58/60. And modified test cases to not expect '+' in +reg or #+num. For example, ; CHECK: ldr.w r9, [r7, #28] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98637 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop using the old pre-UAL syntax for LDM/STM instruction suffixes.Bob Wilson2010-03-16
| | | | | | | | This does not move entirely to UAL syntax, since the default "increment after" suffix is empty but we still use "IA" for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98635 91177308-0d34-0410-b5e6-96231b3b80d8
* Check that P is not zero initialized.Duncan Sands2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98627 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for the change in r98586.Bob Wilson2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98610 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot testcase for r98599.Bill Wendling2010-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98602 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the third (and last known) case of code update problems due Chris Lattner2010-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | to LLVM IR changes with addr label weirdness. In the testcase, we generate references to the two bb's when codegen'ing the first function: _test1: ## @test1 leaq Ltmp0(%rip), %rax .. leaq Ltmp1(%rip), %rax Then continue to codegen the second function where the blocks get merged. We're now smart enough to emit both labels, producing this code: _test_fun: ## @test_fun ## BB#0: ## %entry Ltmp1: ## Block address taken Ltmp0: ## BB#1: ## %ret movl $-1, %eax ret Rejoice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98595 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.Daniel Dunbar2010-03-15
| | | | | | | - Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue. - This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98592 91177308-0d34-0410-b5e6-96231b3b80d8
* Recognize code for doing vector gather/scatter index calculations withDan Gohman2010-03-15
| | | | | | | | | 32-bit indices. Instead of shuffling each element out of the index vector, when all indices are needed, just store the input vector to the stack and load the elements out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98588 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and ↵Daniel Dunbar2010-03-15
| | | | | | external relocations, but we don't have x86_64 relocations yet). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98583 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for the case when a reference to a addr-of-bb Chris Lattner2010-03-15
| | | | | | | | | | | label is generated, but then the block is deleted. Since the value is undefined, we just emit the label right after the entry label of the function. It might matter that the label is in the same section as the function was afterall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98579 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the case when a reference to an address taken BB is emitted in oneChris Lattner2010-03-15
| | | | | | | | | function, then the BB is RAUW'd before the definition is emitted. There are still two cases not being handled, but this should improve us back to the situation before I touched anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98566 91177308-0d34-0410-b5e6-96231b3b80d8