summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* DebugInfo: Rename some testcasesDuncan P. N. Exon Smith2015-03-303-0/+0
| | | | | | | | Momentarily (but never in tree), the `scope:` field was called `parent:`. Apparently a few testcases were left behind with "parent" in the name, so rename them. llvm-svn: 233560
* [X86] Ensure integer domain on scalar i64 load/store stack folding tests. NFCSimon Pilgrim2015-03-302-8/+16
| | | | llvm-svn: 233553
* [SystemZ] Fix LLVM crash on unoptimized codeUlrich Weigand2015-03-301-0/+30
| | | | | | | | | | | | | | Compiling the following function with -O0 would crash, since LLVM would hit an assertion in getTestUnderMaskCond: int test(unsigned long x) { return x >= 0 && x <= 15; } Fixed by detecting the case in the caller of getTestUnderMaskCond. llvm-svn: 233541
* [mips] Support 9-bit offsets for the 'R' inline assembly memory constraint.Daniel Sanders2015-03-302-9/+60
| | | | | | | | | | | | | | | | | | | Summary: The 'R' constraint is actually supposed to be much more complicated than this and is defined in terms of whether it will cause macro expansion in the assembler. 'R' is getting less useful due to architecture changes and ought to be replaced by other constraints. We therefore implement 9-bit offsets which will work for all subtargets and all instructions. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8440 llvm-svn: 233537
* Revert "[SCEV] Look at backedge dominating conditions."Daniel Jasper2015-03-301-55/+0
| | | | | | | This leads to terribly slow compile times under MSAN. More discussion on the commit thread of r233447. llvm-svn: 233529
* AVX-512: blank lines, duplicated tests, no functional changesElena Demikhovsky2015-03-301-44/+2
| | | | | | see comments http://reviews.llvm.org/D6835 llvm-svn: 233528
* AVX-512: added intrinsics for VPAND, VPOR and VPXORElena Demikhovsky2015-03-301-0/+97
| | | | | | by Asaf Badouh (asaf.badouh@intel.com) llvm-svn: 233525
* [inline asm] Don't reject duplicated matching constraintsBenjamin Kramer2015-03-291-0/+12
| | | | | | | They're harmless and it's easy to generate them from clang, leading to a crash in LLVM. Found by afl-fuzz. llvm-svn: 233500
* [Objdump] Pass the correct subtarget to printInst.Akira Hatanaka2015-03-282-0/+3
| | | | | | This fixes a bug I introduced in r233411. llvm-svn: 233484
* [PowerPC] Add asm parser support for bitmask forms of rotate-and-mask ↵Hal Finkel2015-03-281-0/+27
| | | | | | | | | | | | | | | instructions The asm syntax for the 32-bit rotate-and-mask instructions can take a 32-bit bitmask instead of an (mb, me) pair. This syntax is not specified in the Power ISA manual, but is accepted by GNU as, and is documented in IBM's Assembler Language Reference. The GNU Multiple Precision Arithmetic Library (gmp) contains assembly that uses this syntax. To implement this, I moved the isRunOfOnes utility function from PPCISelDAGToDAG.cpp to PPCMCTargetDesc.h. llvm-svn: 233483
* [ConstantFold] Don't fold ppc_fp128 <-> int bitcastsHal Finkel2015-03-281-0/+36
| | | | | | | | | | | | | PPC_FP128 is really the sum of two consecutive doubles, where the first double is always stored first in memory, regardless of the target endianness. The memory layout of i128, however, depends on the target endianness, and so we can't fold this without target endianness information. As a result, we must not do this folding in lib/IR/ConstantFold.cpp (it could be done instead in Analysis/ConstantFolding.cpp, but that's not done now). Fixes PR23026. llvm-svn: 233481
* Verifier: Allow subroutine types to have no type arrayDuncan P. N. Exon Smith2015-03-281-0/+23
| | | | | | | | | Loosen one check from r233446: as long as `DIBuilder` requires a non-null type for every subprogram, we should allow a null type array. Also add tests for the rest of `MDSubroutineType`, which were somehow missing. llvm-svn: 233468
* DebugInfo: Fix testcases with invalid MDSubprogram nodesDuncan P. N. Exon Smith2015-03-2833-153/+70
| | | | | | | | | | | | | | | | | Fix testcases that don't pass the verifier after a WIP patch to check `MDSubprogram` operands more effectively. I found the following issues: - When `isDefinition: false`, the `variables:` field might point at `!{i32 786468}`, or at a tuple that pointed at an empty tuple with the comment "previously: invalid DW_TAG_base_type" (I vaguely recall adding those comments during an upgrade script). In these cases, I just dropped the array. - The `variables:` field might point at something like `!{!{!8}}`, where `!8` was an `MDLocation`. I removed the extra layer of indirection. - Invalid `type:` (not an `MDSubroutineType`). llvm-svn: 233466
* [ARM] Enable changing instprinter's behavior based on the per-functionAkira Hatanaka2015-03-271-0/+12
| | | | | | subtarget. llvm-svn: 233451
* [SCEV] Look at backedge dominating conditions.Sanjoy Das2015-03-271-0/+55
| | | | | | | | | | | | | | | | Summary: This change teaches ScalarEvolution::isLoopBackedgeGuardedByCond to look at edges within the loop body that dominate the latch. We don't do an exhaustive search for all possible edges, but only a quick walk up the dom tree. Reviewers: atrick, hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8627 llvm-svn: 233447
* Verifier: Call verifyModule() from llc and optDuncan P. N. Exon Smith2015-03-2716-79/+101
| | | | | | | | | | | | | | | | | | | | | | Change `llc` and `opt` to run `verifyModule()`. This ensures that we check the full module before `FunctionPass::doInitialization()` ever gets called (I was getting crashes in `DwarfDebug` instead of verifier failures when testing a WIP patch that checks operands of compile units). In `opt`, also move up debug-info-stripping so that it still runs before verification. There was a fair bit of broken code that was sitting in tree. Interestingly, some were cases of a `select` that referred to itself in `-instcombine` tests (apparently an intermediate result). I split them off to `*-noverify.ll` tests with RUN lines like this: opt < %s -S -disable-verify -instcombine | opt -S | FileCheck %s This avoids verifying the input file (so we can get the broken code into `-instcombine), but still verifies the output with a second call to `opt` (to verify that `-instcombine` will clean it up like it should). llvm-svn: 233432
* DebugInfo: Fix bad debug info for compile units and typesDuncan P. N. Exon Smith2015-03-2794-102/+102
| | | | | | | | | | | | | | | | Fix debug info in these tests, which started failing with a WIP patch to verify compile units and types. The problems look like they were all caused by bitrot. They fell into these categories: - Using `!{i32 0}` instead of `!{}`. - Using `!{null}` instead of `!{}`. - Using `!MDExpression()` instead of `!{}`. - Using `!8` instead of `!{!8}`. - `file:` references that pointed at `MDCompileUnit`s instead of the same `MDFile` as the compile unit. - `file:` references that were numerically off-by-one or (off-by-ten). llvm-svn: 233415
* [R600/SI] Fix testcase check line.Ahmed Bougacha2015-03-271-1/+1
| | | | | | Missing colon, instruction typo. llvm-svn: 233414
* [AArch64InstPrinter] Use the feature bits of the subtarget passed to the printAkira Hatanaka2015-03-271-0/+11
| | | | | | | | | | | method. This enables the instprinter to print a different system register name based on the feature bits of the per-function subtarget. Differential Revision: http://reviews.llvm.org/D8668 llvm-svn: 233412
* [CodeGen] Don't attempt a tail-call with a non-forwarded explicit sret.Ahmed Bougacha2015-03-271-0/+106
| | | | | | | | | | | | Tailcalls are only OK with forwarded sret pointers. With explicit sret, one approximation is to check that the pointer isn't an Instruction, as in that case it might point into some local memory (alloca). That's not OK with tailcalls. Explicit sret counterpart to r233409. Differential Revison: http://reviews.llvm.org/D8510 llvm-svn: 233410
* [CodeGen] Don't attempt a tail-call with implicit sret.Ahmed Bougacha2015-03-271-0/+46
| | | | | | | | | Tailcalls are only OK with forwarded sret pointers. With sret demotion, they're not, as we'd have a pointer into a soon-to-be-dead stack frame. Differential Revison: http://reviews.llvm.org/D8510 llvm-svn: 233409
* [bpf] add support for bpf pseudo instructionAlexei Starovoitov2015-03-271-1/+14
| | | | | | | Expose bpf pseudo load instruction via intrinsic. It is used by front-ends that can encode file descriptors directly into IR instead of relying on relocations. llvm-svn: 233396
* [RegisterCoalescer] Refine the terminal rule to still consider the terminalQuentin Colombet2015-03-271-0/+2
| | | | | | | | | | | | | | | nodes. When a node is terminal it is pushed at the end of the list of the copies to coalesce instead of being completely ignored. In effect, this reduces its priority over non-terminal nodes. Because of that, we do not miss the rematerialization opportunities, nor the copies that can be merged with more complex, than the terminal rule, interference checks. Related to PR22768. llvm-svn: 233395
* LLParser: Require non-null scope for MDLocation and MDLocalVariableDuncan P. N. Exon Smith2015-03-274-3/+11
| | | | | | | | | Change `LLParser` to require a non-null `scope:` field for both `MDLocation` and `MDLocalVariable`. There's no need to wait for the verifier for this check. This also allows their `::getImpl()` methods to assert that the incoming scope is non-null. llvm-svn: 233394
* Add a -raw option to the -section mode of llvm-objdump.Adrian Prantl2015-03-271-0/+5
| | | | llvm-svn: 233390
* Verifier: Check fields of MDVariable subclassesDuncan P. N. Exon Smith2015-03-279-24/+37
| | | | | | | | | | | | | | | | Check fields from `MDLocalVariable` and `MDGlobalVariable` and change the accessors to downcast to the right types. `getType()` still returns `Metadata*` since it could be an `MDString`-based reference. Since local variables require non-null scopes, I also updated `LLParser` to require a `scope:` field. A number of testcases had grown bitrot and started failing with this patch; I committed them separately in r233349. If I just broke your out-of-tree testcases, you're probably hitting similar problems (so have a look there). llvm-svn: 233389
* DebugInfo: Fix another bitrotted testcaseDuncan P. N. Exon Smith2015-03-271-2/+2
| | | | | | Fix another case of a missing `scope:` field on an `MDLocalVariable`. llvm-svn: 233388
* Work around pr23045 and make it easier to reproduce.Rafael Espindola2015-03-272-0/+6
| | | | | | | | | | | Dropping old debug format requires the entire module to be read upfront. This was failing only with the gold plugin, but that is just because llvm-link was not upgrading metadata. The new testcase using llvm-link shows the problem. llvm-svn: 233381
* Close unique sections when switching away from them.Rafael Espindola2015-03-271-0/+1
| | | | | | | It is not possible to switch back to unique secitons, so close them automatically when switching away. llvm-svn: 233380
* Fix subprogram-linkonce-weak.ll and subprogram-linkonce-weak-odr.ll for Windows.Yaron Keren2015-03-272-11/+11
| | | | llvm-svn: 233375
* Reapply r233175 and r233183: float2int.James Molloy2015-03-273-0/+289
| | | | | | | | This re-adds float2int to the tree, after fixing PR23038. It turns out the argument to APSInt() is true-if-unsigned, rather than true-if-signed :(. Added testcase and explanatory comment. llvm-svn: 233370
* Complete the MachineScheduler fix made way back in r210390.Andrew Trick2015-03-277-23/+23
| | | | | | | | | | | | | | | | | | "Fix the MachineScheduler's logic for updating ready times for in-order. Now the scheduler updates a node's ready time as soon as it is scheduled, before releasing dependent nodes." This fix was only made in one variant of the ScheduleDAGMI driver. Francois de Ferriere reported the issue in the other bit of code where it was also needed. I never got around to coming up with a test case, but it's an obvious fix that shouldn't be delayed any longer. I'll try to refactor this code a little better. I did verify performance on a wide variety of targets and saw no negative impact with this fix. llvm-svn: 233366
* Require a GC strategy be specified for functions which use gc.statepointPhilip Reames2015-03-278-22/+24
| | | | | | This was discussed a while back and I left it optional for migration. Since it's been far more than the 'week or two' that was discussed, time to actually make this manditory. llvm-svn: 233357
* Allow explicit spill slots to be specified for a gc.statepointPhilip Reames2015-03-271-0/+121
| | | | | | | | | | This patch adds support for explicitly provided spill slots in the GC arguments of a gc.statepoint. This is somewhat analogous to gcroot, but leverages the STATEPOINT MI node and StackMap infrastructure. The motivation for this is: 1) The stack spilling code for gc.statepoints hasn't advanced as fast as I'd like. One major option is to give up on doing spilling in the backend and do it at the IR level instead. We'd give up the ability to have gc values in registers, but that's a minor cost in practice. We are not neccessarily moving in that direction, but having the ability to prototype such a thing cheaply is interesting. 2) I want to port the gcroot lowering to use the statepoint infastructure. Given the metadata printers for gcroot expect a fixed set of stack roots, it's easiest to just reuse the explicit stack slots and pass them directly to the underlying statepoint. I'm holding off on the documentation for the new feature until I'm reasonable sure this is going to stick around. llvm-svn: 233356
* Reintroduce the SelectionDAG scheduler test for r233351.Andrew Trick2015-03-271-0/+51
| | | | | | | This test returns nonnative integer types which aren't supported on all targets. The real issue with the SelectionDAG scheduler is with x86 EFLAGS. llvm-svn: 233355
* WinEH: Create a parent frame alloca for HandlerType xdata tablesDavid Majnemer2015-03-271-0/+6
| | | | | | | | We don't have any logic to emit those tables yet, so the SDAG lowering of this intrinsic is just a stub. We can see the intrinsic in the prepared IR, though. llvm-svn: 233354
* This test should have been target specific. I missed that.Andrew Trick2015-03-271-51/+0
| | | | llvm-svn: 233353
* Fix a bug in SelectionDAG scheduling backtracking code: PR22304.Andrew Trick2015-03-271-0/+51
| | | | | | | | | | | | | | | It can happen (by line CurSU->isPending = true; // This SU is not in AvailableQueue right now.) that a SUnit is mark as available but is not in the AvailableQueue. For SUnit being selected for scheduling both conditions must be met. This patch mainly defensively protects from invalid removing a node from a queue. Sometimes nodes are marked isAvailable but are not in the queue because they have been defered due to some hazard. Patch by Pawel Bylica! llvm-svn: 233351
* Revert r233175 and r233183 with it. This pulls float2int back out of the ↵Nick Lewycky2015-03-273-275/+0
| | | | | | tree, due to PR23038. llvm-svn: 233350
* DebugInfo: Update testcases with invalid variablesDuncan P. N. Exon Smith2015-03-279-20/+23
| | | | | | | | | | | | Fix testcases whose variables are invalid. I'm working on a patch that adds `Verifier` checks for `MDLocalVariable` (and `MDGlobalVariable`), and these failed because: - `scope:` fields need to point at `MDLocalScope` and can't be null. - `file:` fields need to point at `MDFile`. - `inlinedAt:` fields need to point at `MDLocation`. llvm-svn: 233349
* [AsmPrinter] Don't assert on GOT equivalent non-constant users.Ahmed Bougacha2015-03-271-0/+5
| | | | | | | We used to dyn_cast<Constant> in the recursive call, but cast<> in the initial one, and there can be non-Constant initial users. llvm-svn: 233346
* Use movw/movt instead of constant pool loads to lower byval parameter copiesDerek Schuff2015-03-261-0/+17
| | | | | | | | | | | | | | Summary: The ARM backend can use a loop to implement copying byval parameters before a call. In non-thumb2 mode it uses a constant pool load to materialize the trip count. For targets that need movt instead (e.g. Native Client), use the same code as in thumb2 mode to materialize the trip count. Reviewers: jfb, t.p.northover Differential Revision: http://reviews.llvm.org/D8442 llvm-svn: 233324
* Verifier: Check accessors of MDLocationDuncan P. N. Exon Smith2015-03-264-10/+10
| | | | | | | | | | | | | | | | | | | | Check accessors of `MDLocation`, and change them to `cast<>` down to the right types. Also add type-safe factory functions. All the callers that handle broken code need to use the new versions of the accessors (`getRawScope()` instead of `getScope()`) that still return `Metadata*`. This is also necessary for things like `MDNodeKeyImpl<MDLocation>` (in LLVMContextImpl.h) that need to unique the nodes when their operands might still be forward references of the wrong type. In the `Value` hierarchy, consumers that handle broken code use `getOperand()` directly. However, debug info nodes have a ton of operands, and their order (even their existence) isn't stable yet. It's safer and more maintainable to add an explicit "raw" accessor on the class itself. llvm-svn: 233322
* Fix PR23025.Rafael Espindola2015-03-261-0/+6
| | | | | | | | | | | | | | | There is something in link.exe that requires a relocation to use a global symbol. Not doing so breaks the chrome build on windows. This patch sets isWeak for that to work. To compensate, we then need to look past those symbols when not creating relocations. This patch includes an ELF test that matches GNU as behaviour. I am still reducing the chrome build issue and will add a test once that is done. llvm-svn: 233318
* [ARM] Fix some non-portable shell syntax in r233301's testsJustin Bogner2015-03-262-4/+4
| | | | | | | | | | The "|&" operator isn't POSIX, so it can fail depending on the host's default shell. Avoid it. There were also a couple of places that did "2>1", but this creates a file called "1". They clearly meant "2>&1". llvm-svn: 233309
* Reapply "Linker: Drop function pointers for overridden subprograms"Duncan P. N. Exon Smith2015-03-265-3/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit r233254, effectively reapplying r233164 (and its successors), with an additional testcase for when subprograms match exactly. This fixes PR22792 (again). I'm using the same approach, but I've moved up the call to `stripReplacedSubprograms()`. The function pointers need to be dropped before mapping any metadata from the source module, or else this can drop the function from new subprograms that have merged (via Metadata uniquing) with the old ones. Dropping the pointers first prevents them from merging. **** The original commit message follows. **** Linker: Drop function pointers for overridden subprograms Instead of dropping subprograms that have been overridden, just set their function pointers to `nullptr`. This is a minor adjustment to the stop-gap fix for PR21910 committed in r224487, and fixes the crasher from PR22792. The problem that r224487 put a band-aid on: how do we find the canonical subprogram for a `Function`? Since the backend currently relies on `DebugInfoFinder` (which does a naive in-order traversal of compile units and picks the first subprogram) for this, r224487 tried dropping non-canonical subprograms. Dropping subprograms fails because the backend *also* builds up a map from subprogram to compile unit (`DwarfDebug::SPMap`) based on the subprogram lists. A missing subprogram causes segfaults later when an inlined reference (such as in this testcase) is created. Instead, just drop the `Function` pointer to `nullptr`, which nicely mirrors what happens when an already-inlined `Function` is optimized out. We can't really be sure that it's the same definition anyway, as the testcase demonstrates. This still isn't completely satisfactory. Two flaws at least that I can think of: - I still haven't found a straightforward way to make this symmetric in the IR. (Interestingly, the DWARF output is already symmetric, and I've tested for that to be sure we don't regress.) - Using `DebugInfoFinder` to find the canonical subprogram for a function is kind of crazy. We should just attach metadata to the function, like this: define weak i32 @foo(i32, i32) !dbg !MDSubprogram(...) { llvm-svn: 233302
* [ARM] Add v8.1a "Rounding Double Multiply Add/Subtract" extensionVladimir Sukharev2015-03-266-0/+629
| | | | | | | | | | Reviewers: t.p.northover Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8503 llvm-svn: 233301
* [SCEV] Revert bailout added in r75511.Sanjoy Das2015-03-261-0/+45
| | | | | | | | | | | | | | Summary: With the introduction of MarkPendingLoopPredicates in r157092, I don't think the bailout is needed anymore. Reviewers: atrick, nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8624 llvm-svn: 233296
* InstCombine: fold (A << C) == (B << C) --> ((A^B) & (~0U >> C)) == 0Benjamin Kramer2015-03-261-0/+30
| | | | | | | Anding and comparing with zero can be done in a single instruction on most archs so this is a bit cheaper. llvm-svn: 233291
* [AArch64, ARM] Add v8.1a architecture and generic cpuVladimir Sukharev2015-03-261-0/+36
| | | | | | | | | | | | New architecture and cpu added, following http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development Reviewers: t.p.northover Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8505 llvm-svn: 233290
OpenPOWER on IntegriCloud