summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* ThinLTO: do not import function whose linkage prevents inlining.Mehdi Amini2016-05-032-0/+10
| | | | | | | | | | | There is not point in importing a "weak" or a "linkonce" function since we won't be able to inline it anyway. We already had a targeted check for WeakAny, this is using the same check on GlobalValue as the inline, i.e. isMayBeOverriddenLinkage() From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268341
* Revert "ThinLTO: do not import function whose linkage prevents inlining."Mehdi Amini2016-05-022-10/+0
| | | | | | | This reverts commit r268315, the tests are not passing. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268317
* ThinLTO: do not import function whose linkage prevents inlining.Mehdi Amini2016-05-022-0/+10
| | | | | | | | | | | There is not point in importing a "weak" or a "linkonce" function since we won't be able to inline it anyway. We already had a targeted check for WeakAny, this is using the same check on GlobalValue as the inline, i.e. isMayBeOverriddenLinkage() From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 268315
* Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for ↵Reid Kleckner2016-05-021-232/+0
| | | | | | | | | | | empty block including lifetime intrinsics" This reverts commit r268254. This change causes assertion failures while building Chromium. Reduced test case coming soon. llvm-svn: 268288
* [SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block ↵Hans Wennborg2016-05-021-0/+232
| | | | | | | | | | | | | | | | | | including lifetime intrinsics Make it possible that TryToSimplifyUncondBranchFromEmptyBlock merges empty basic block including lifetime intrinsics as well as phi nodes and unconditional branch into its successor or predecessor(s). If successor of empty block has single predecessor, all contents including lifetime intrinsics are sinked into the successor. Otherwise, they are hoisted into its predecessor(s) and then merged into the predecessor(s). Patch by Josh Yoon <josh.yoon@samsung.com>! Differential Revision: http://reviews.llvm.org/D19257 llvm-svn: 268254
* Remove extra whitespace. NFC.Chad Rosier2016-05-021-4/+4
| | | | llvm-svn: 268248
* remove blank linesSanjay Patel2016-05-021-8/+1
| | | | llvm-svn: 268246
* [InstCombine] regenerate checksSanjay Patel2016-05-021-342/+493
| | | | llvm-svn: 268245
* [InstCombine] regenerate checksSanjay Patel2016-05-021-81/+73
| | | | llvm-svn: 268244
* [InstCombine] regenerate checksSanjay Patel2016-05-021-69/+103
| | | | llvm-svn: 268242
* [InstCombine] regenerate checksSanjay Patel2016-05-021-131/+183
| | | | llvm-svn: 268241
* [InstCombine] regenerate checksSanjay Patel2016-05-021-33/+43
| | | | llvm-svn: 268239
* [InstCombine] regenerate checksSanjay Patel2016-05-021-500/+674
| | | | llvm-svn: 268232
* [GlobalDCE] Modernize. Use FileCheck instead of grep.Davide Italiano2016-05-016-7/+15
| | | | llvm-svn: 268207
* [InstCombine][SSE] Added support to VPERMD/VPERMPS to shuffle combine to ↵Simon Pilgrim2016-05-011-5/+5
| | | | | | accept UNDEF elements. llvm-svn: 268206
* Dropped FIXME commentSimon Pilgrim2016-05-011-1/+1
| | | | llvm-svn: 268205
* [InstCombine][SSE] Added support to VPERMILVAR to shuffle combine to accept ↵Simon Pilgrim2016-05-011-8/+8
| | | | | | UNDEF elements. llvm-svn: 268204
* [InstCombine][AVX] Fixed PERMILVAR identity tests and added additional ↵Simon Pilgrim2016-05-011-13/+47
| | | | | | decode tests llvm-svn: 268203
* [InstCombine][SSE] Added support to PSHUFB to shuffle combine to accept ↵Simon Pilgrim2016-05-011-6/+4
| | | | | | UNDEF elements. llvm-svn: 268202
* [InstCombine][SSE] Regenerate MOVSX/MOVZX testsSimon Pilgrim2016-05-012-114/+116
| | | | llvm-svn: 268201
* [InstCombine][AVX2] Combine VPERMD/VPERMPS intrinsics with constant masks to ↵Simon Pilgrim2016-05-011-15/+13
| | | | | | shufflevector. llvm-svn: 268199
* [InstCombine][AVX2] Added VPERMD/VPERMPS shuffle combining placeholder tests.Simon Pilgrim2016-04-301-0/+87
| | | | | | For future support for VPERMD/VPERMPS to generic shuffles combines llvm-svn: 268166
* [InstCombine][AVX] Split off VPERMILVAR tests and added additional tests for ↵Simon Pilgrim2016-04-302-60/+124
| | | | | | UNDEF mask elements llvm-svn: 268159
* [LowerGuardIntrinsics] Keep track of !make.implicit metadataSanjoy Das2016-04-301-0/+12
| | | | | | | | | | If a guard call being lowered by LowerGuardIntrinsics has the `!make.implicit` metadata attached, then reattach the metadata to the branch in the resulting expanded form of the intrinsic. This allows us to implement null checks as guards and still get the benefit of implicit null checks. llvm-svn: 268148
* Reroll loops with multiple IV and negative step part 3Lawrence Hu2016-04-301-0/+134
| | | | | | | | | | | | | | support multiple induction variables This patch enable loop reroll for the following case: for(int i=0; i<N; i += 2) { S += *a++; S += *a++; }; Differential Revision: http://reviews.llvm.org/D16550 llvm-svn: 268147
* [LowerGuardIntrinsics] Preserve calling conv when loweringSanjoy Das2016-04-301-0/+15
| | | | llvm-svn: 268142
* add minimal test to show dropped metadataSanjay Patel2016-04-301-0/+28
| | | | llvm-svn: 268141
* remove the metadata added with r267827Sanjay Patel2016-04-301-14/+6
| | | | | | | We can demonstrate the 'select' bug and fix with a simpler test case. The merged weight values are already tested in another test. llvm-svn: 268139
* Mark guards on true as "trivially dead"Sanjoy Das2016-04-291-0/+11
| | | | | | | | | This moves some logic added to EarlyCSE in rL268120 into `llvm::isInstructionTriviallyDead`. Adds a test case for DCE to demonstrate that passes other than EarlyCSE can now pick up on the new information. llvm-svn: 268126
* [EarlyCSE] Simplify guard intrinsicsSanjoy Das2016-04-291-0/+181
| | | | | | | | | | | | | | | | | | Summary: This change teaches EarlyCSE some basic properties of guard intrinsics: - Guard intrinsics read all memory, but don't write to any memory - After a guard has executed, the condition it was guarding on can be assumed to be true - Guard intrinsics on a constant `true` are no-ops Reviewers: reames, hfinkel Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19578 llvm-svn: 268120
* [InstCombine] Determine the result of a select based on a dominating condition.Chad Rosier2016-04-291-0/+103
| | | | | | Differential Revision: http://reviews.llvm.org/D19550 llvm-svn: 268104
* [ValueTracking] matchSelectPattern needs to be more careful around FPDavid Majnemer2016-04-291-0/+26
| | | | | | | | | | | | matchSelectPattern attempts to see through casts which mask min/max patterns from being more obvious. Under certain circumstances, it would misidentify a sequence of instructions as a min/max because it assumed that folding casts would preserve the result. This is not the case for floating point <-> integer casts. This fixes PR27575. llvm-svn: 268086
* [BasicAA] Treat llvm.assume as not accessing memory in ↵Geoff Berry2016-04-291-0/+17
| | | | | | | | | | | | getModRefBehavior(Function) Reviewers: dberlin, chandlerc, hfinkel, reames, sanjoy Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D19730 llvm-svn: 268068
* auto-generate checksSanjay Patel2016-04-291-43/+40
| | | | llvm-svn: 268061
* [InstCombine][SSE] Added x86 pshufb undef mask testsSimon Pilgrim2016-04-291-1/+37
| | | | | FIXME: We currently don't support folding constant pshufb shuffle masks containing undef elements. llvm-svn: 268016
* [InstCombine][SSE] Regenerated x86 pshufb testsSimon Pilgrim2016-04-291-90/+113
| | | | llvm-svn: 268014
* [DeadArgumentElimination] Propagate operand bundles to promoted call sitesDavid Majnemer2016-04-291-0/+29
| | | | | | | We neglected to transfer operand bundles when performing argument promotion. llvm-svn: 268008
* [LoopDist] Add missing RUN line in test from r268006Adam Nemet2016-04-291-0/+2
| | | | llvm-svn: 268007
* [LoopDist] Also emit optimization remark on success (-Rpass=)Adam Nemet2016-04-291-0/+56
| | | | | | | The option -Rpass=loop-distribute now reports the loops that were distributed. llvm-svn: 268006
* [SLPVectorizer] Add operand bundles to vectorized functionsDavid Majnemer2016-04-291-0/+48
| | | | | | | SLPVectorizing a call site should result in further propagation of its bundles. llvm-svn: 268004
* [LoopVectorize] Add operand bundles to vectorized functionsDavid Majnemer2016-04-291-0/+45
| | | | | | | Also, do not crash when calculating a cost model for loop-invariant token values. llvm-svn: 268003
* AMDGPU: Stop reporting an addressing mode for unknown addrspaceMatt Arsenault2016-04-291-4/+20
| | | | | | | | | This was being treated the same as private, which has an immediate offset. For unknown, it probably means it's for a computation not actually being used for accessing memory, so it should not have a nontrivial addressing mode. llvm-svn: 268002
* [ArgumentPromotion] Propagate operand bundles to promoted call sitesDavid Majnemer2016-04-291-0/+31
| | | | | | | | | We neglected to transfer operand bundles when performing argument promotion. This fixes PR27568. llvm-svn: 267986
* [PR25281] Remove AAResultsWrapper from preserved analyses of loop vectorizer.Michael Zolotukhin2016-04-291-0/+59
| | | | | | | We don't preserve AAResults, because, for one, we don't preserve SCEV-AA. That fixes PR25281. llvm-svn: 267980
* [LoopVectorize] Keep hints from original loop on the vector loopHal Finkel2016-04-291-0/+30
| | | | | | | | | | | | | | | | We need to keep loop hints from the original loop on the new vector loop. Failure to do this meant that, for example: void foo(int *b) { #pragma clang loop unroll(disable) for (int i = 0; i < 16; ++i) b[i] = 1; } this loop would be unrolled. Why? Because we'd vectorize it, thus dropping the hints that unrolling should be disabled, and then we'd unroll it. llvm-svn: 267970
* [LoopDist] Emit optimization remarks (-Rpass*)Adam Nemet2016-04-281-0/+118
| | | | | | | | | | | | | | | | I closely followed the precedents set by the vectorizer: * With -Rpass-missed, the loop is reported with further details pointing to -Rpass--analysis. * -Rpass-analysis reports the details why distribution has failed. * Regardless of -Rpass*, when distribution fails for a loop where distribution was forced with the pragma, a warning is produced according to -Wpass-failed. In this case the analysis info is also printed even without -Rpass-analysis. llvm-svn: 267952
* [Inliner] Preserve llvm.mem.parallel_loop_access metadataHal Finkel2016-04-281-0/+57
| | | | | | | | | | | | | | | | | | | | | | | When inlining a call site with llvm.mem.parallel_loop_access metadata, this metadata needs to be propagated to all cloned memory-accessing instructions. Otherwise, inlining parts of the loop body will invalidate the annotation. With this functionality, we now vectorize the following as expected: void Body(int *res, int *c, int *d, int *p, int i) { res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; } void Test(int *res, int *c, int *d, int *p, int n) { int i; #pragma clang loop vectorize(assume_safety) for (i = 0; i < 1600; i++) { Body(res, c, d, p, i); } } llvm-svn: 267949
* [SLPVectorizer] Extend SLP Vectorizer to deal with aggregates.Arch D. Robison2016-04-281-0/+189
| | | | | | | | The refactoring portion part was done as r267748. http://reviews.llvm.org/D14185 llvm-svn: 267899
* [InstCombine][SSE] Add MOVMSK support to SimplifyDemandedUseBitsSimon Pilgrim2016-04-281-27/+10
| | | | | | | | | | The MOVMSK instructions copies a vector elements' sign bits to the low bits of a scalar register and zeros the high bits. This patch adds MOVMSK support to SimplifyDemandedUseBits so that its aware that the upper bits are known to be zero. It also removes the call to MOVMSK if none of the lower bits are actually required and just returns zero. Differential Revision: http://reviews.llvm.org/D19614 llvm-svn: 267873
* Update test to use FileCheckSanjay Patel2016-04-281-14/+41
| | | | | | Also, add some metadata to show what that currently looks like. llvm-svn: 267827
OpenPOWER on IntegriCloud