summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* llvm-profdata: Don't pipe stderr into show for the testsJustin Bogner2014-03-22
| | | | | | | | Some text shows up on stderr when using guard malloc, and this test was trying to treat that as input to llvm-profdata show. There's no reason to pipe stderr into show at all here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204549 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM IAS: properly handle function entries in .thumbSaleem Abdulrasool2014-03-22
| | | | | | | | | | | | | | | | | | | | When a label is parsed, check if there is type information available for the label. If so, check if the symbol is a function. If the symbol is a function and we are in thumb mode and no explicit thumb_func has been emitted, adjust the symbol data to indicate that the function definition is a thumb function. The application of this inferencing is improved value handling in the object file (the required thumb bit is set on symbols which are thumb functions). It also helps improve compatibility with binutils. The one complication that arises from this handling is the MCAsmStreamer. The default implementation of getOrCreateSymbolData in MCStreamer does not support tracking the symbol data. In order to support the semantics of thumb functions, track symbol data in assembly streamer. Although O(n) in number of labels in the TU, this is already done in various other streamers and as such the memory overhead is not a practical concern in this scenario. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204544 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Fix the VSX v2f64 return registerHal Finkel2014-03-22
| | | | | | | v2f64 values, like other 128-bit values, are returned under VSX in register vs34 (Altivec register v2). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204543 91177308-0d34-0410-b5e6-96231b3b80d8
* [Constant Hoisting] Fix multiple entries for the same basic block in PHI nodes.Juergen Ributzka2014-03-22
| | | | | | | | | | | | | | | | | | | | A PHI node usually has only one value/basic block pair per incoming basic block. In the case of a switch statement it is possible that a following PHI node may have more than one such pair per incoming basic block. E.g.: %0 = phi i64 [ 123456, %case2 ], [ 654321, %Entry ], [ 654321, %Entry ] This is valid and the verfier doesn't complain, because both values are the same. Constant hoisting materializes the constant for each operand separately and the value is still the same, but the variable names have changed. As a result the verfier can't recognize anymore that they are the same value and complains. This fix adds special update code for PHI node in constant hoisting to prevent this corner case. This fixes <rdar://problem/16394449> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204537 91177308-0d34-0410-b5e6-96231b3b80d8
* [DAG] Fix an assertion failure caused by an invalid cast in method ↵Andrea Di Biagio2014-03-22
| | | | | | | | | | | | | | 'BuildVectorSDNode::isConstantSplat' This patch renames method 'isConstantSplat' as 'getConstantSplatValue' (mainly for consistency reasons), and rewrites its logic to ensure that we always perform a legal 'cast<ConstantSDNode>'. Added test shift-combine-crash.ll to verify that DAGCombiner no longer crashes with an assertion failure in the attempt to simplify a vector shift by a vector of all undef counts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204536 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the value computation inRafael Espindola2014-03-21
| | | | | | | | | | sym_a: sym_d = sym_a + 1 This is the smallest fix I was able to extract from what got reverted in r204203. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204527 91177308-0d34-0410-b5e6-96231b3b80d8
* Register allocator: add condition to hoist a spill to outer loop.Manman Ren2014-03-21
| | | | | | | | | | | | We make sure a spill is not hoisted to a hotter outer loop by adding a condition. Hoist a spill to outer loop if there are multiple dependents (it can be beneficial if more than one dependents are hoisted) or if DepSV (the hoisting source) is hotter than SV (the hoisting destination). rdar://16268194 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204522 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrProf: Cleanup binary profdata testcaseDuncan P. N. Exon Smith2014-03-21
| | | | | | | | | | Cleanup the current binary testcase for profile data. - Rename it to something more specific. - Remove the text comparison. - Check the output of llvm-profdata show. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204518 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrProf: Change magic number to have non-text charactersDuncan P. N. Exon Smith2014-03-21
| | | | | | | | | Include non-text characters in the magic number so that text files can't match. <rdar://problem/15950346> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204513 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrProf: Actually detect bad headersDuncan P. N. Exon Smith2014-03-21
| | | | | | <rdar://problem/15950346> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204510 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Omit DW_AT_addr_base from skeletal type units.David Blaikie2014-03-21
| | | | | | | | | | | | | Type units have no addresses, so there's no need for DW_AT_addr_base. This removes another relocation from every skeletal type unit and brings LLVM's skeletal type units in line with GCC's (containing only GNU_dwo_name (strp), comp_dir (strp), and GNU_pubnames (flag_present)). Cary's got some ideas about using str_index in the .o file to reduce those last two relocations (well, replace two relocations with one relocation (pointing to the string index) and two indicies) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204506 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add SchedRW lists to NEON instructions.Chad Rosier2014-03-21
| | | | | | | | | | | | Previously, only regular AArch64 instructions were annotated with SchedRW lists. This patch does the same for NEON enabling these instructions to be scheduled by the MIScheduler. Additionally, store operations are now modeled and a few SchedRW lists were updated for bug fixes (e.g. multiple def operands). Reviewers: apazos, mcrosier, atrick Patch by Dave Estes <cestes@codeaurora.org>! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204505 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrProf: Read raw binary profile in llvm-profdataDuncan P. N. Exon Smith2014-03-21
| | | | | | | | | | | | | | Read a raw binary profile that corresponds to a memory dump from the runtime profile. The test is a binary file generated from cfe/trunk/test/Profile/c-general.c with the new compiler-rt runtime and the matching text version of the input. It includes instructions on how to regenerate. <rdar://problem/15950346> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204496 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Move instruction patterns to scalar versions.Matt Arsenault2014-03-21
| | | | | | | Some of them also had the pattern on both, so this removes the duplication. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204492 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant test.Rafael Espindola2014-03-21
| | | | | | This is tested from MC already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204491 91177308-0d34-0410-b5e6-96231b3b80d8
* Move codegen test over to MC.Rafael Espindola2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204490 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Introduce InstrProfWriter using the naive text formatJustin Bogner2014-03-21
| | | | | | | | | | | This isn't a format we'll want to write out in practice, but moving it to the writer library simplifies llvm-profdata and isolates it from further changes to the format. This also allows us to update the tests to not rely on the text output format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204489 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert test to using cfi.Rafael Espindola2014-03-21
| | | | | | An unnamed global in llvm still produces a regular symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204488 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor llvm/test/lit.cfg to use lit.util.which.Paul Robinson2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204486 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant test.Rafael Espindola2014-03-21
| | | | | | | The production of the .eh symbols is done from MC now and we already have tests for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204483 91177308-0d34-0410-b5e6-96231b3b80d8
* ProfileData: Introduce the InstrProfReader interface and a text readerJustin Bogner2014-03-21
| | | | | | | | | | This introduces the ProfileData library and updates llvm-profdata to use this library for reading profiles. InstrProfReader is an abstract base class that will be subclassed for both the raw instrprof data from compiler-rt and the efficient instrprof format that will be used for PGO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204482 91177308-0d34-0410-b5e6-96231b3b80d8
* Split out the MC part of this test.Rafael Espindola2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204481 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Correct lowering of VECTOR_SHUFFLE to VSHF.Daniel Sanders2014-03-21
| | | | | | | | | | | | | | | | | | | | | Summary: VECTOR_SHUFFLE concatenates the vectors in an vectorwise fashion. <0b00, 0b01> + <0b10, 0b11> -> <0b00, 0b01, 0b10, 0b11> VSHF concatenates the vectors in a bitwise fashion: <0b00, 0b01> + <0b10, 0b11> -> 0b0100 + 0b1110 -> 0b01001110 <0b10, 0b11, 0b00, 0b01> We must therefore swap the operands to get the correct result. The test case that discovered the issue was MultiSource/Benchmarks/nbench. Reviewers: matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D3142 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204480 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Handle MUBUF instructions in SIInstrInfo::moveToVALU()Tom Stellard2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204476 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Handle S_MOV_B64 in SIInstrInfo::moveToVALU()Tom Stellard2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204475 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink: Don't sink static allocas from the entry blockTom Stellard2014-03-21
| | | | | | | CodeGen treats allocas outside the entry block as dynamically sized stack objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204473 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for z196 float<->unsigned conversionsRichard Sandiford2014-03-21
| | | | | | | These complement the older float<->signed instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204451 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test command line to avoid generating output file.Kevin Qin2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204437 91177308-0d34-0410-b5e6-96231b3b80d8
* [Constant Hoisting] Make the constant materialization cost operand dependentJuergen Ributzka2014-03-21
| | | | | | | | | Extend the target hook to take also the operand index into account when calculating the cost of the constant materialization. Related to <rdar://problem/16381500> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204435 91177308-0d34-0410-b5e6-96231b3b80d8
* [Constant Hoisting] Change the algorithm to only track constants for ↵Juergen Ributzka2014-03-21
| | | | | | | | | | | | | | | | | | | | | | | | instructions. Originally the algorithm would search for expensive constants and track their users, which could be instructions and constant expressions. This change only tracks the constants for instructions, but constant expressions are indirectly covered too. If an operand is an constant expression, then we look through the expression to find anny expensive constants. The algorithm keep now track of the instruction and the operand index where the constant is used. This allows more precise hoisting of constant materialization code for PHI instructions, because we only hoist to the basic block of the incoming operand. Before we had to find the idom of all PHI operands and hoist the materialization code there. This also makes updating of instructions easier. Before we had to keep track of the original constant, find it in the instructions, and then replace it. Now we can just simply update the operand. Related to <rdar://problem/16381500> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204433 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit r203762, "ARM: support emission of complex SO expressions".Jiangning Liu2014-03-21
| | | | | | | | The commit r203762 introduced silent failure for complext SO expression, and it's even worse than compiler crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204427 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an assertion caused by using inline asm with indirect register inputs.Kevin Qin2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204425 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Remove .data_region directive from AArch64.Kevin Qin2014-03-21
| | | | | | | | | .data_region is only used in Darwin, so it shouldn't be generated for other OS. Currently AArch64 doesn't support darwin yet, so I removed it from AArch64. When Darwin is supported someday, we can add it back and associate it with Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204424 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a CodeGen test into a MC test.Rafael Espindola2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204421 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Support large relocation table.Rui Ueyama2014-03-21
| | | | | | | | | | | | | | | | NumberOfRelocations field in COFF section table is only 16-bit wide. If an object has more than 65535 relocations, the number of relocations is stored to VirtualAddress field in the first relocation field, and a special flag (IMAGE_SCN_LNK_NRELOC_OVFL) is set to Characteristics field. In test we cheated a bit. I made up a test file so that it has IMAGE_SCN_LNK_NRELOC_OVFL flag but the number of relocations is much smaller than 65535. This is to avoid checking in a large test file just to test a file with many relocations. Differential Revision: http://llvm-reviews.chandlerc.com/D3139 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204418 91177308-0d34-0410-b5e6-96231b3b80d8
* Port test to cfi.Rafael Espindola2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204416 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert another CodeGen test into a MC test.Rafael Espindola2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204412 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR19136: [ARM] Fix Folding SP Update into vpush/vpopWeiming Zhao2014-03-20
| | | | | | | | | | | | Sicne MBB->computeRegisterLivenes() returns Dead for sub regs like s0, d0 is used in vpop instead of updating sp, which causes s0 dead before its use. This patch checks the liveness of each subreg to make sure the reg is actually dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204411 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump output hex to match binutils' objdumpGreg Fitzgerald2014-03-20
| | | | | | Patch by Ted Woodward git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204409 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert CodeGen test into a more specific MC test.Rafael Espindola2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204406 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused options from test.Rafael Espindola2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204401 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use EmitAbsValue with symbol references.Rafael Espindola2014-03-20
| | | | | | | | | | | | | | | The function exists to force an expression to be absolute, but there it is not possible to force a symbol reference since a = b .long a means something else. This is an alternative fix for pr9951 that uses an assert. It then deletes the old pr9951 test that was testing nothing already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204399 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Constant Hoisting] Extend coverage of the constant hoisting pass."Juergen Ributzka2014-03-20
| | | | | | I will break this up into smaller pieces for review and recommit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204393 91177308-0d34-0410-b5e6-96231b3b80d8
* [Constant Hoisting] Extend coverage of the constant hoisting pass.Juergen Ributzka2014-03-20
| | | | | | | | | This commit extends the coverage of the constant hoisting pass, adds additonal debug output and updates the function names according to the style guide. Related to <rdar://problem/16381500> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204389 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove LowerInvoke's obsolete "-enable-correct-eh-support" optionMark Seaborn2014-03-20
| | | | | | | | | | | | | | | This option caused LowerInvoke to generate code using SJLJ-based exception handling, but there is no code left that interprets the jmp_buf stack that the resulting code maintained (llvm.sjljeh.jblist). This option has been obsolete for a while, and replaced by SjLjEHPrepare. This leaves the default behaviour of LowerInvoke, which is to convert invokes to calls. Differential Revision: http://llvm-reviews.chandlerc.com/D3136 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204388 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply DW_AT_low/high_pc patch:Eric Christopher2014-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc. This commit moves us from a single range per subprogram to extending ranges if we are: a) In the same section, and b) In the same enclosing CU. This means we have more fine grained ranges for compile units, and fewer ranges overall when we have multiple functions in the same CU adjacent to each other in the object file. Also remove all of the earlier hacks around this functionality for function sections etc. Also update all of the testcases to take into account the merging functionality. with a fix for location entries in the debug_loc section: Make sure that debug loc entries are relative to the low_pc of the compile unit. This means that when we only have a single range that the offset should be just relative to the low_pc of the unit, for multiple ranges for a CU this means that we'll be relative to 0 which we emit along with DW_AT_ranges. This mostly shows up with linked binaries, so add a testcase with multiple CUs so that our location is going to be offset of a CU with a non-zero low_pc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204377 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments from Eric's review of r204094.David Blaikie2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204358 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test for LowerInvoke that doesn't use "-enable-correct-eh-support"Mark Seaborn2014-03-20
| | | | | | | | | | | | | None of the existing tests for LowerInvoke check LowerInvoke's output, and all but one use "-enable-correct-eh-support", which is obsolete, so those tests will be removed when that option is removed. To make sure LowerInvoke will still have test coverage, this adds a test for its default mode which converts invokes to calls. Differential Revision: http://llvm-reviews.chandlerc.com/D3124 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204344 91177308-0d34-0410-b5e6-96231b3b80d8
* [MIPS] Add cpu octeon and some instructionsKai Nacke2014-03-20
| | | | | | | | | | | The Octeon cpu from Cavium Networks is mips64r2 based and has an extended instruction set. In order to utilize this with LLVM, a new cpu feature "octeon" and a subtarget feature "cnmips" is added. A small set of new instructions (baddu, dmul, pop, dpop, seq, sne) is also added. LLVM generates dmul, pop and dpop instructions with option -mcpu=octeon or -mattr=+cnmips. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204337 91177308-0d34-0410-b5e6-96231b3b80d8
* [ASan] Add -asan-module to the ASan .ll tests.Alexander Potapenko2014-03-20
| | | | | | | | | After the -asan pass had been split into -asan (function-level) and -asan-module (module-level) some of the tests have silently stopped working, because they didn't instrument the globals anymore. We've decided to have every test using both passes, irrespective of the presence of globals in it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204335 91177308-0d34-0410-b5e6-96231b3b80d8