summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* [GlobalISel] LegalizerInfo: Enable legalization of non-power-of-2 typesVolkan Keles2017-04-112-0/+37
| | | | | | | | | | | | | | Summary: Legalize only if the type is marked as Legal or Custom. If not, return Unsupported as LegalizerHelper is not able to handle non-power-of-2 types right now. Reviewers: qcolombet, aditya_nandakumar, dsanders, t.p.northover, kristof.beyls, javed.absar, ab Reviewed By: kristof.beyls, ab Subscribers: dberris, rovka, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D31711 llvm-svn: 299929
* [SelectionDAG] Check CALLSEQ_BEGIN nodes in DelayForLiveRegsSam Parker2017-04-111-0/+136
| | | | | | | | | | | | | | | | | A fix for the bug reported in PR30911. The issue arises when multiple CALLSEQ_BEGIN nodes are unscheduled as the last node to be unscheduled will gain access to the CallResource register. But when a node is being picked, only CALLSEQ_END nodes are checked against the CallResource and have their chains evaluated. This then means that other CALLSEQ_BEGIN nodes can be scheduled before the existing call sequence has been finalised. This patch adds a check against the FrameSetup nodes in DelayForLiveRegs to prevent this from happening. Differential Revision: https://reviews.llvm.org/D31536 llvm-svn: 299926
* [InstCombine] Support weird size element types in dyn_castNegVal.Craig Topper2017-04-112-4/+9
| | | | llvm-svn: 299915
* [LoopUnswitch] Fix a test caseSanjoy Das2017-04-111-2/+2
| | | | | | | | | | | | | | | (h/t to Chandler for pointing this out) The test in question was not at all testing what it was supposed to test. We do not //care// about placing `!make.implicit` in inner constant branch (since it will be folded away anyway). We care about placing `!make.implicit` in the outer branch that switches between either version of the loop. Having said that, it is _correct_ to leave behind the `!make.implicit` in the inner branch, but there is no need to do so. llvm-svn: 299912
* [LICM] Hoist fp division from the loops and replace by a reciprocalHal Finkel2017-04-111-0/+34
| | | | | | | | | | | When allowed, we can hoist a division out of a loop in favor of a multiplication by the reciprocal. Fixes PR32157. Patch by vit9696! Differential Revision: https://reviews.llvm.org/D30819 llvm-svn: 299911
* [PowerPC] multiply-with-overflow might use the CTR registerHal Finkel2017-04-111-0/+34
| | | | | | | | | | | | Check the legality of ISD::[US]MULO to see whether Intrinsic::[us]mul_with_overflow will legalize into a function call (and, thus, will use the CTR register). Fixes PR32485. Patch by Tim Neumann! Differential Revision: https://reviews.llvm.org/D31790 llvm-svn: 299910
* [ARM, x86] add tests to show possible improvement for bool math; NFCSanjay Patel2017-04-102-0/+64
| | | | llvm-svn: 299897
* CodeGen: BlockPlacement: Don't always tail-duplicate with no other successor.Kyle Butt2017-04-102-2/+55
| | | | | | | | | | The math works out where it can actually be counter-productive. The probability calculations correctly handle the case where the alternative is 0 probability, rely on those calculations. Includes a test case that demonstrates the problem. llvm-svn: 299892
* CodeGen: BlockPlacement: Minor probability changes.Kyle Butt2017-04-102-1/+42
| | | | | | | Qin may be large, and Succ may be more frequent than BB. Take these both into account when deciding if tail-duplication is profitable. llvm-svn: 299891
* CodeGen: BranchFolding: Merge identical blocks, even if they are short.Kyle Butt2017-04-101-0/+41
| | | | | | | | Merging identical blocks when it doesn't reduce fallthrough. It is common for the blocks created from critical edge splitting to be identical. We would like to merge these blocks whenever doing so would not reduce fallthrough. llvm-svn: 299890
* Allow DataLayout to specify addrspace for allocas.Matt Arsenault2017-04-109-0/+187
| | | | | | | | | | | | | | | | | | | | | | | LLVM makes several assumptions about address space 0. However, alloca is presently constrained to always return this address space. There's no real way to avoid using alloca, so without this there is no way to opt out of these assumptions. The problematic assumptions include: - That the pointer size used for the stack is the same size as the code size pointer, which is also the maximum sized pointer. - That 0 is an invalid, non-dereferencable pointer value. These are problems for AMDGPU because alloca is used to implement the private address space, which uses a 32-bit index as the pointer value. Other pointers are 64-bit and behave more like LLVM's notion of generic address space. By changing the address space used for allocas, we can change our generic pointer type to be LLVM's generic pointer type which does have similar properties. llvm-svn: 299888
* Emit less compiler optimization remarks in samplepgo to reduce a call to ↵Dehao Chen2017-04-102-2/+2
| | | | | | | | | | | | | | | | findCalleeFunctionSamples which is going to be refactored. Summary: Now the SamplePGO support is more stable, we do not need so many verbose optimization remarks emitted. Reviewers: dnovillo, davidxl Reviewed By: davidxl Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D31826 llvm-svn: 299883
* [GVNHoist] Call isGuaranteedToTransferExecutionToSuccessor on each instructionGeoff Berry2017-04-101-0/+21
| | | | | | | | | | | w.r.t. https://bugs.llvm.org/show_bug.cgi?id=32153 The consensus seems to be isGuaranteedToTransferExecutionToSuccessor should be called for each function. Patch by Aditya Kumar Differential Revision: https://reviews.llvm.org/D31035 llvm-svn: 299882
* Revert "[asan] Put ctor/dtor in comdat."Evgeniy Stepanov2017-04-102-13/+1
| | | | | | This reverts commit r299696, which is causing mysterious test failures. llvm-svn: 299880
* Revert "[asan] Fix dead stripping of globals on Linux."Evgeniy Stepanov2017-04-103-15/+9
| | | | | | This reverts commit r299697, which caused a big increase in object file size. llvm-svn: 299879
* Add address space mangling to lifetime intrinsicsMatt Arsenault2017-04-10114-792/+811
| | | | | | In preparation for allowing allocas to have non-0 addrspace. llvm-svn: 299876
* [llvm-pdbdump] Display padding bytes on record layoutZachary Turner2017-04-102-28/+30
| | | | | | | | | | | | | | | When dumping classes, show where padding occurs, and at the end of the class print statistics about how many bytes total of padding exist in a class. Since PDB doesn't specifically contain information about padding, we have to mimic this by sort of reversing a small portion of the record layout algorithm (e.g. looking at offsets and sizes and trying to determine whether something is part of the same field or a new field). Differential Revision: https://reviews.llvm.org/D31800 llvm-svn: 299869
* [MemCpyOpt] Only replace memcpy with bitcast if address spaces matchMatt Arsenault2017-04-101-0/+13
| | | | | | Patch by James Price llvm-svn: 299866
* MemorySSA: Make lifetime starts defs for mustaliased pointersDaniel Berlin2017-04-101-1/+1
| | | | | | | | | | | | | | | | | | Summary: While we don't want them aliasing with other pointers, there seems to be no point in not having them clobber must-aliased'd pointers. If some day, we split the aliasing and ordering chains, we'd make this not aliasing but an ordering barrier (IE it doesn't affect it's memory, but we can't hoist it above it). Reviewers: hfinkel, george.burgess.iv Subscribers: Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D31865 llvm-svn: 299865
* [ARM/AArch64] Ensure valid vector element types for interleaved accessesMatthew Simpson2017-04-102-0/+25
| | | | | | | | | | | This patch refactors and strengthens the type checks performed for interleaved accesses. The primary functional change is to ensure that the interleaved accesses have valid element types. The added test cases previously failed because the element type is f128. Differential Revision: https://reviews.llvm.org/D31817 llvm-svn: 299864
* [InstCombine] Use commutable matchers and m_OneUse in visitSub to shorten ↵Craig Topper2017-04-101-0/+122
| | | | | | | | code. Add missing test cases. In one case I removed commute handling for a multiply with a constant since we'll eventually get the constant on the right hand side. llvm-svn: 299863
* AMDGPU: Fix crash when disassembling VOP3 macMatt Arsenault2017-04-101-0/+19
| | | | | | | | | | | | The unused dummy src2_modifiers is missing, so it crashes when trying to print it. I tried to fully remove src2_modifiers, but there are some irritations in the places where it is converted to mad since it starts to require modifying use lists while iterating over them. llvm-svn: 299861
* [InstCombine] Use m_c_Add to shorten some code. Add testcases for this fold ↵Craig Topper2017-04-101-0/+18
| | | | | | since they were missing. NFC llvm-svn: 299853
* [X86][MMX] Add fast-isel support for MMX non-temporal writesSimon Pilgrim2017-04-101-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D31754 llvm-svn: 299852
* [InstCombine] fix matching of or-of-icmps constants (PR32524)Sanjay Patel2017-04-101-4/+3
| | | | | | | | | | | Also, make the same change in and-of-icmps and remove a hack for detecting that case. Finally, add some FIXME comments because the code duplication here is awful. This should fix the remaining IR problem noted in: https://bugs.llvm.org/show_bug.cgi?id=32524 llvm-svn: 299851
* Improves pretty printing of variable types in llvm-pdbdumpAdrian McCarthy2017-04-104-9/+28
| | | | | | | | | | | | | | | | | * Adds support for pointers to arrays, which was missing * Adds some tests * Improves consistency of const and volatile qualifiers * Eliminates non-composable special case code for arrays and function by using a more general recursive approach * Has a hack for getting the calling convention into the right spot for pointer-to-functions Given the rapid changes happenning in llvm-pdbdump, this may be difficult to merge. Differential Revision: https://reviews.llvm.org/D31832 llvm-svn: 299848
* [InstCombine] Support folding of add instructions with vector constants into ↵Craig Topper2017-04-101-6/+3
| | | | | | | | | | select operations We currently only fold scalar add of constants into selects. This improves this to support vectors too. Differential Revision: https://reviews.llvm.org/D31683 llvm-svn: 299847
* [InstCombine] add test for PR32524; NFCSanjay Patel2017-04-101-1/+15
| | | | llvm-svn: 299846
* [ARM] GlobalISel: Support G_FPOW for float and doubleDiana Picus2017-04-102-3/+114
| | | | | | Legalize to a libcall. llvm-svn: 299841
* [InstCombine] Make sure we preserve fast math flags when folding fp ↵Craig Topper2017-04-101-0/+23
| | | | | | | | | | | | | | | | instructions into phi nodes Summary: I noticed in the select folding code that we copied fast math flags, but did not do the same for the similar handling in phi nodes. This patch fixes that to do the same thing as select Reviewers: spatel, davide, majnemer, hfinkel Reviewed By: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31690 llvm-svn: 299838
* [InstCombine] use m_c_And and m_c_Xor to handle commuted versions of a ↵Craig Topper2017-04-101-6/+2
| | | | | | transform. llvm-svn: 299837
* [InstCombine] Add test cases demonstrating missing handling for the commuted ↵Craig Topper2017-04-101-0/+28
| | | | | | version of a transform. NFC. llvm-svn: 299836
* [SCCP] Resolve indirect branch target when possible.Xin Tong2017-04-101-0/+76
| | | | | | | | | | | | | | Summary: Resolve indirect branch target when possible. This potentially eliminates more basicblocks and result in better evaluation for phi and other things. Reviewers: davide, efriedma, sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30322 llvm-svn: 299830
* [InstCombine] remove duplicate test; NFCSanjay Patel2017-04-091-12/+0
| | | | | | I moved this test to 'not.ll' in r299824 but accidentally added a copy here. llvm-svn: 299828
* [SimplifyCFG] auto-generate better checks; NFCSanjay Patel2017-04-091-33/+130
| | | | llvm-svn: 299825
* [InstCombine] auto-generate better checks; NFCSanjay Patel2017-04-094-137/+238
| | | | | | Also, move a test next to its sibling to eliminate a file with just one test. llvm-svn: 299824
* [MemorySSA] Fix use of pointsToConstantMemory in ↵Hal Finkel2017-04-091-0/+23
| | | | | | | | | | isUseTriviallyOptimizableToLiveOnEntry In isUseTriviallyOptimizableToLiveOnEntry, pointsToConstantMemory needs to be called on the load's pointer operand, not on the result of the load (which might not even be a pointer). llvm-svn: 299823
* [InstCombine] Extend some OR combines to support vectors.Craig Topper2017-04-091-8/+2
| | | | | | | | This adds support for these combines for vectors (X^C)|Y -> (X|Y)^C iff Y&C == 0 Y|(X^C) -> (X|Y)^C iff Y&C == 0 llvm-svn: 299822
* [InstCombine] Extend a canonicalization check to apply to vector constants too.Craig Topper2017-04-091-4/+4
| | | | llvm-svn: 299821
* [InstCombine] Add test cases to show missing support for vectors in an OR ↵Craig Topper2017-04-091-0/+42
| | | | | | combine. Also add the commuted versions. NFC llvm-svn: 299820
* AMDGPU: Actually write nops for writeNopDataMatt Arsenault2017-04-081-0/+87
| | | | | | | Before this was just writing 0s, which ends up looking like a v_cndmask_b32 v0, s0, v0, vcc. Write out an encoded s_nop instead. llvm-svn: 299816
* [AsmParser]Emit an error if a macro has two (or more) parameters sharing the ↵Coby Tayree2017-04-081-0/+7
| | | | | | | | | | | | | same name Introducing a new error to macro parameters' parsing: currently, llvm-mc won't complain if a macro have two (or more) named params with the same name. this behavior is false, as there's no merit in having some params sharing a name. now, instead of tolerate such a phenomena - emit an appropriate error. Differential Revision: https://reviews.llvm.org/D31674 llvm-svn: 299815
* [coroutines] Make CoroSplit pass deterministicGor Nishanov2017-04-081-6/+4
| | | | | | | | | | | | | | | coro-split-after-phi.ll test was flaky due to non-determinism in the coroutine frame construction that was sorting the spill vector using a pointer to a def as a part of the key. The sorting was intended to make sure that spills for the same def are kept together, however, we populate the vector by processing defs in order, so the spill entires will end up together anyways. This change removes spill sorting and restores the determinism in the test. llvm-svn: 299809
* [ARM] Prefer BIC over BFC in ARM mode.Eli Friedman2017-04-077-19/+25
| | | | | | | | | | | | BIC is generally faster, and it can put the output in a different register from the input. We already do this in Thumb2 mode; not sure why the equivalent fix never got applied to ARM mode. Differential Revision: https://reviews.llvm.org/D31797 llvm-svn: 299803
* [GlobalISel]: Fix bug where we can report GISelFailure on erased instructionsAditya Nandakumar2017-04-071-0/+8
| | | | | | | | | | | | | The original instruction might get legalized and erased and expanded into intermediate instructions and the intermediate instructions might fail legalization. This end up in reporting GISelFailure on the erased instruction. Instead report GISelFailure on the intermediate instruction which failed legalization. Reviewed by: ab llvm-svn: 299802
* [AArch64] Allow global register asm("x18") or asm("w18") under -ffixed-x18Petr Hosek2017-04-072-0/+28
| | | | | | | | | | | | When using -ffixed-x18, the x18 (or w18) register can safely be used with the "global register variable" GCC extension, but the backend fails to recognize it. Patch by Roland McGrath. Differential Revision: https://reviews.llvm.org/D31793 llvm-svn: 299799
* De-flake a test that is failing due to coroutine spill insertion non-determinismReid Kleckner2017-04-071-4/+6
| | | | llvm-svn: 299791
* Revert "[SelectionDAG] Enable target specific vector scalarization of calls ↵Simon Dardis2017-04-074-1697/+24
| | | | | | | | | | | | | and returns" This reverts commit r299766. This change appears to have broken the MIPS buildbots. Reverting while I investigate. Revert "[mips] Remove usage of debug only variable (NFC)" This reverts commit r299769. Follow up commit. llvm-svn: 299788
* [AMDGPU] Unroll more to eliminate phis and conditionsStanislav Mekhanoshin2017-04-071-0/+34
| | | | | | | | | | | | | Increase threshold to unroll a loop which contains an "if" statement whose condition defined by a PHI belonging to the loop. This may help to eliminate if region and potentially even PHI itself, saving on both divergence and registers used for the PHI. Add a small bonus for each of such "if" statements. Differential Revision: https://reviews.llvm.org/D31693 llvm-svn: 299779
* Use PMADDWD to expand reduction in a loopDehao Chen2017-04-071-0/+103
| | | | | | | | | | | | | | | | | | Summary: PMADDWD can help improve 8/16 bit integer mutliply-add operation performance for cases like: for (int i = 0; i < count; i++) a += x[i] * y[i]; Reviewers: wmi, davidxl, hfinkel, RKSimon, zvi, mkuper Reviewed By: mkuper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31679 llvm-svn: 299776
OpenPOWER on IntegriCloud