summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* [NVPTX] emit .file directives for files referenced by subprograms.Artem Belevich2016-02-111-0/+44
| | | | | | | | .. so .loc directives referring to those files work correctly. Differential Revision: http://reviews.llvm.org/D17086 llvm-svn: 260557
* Add a test case to show isKnownNonZero() returns correctly; NFCJun Bum Lim2016-02-111-0/+15
| | | | | | | | | | | | | | Summary: Added a test case just to make sure that isKnownNonZero() returns false when we cannot guarantee that a ConstantExpr is a non-zero constant. Reviewers: sanjoy, majnemer, mcrosier, nlewycky Subscribers: nlewycky, mssimpso, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D16908 llvm-svn: 260544
* Revert r260507: "[X86] Enable the LEA optimization pass by default."Hans Wennborg2016-02-111-1/+1
| | | | | | This caused PR26575. llvm-svn: 260538
* [InstCombine] Simplify a known nonzero incoming value of PHIJun Bum Lim2016-02-111-0/+95
| | | | | | | | | | | | | | | | | | | | Summary: When a PHI is used only to be compared with zero, it is possible to replace an incoming value with any non-zero constant if the incoming value can be proved as a known nonzero value. For example, in below code, we can replace the incoming value %v with any non-zero constant based on the fact that the PHI is only used to be compared with zero and %v is a known non-zero value: %v = select %cond, 1, 2 %p = phi [%v, BB] ... %c = icmp eq, %p, 0 Reviewers: mcrosier, jmolloy, sanjoy Subscribers: hfinkel, mcrosier, majnemer, llvm-commits, haicheng, bmakam, mssimpso, gberry Differential Revision: http://reviews.llvm.org/D16240 llvm-svn: 260530
* [AArch64] Improve load/store optimizer to handle LDUR + LDR.Chad Rosier2016-02-111-0/+125
| | | | | | | | | | | | | This patch allows the mixing of scaled and unscaled load/stores to form load/store pairs. This is a reapplication of r259812, which had an incorrect assert. The test_stur_str_no_assert() test is a reduced version of the issue hit in the AArch64 self-host. PR24465 llvm-svn: 260523
* [MC] Fixed parsing of macro arguments where expressions with spaces are present.Scott Egerton2016-02-112-2/+42
| | | | | | | | | | | | | | | Summary: Fixed an issue for mips with an instruction such as 'sdc1 $f1, 272 +8(a0)' which has a space between '272' and '+'. The parser would then parse '272' and '+8' as two arguments instead of a single expression resulting in one too many arguments in the pseudo instruction. The reason that the test case has been changed is so that the expected output matches the output of the GNU assembler. Reviewers: vkalintiris, dsanders Subscribers: dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D13592 llvm-svn: 260521
* Don't propagate dereferenceable attribute through gc.relocate in InstCombineArtur Pilipenko2016-02-111-11/+0
| | | | | | | | Reviewed By: reames Differential Revision: http://reviews.llvm.org/D16143 llvm-svn: 260509
* [X86] Enable the LEA optimization pass by default.Andrey Turetskiy2016-02-111-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D16877 llvm-svn: 260507
* [MC][ELF] Handle MIPS specific .sdata and .sbss directivesSimon Atanasyan2016-02-112-24/+27
| | | | | | | | | MIPS specific .sdata and .sbss directives create corresponding sections with proper initialized ELF flags including ELF::SHF_MIPS_GPREL. Differential Revision: http://reviews.llvm.org/D17001 llvm-svn: 260498
* AMDGPU: Fix constant bus use check with subregistersMatt Arsenault2016-02-112-8/+29
| | | | | | | | | | | If the two operands to an instruction were both subregisters of the same super register, it would incorrectly think this counted as the same constant bus use. This fixes the verifier error in fmin_legacy.ll which was missing -verify-machineinstrs. llvm-svn: 260495
* AMDGPU: Remove some old intrinsic uses from testsMatt Arsenault2016-02-1166-532/+486
| | | | llvm-svn: 260493
* AMDGPU: Fix not handling new workitem intrinsics in DivergenceAnalysisMatt Arsenault2016-02-111-0/+45
| | | | llvm-svn: 260491
* [readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.Michael J. Spencer2016-02-112-3/+40
| | | | llvm-svn: 260489
* [readobj] Handle ELF files with no section table or with no program headers.Michael J. Spencer2016-02-116-10/+203
| | | | | | | | This adds support for finding the dynamic table and dynamic symbol table via the section table or the program header table. If there's no section table an attempt is made to figure out the length of the dynamic symbol table. llvm-svn: 260488
* [AMDGPU] Assembler: Fix VOP3 only instructionsTom Stellard2016-02-111-2/+45
| | | | | | | | | | | | | | | | | | | | | Separate methods to convert parsed instructions to MCInst: - VOP3 only instructions (always create modifiers as operands in MCInst) - VOP2 instrunctions with modifiers (create modifiers as operands in MCInst when e64 encoding is forced or modifiers are parsed) - VOP2 instructions without modifiers (do not create modifiers as operands in MCInst) - Add VOP3Only flag. Pass HasMods flag to VOP3Common. - Simplify code that deals with modifiers (-1 is now same as 0). This is no longer needed. - Add few tests (more will be added separately). Update error message now correct. Patch By: Nikolay Haustov Differential Revision: http://reviews.llvm.org/D16778 llvm-svn: 260483
* FunctionImport: add a progressive heuristic to limit importing too deep in ↵Mehdi Amini2016-02-102-0/+68
| | | | | | | | | | | | | | | | | | | | the callgraph The current function importer will walk the callgraph, importing transitively any callee that is below the threshold. This can lead to import very deep which is costly in compile time and not necessarily beneficial as most of the inline would happen in imported function and not necessarilly in user code. The actual factor has been carefully chosen by flipping a coin ;) Some tuning need to be done (just at the existing limiting threshold). Reviewers: tejohnson Differential Revision: http://reviews.llvm.org/D17082 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 260466
* Make llvm-nm test consistent with other testsHemant Kulkarni2016-02-103-85/+84
| | | | llvm-svn: 260464
* Fix buildbot failure (hosts without zlib)Xinliang David Li2016-02-102-0/+0
| | | | llvm-svn: 260446
* Restore "[ThinLTO] Use MD5 hash in function index." with fixTeresa Johnson2016-02-104-4/+10
| | | | | | | | | | | This restores commit r260408, along with a fix for a bot failure. The bot failure was caused by dereferencing a unique_ptr in the same call instruction parameter list where it was passed via std::move. Apparently due to luck this was not exposed when I built the compiler with clang, only with gcc. llvm-svn: 260442
* [codeview] Describe int local variables using .cv_def_rangeReid Kleckner2016-02-107-16/+332
| | | | | | | | | | | | | | | | Summary: Refactor common value, scope, and label tracking logic out of DwarfDebug into a common base class called DebugHandlerBase. Update an old LLVM IR test case to avoid an assertion in LexicalScopes. Reviewers: dblaikie, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16931 llvm-svn: 260432
* [llvm-readobj] Option to emit readelf like outputHemant Kulkarni2016-02-102-1/+47
| | | | | | | | | New option --elf-output-style=LLVM or GNU Enables -file-headers in readelf style when elf-output-style=GNU Differential revision: http://reviews.llvm.org/D14128 llvm-svn: 260430
* [Coverage] add covmap v2 binary format regression testXinliang David Li2016-02-104-1/+3
| | | | llvm-svn: 260428
* AMDGPU: Release the scavenged offset register during VGPR spillNicolai Haehnle2016-02-101-0/+33
| | | | | | | | | | | | | | | | | | | Summary: This fixes a crash where subsequent spills would be unable to scavenge a register. In particular, it fixes a crash in piglit's spec@glsl-1.50@execution@geometry@max-input-components (the test still has a shader that fails to compile because of too many SGPR spills, but at least it doesn't crash any more). This is a candidate for the release branch. Reviewers: arsenm, tstellarAMD Subscribers: qcolombet, arsenm Differential Revision: http://reviews.llvm.org/D16558 llvm-svn: 260427
* [WebAssembly] Switch varags calling convention to use a registerDerek Schuff2016-02-101-8/+30
| | | | | | | | | | | | Instead of passing varargs directly on the user stack, allocate a buffer in the caller's stack frame and pass a pointer to it. This simplifies the C ABI (e.g. non-C callers of C functions do not need to use C's user stack if they have their own mechanism) and allows further optimizations in the future (e.g. fewer functions may need to use the stack). Differential Revision: http://reviews.llvm.org/D17048 llvm-svn: 260421
* Revert "[ThinLTO] Use MD5 hash in function index." due to bot failureTeresa Johnson2016-02-104-10/+4
| | | | | | This reverts commit r260408. Bot failure that I need to investigate. llvm-svn: 260412
* [ThinLTO] Use MD5 hash in function index.Teresa Johnson2016-02-104-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch uses the lower 64-bits of the MD5 hash of a function name as a GUID in the function index, instead of storing function names. Any local functions are first given a global name by prepending the original source file name. This is the same naming scheme and GUID used by PGO in the indexed profile format. This change has a couple of benefits. The primary benefit is size reduction in the combined index file, for example 483.xalancbmk's combined index file was reduced by around 70%. It should also result in memory savings for the index file in memory, as the in-memory map is also indexed by the hash instead of the string. Second, this enables integration with indirect call promotion, since the indirect call profile targets are recorded using the same global naming convention and hash. This will enable the function importer to easily locate function summaries for indirect call profile targets to enable their import and subsequent promotion. The original source file name is recorded in the bitcode in a new module-level record for use in the ThinLTO backend pipeline. Reviewers: davidxl, joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D17028 llvm-svn: 260408
* Disable the new Orc lazy JIT tests on Windows, they do not passReid Kleckner2016-02-101-0/+6
| | | | llvm-svn: 260405
* SelectionDAG: Make Properties a field of SDPatternOperatorMatt Arsenault2016-02-102-2/+2
| | | | | | | | | Currently you can't specify node properties like commutativity on a PatFrag. If you want to create a PatFrag on a commutative node with a hasOneUse predicate, this enables you to specify that the PatFrag is also commutable. llvm-svn: 260404
* [MC] Merge VK_PPC_TPREL in to generic VK_TPREL.Colin LeMahieu2016-02-103-18/+18
| | | | | | Differential Revision: http://reviews.llvm.org/D17038 llvm-svn: 260401
* [PGO] Indirect-call profile annotation in IR level profilingRong Xu2016-02-102-0/+78
| | | | | | | | | | This patch reads the indirect-call value records in the profile and makes the annotation in the indirect-call instruction. This is for IR level profile instrumentation. Differential Revision: http://reviews.llvm.org/D16935 llvm-svn: 260400
* Revert "[llvm-readobj] Option to emit readelf like output"Hemant Kulkarni2016-02-102-47/+1
| | | | | | This reverts commit a58765909660a7195b32e0cc8c7476168b913750. llvm-svn: 260397
* [pdbdump] Fix test for different type ordering with DIA 2015Reid Kleckner2016-02-101-23/+30
| | | | llvm-svn: 260396
* [llvm-nm] Add -radix optionHemant Kulkarni2016-02-103-0/+267
| | | | | | Differential Revision: http://reviews.llvm.org/D16822 llvm-svn: 260392
* [llvm-readobj] Option to emit readelf like outputHemant Kulkarni2016-02-102-1/+47
| | | | | | | | | New option --elf-output-style=LLVM or GNU Enables -file-headers in readelf style when elf-output-style=GNU Differential revision: http://reviews.llvm.org/D14128 llvm-svn: 260391
* [SPARC] Repair floating-point condition encodings in assembly parser.James Y Knight2016-02-102-0/+25
| | | | | | | | | | | | | | | The encodings for floating point conditions A(lways) and N(ever) were incorrectly specified for the assembly parser, per Sparc manual v8 page 121. This change corrects that mistake. Also, strangely, all of the branch instructions already had MC test cases, except for the broken ones. Added the tests. Patch by Chris Dewhurst Differential Revision: http://reviews.llvm.org/D17074 llvm-svn: 260390
* Disable all llvm-config tests for now, will investigate laterEhsan Akhgari2016-02-101-0/+2
| | | | llvm-svn: 260386
* [PGO] Differentiate Clang instrumentation and IR level instrumentation profilesRong Xu2016-02-1018-1/+53
| | | | | | | | | | | | | | | | | | | | This patch uses one bit in profile version to differentiate Clang instrumentation and IR level instrumentation profiles. PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so that the compiler runtime can set the right profile kind. For Maco-O platform, we generate the variable as linkonce_odr linkage as COMDAT is not supported. PGOInstrumenation now checks this bit to make sure it's an IR level instrumentation profile. The patch was submitted as r260164 but reverted due to a Darwin test breakage. Original Differential Revision: http://reviews.llvm.org/D15540 Differential Revision: http://reviews.llvm.org/D17020 llvm-svn: 260385
* [X86] Fix stack alignment for MCU target, by Anton Nadolskiy.Andrey Turetskiy2016-02-101-0/+47
| | | | | | | | This patch fixes stack alignments for MCU (should be aligned to 4 bytes). Differential Revision: http://reviews.llvm.org/D15646 llvm-svn: 260375
* [Orc] Add lazy-JITting support for i386.Lang Hames2016-02-101-1/+1
| | | | | | | | | | | This patch adds a new class, OrcI386, which contains the hooks needed to support lazy-JITing on i386 (currently only for Pentium 2 or above, as the JIT re-entry code uses the FXSAVE/FXRSTOR instructions). Support for i386 is enabled in the LLI lazy JIT and the Orc C API, and regression and unit tests are enabled for this architecture. llvm-svn: 260338
* Add support for struct in C API testAmaury Sechet2016-02-101-1/+11
| | | | | | | | | | | | Summary: As per title. This also include extra support for insertvalue and extracvalue. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17055 llvm-svn: 260335
* [x86] convert masked load of exactly one element to scalar loadSanjay Patel2016-02-091-0/+115
| | | | | | | This is the load counterpart to the store optimization that was added in: http://reviews.llvm.org/rL260145 llvm-svn: 260325
* Add icmp and conditional branches in the C API echo test.Amaury Sechet2016-02-091-2/+32
| | | | | | | | | | | | | | | Summary: Improving coverage. Depends on D16912 . Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16937 llvm-svn: 260321
* Add convergent-removing bits to FunctionAttrs pass.Justin Lebar2016-02-091-0/+94
| | | | | | | | | | | | | | | | | Summary: Remove the convergent attribute on any functions which provably do not contain or invoke any convergent functions. After this change, we'll be able to modify clang to conservatively add 'convergent' to all functions when compiling CUDA. Reviewers: jingyue, joker.eph Subscribers: llvm-commits, tra, jhen, hfinkel, resistor, chandlerc, arsenm Differential Revision: http://reviews.llvm.org/D17013 llvm-svn: 260319
* WholeProgramDevirt: introduce.Peter Collingbourne2016-02-0917-1/+905
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This pass implements whole program optimization of virtual calls in cases where we know (via bitset information) that the list of callees is fixed. This includes the following: - Single implementation devirtualization: if a virtual call has a single possible callee, replace all calls with a direct call to that callee. - Virtual constant propagation: if the virtual function's return type is an integer <=64 bits and all possible callees are readnone, for each class and each list of constant arguments: evaluate the function, store the return value alongside the virtual table, and rewrite each virtual call as a load from the virtual table. - Uniform return value optimization: if the conditions for virtual constant propagation hold and each function returns the same constant value, replace each virtual call with that constant. - Unique return value optimization for i1 return values: if the conditions for virtual constant propagation hold and a single vtable's function returns 0, or a single vtable's function returns 1, replace each virtual call with a comparison of the vptr against that vtable's address. Differential Revision: http://reviews.llvm.org/D16795 llvm-svn: 260312
* Improve the C API echo test tool to emit basic block is the right order.Amaury Sechet2016-02-091-0/+8
| | | | | | | | | | | | Summary: As per title. Also add a facility method to get the name of a basic block from the C API. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16912 llvm-svn: 260309
* [mips] Extend MipsAsmParser class to handle %got(sym + const) expressionsSimon Atanasyan2016-02-091-0/+20
| | | | | | | | | Now the parser supports `%got(sym)` expressions only but `%got(sym + const)` variant is also valid and accepted by GAS. Differential Revision: http://reviews.llvm.org/D16885 llvm-svn: 260305
* This brings back commit r259578.Rafael Espindola2016-02-092-0/+30
| | | | | | | But now it follows the llvm style, uses an early return and doesn't include a file named 1.o. llvm-svn: 260293
* Revert "Correct size calculations for ELF files"Rafael Espindola2016-02-092-26/+0
| | | | | | | | | This reverts commit r259578. There are enough issues with this small patch that it is better to revert and then commit a fixed version (will be committed shortly). llvm-svn: 260285
* Remove system-libs.test for nowEhsan Akhgari2016-02-091-5/+0
| | | | | | | | This test fails in the ninja-x64-msvc-RA-centos6 builder, so the UNSUPPORTED: system-windows condition is insufficient. Removing it for now; I will investigate how this can be fixed later. llvm-svn: 260281
* Fix a test added in r260263Ehsan Akhgari2016-02-091-1/+1
| | | | llvm-svn: 260280
OpenPOWER on IntegriCloud