OSDN Git Service

android-x86/external-llvm.git
8 years agoNVPTX: Replace uses of cuda.syncthreads with nvvm.barrier0
Justin Bogner [Wed, 6 Jul 2016 20:02:45 +0000 (20:02 +0000)]
NVPTX: Replace uses of cuda.syncthreads with nvvm.barrier0

Everywhere where cuda.syncthreads or __syncthreads is used, use the
properly namespaced nvvm.barrier0 instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274664 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNVPTX: Make the llvm.nvvm.shfl intrinsics and builtin names consistent
Justin Bogner [Wed, 6 Jul 2016 19:52:27 +0000 (19:52 +0000)]
NVPTX: Make the llvm.nvvm.shfl intrinsics and builtin names consistent

The intrinsics here use nvvm, but the builtins and tablegen variable
names were using ptx. Stick to the modern names here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274662 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRetry: "Emit CodeView type records for nested classes."
Adrian McCarthy [Wed, 6 Jul 2016 19:49:51 +0000 (19:49 +0000)]
Retry: "Emit CodeView type records for nested classes."

Now with a corrected test to account for a recently supported properties bit in the debug info of a struct.

Original review: http://reviews.llvm.org/D21939

This reverts commit 970c3fd497a28d25dd69526eb52594a696c37968.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274661 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DSE] Avoid iterator invalidation bugs.
Chad Rosier [Wed, 6 Jul 2016 19:48:52 +0000 (19:48 +0000)]
[DSE] Avoid iterator invalidation bugs.

The dse_with_dbg_value.ll test committed with r273141 is removed because this
we no longer performs any type of back tracking, which is what was causing the
codegen differences with and without debug information.

Differential Revision: http://reviews.llvm.org/D21613

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274660 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Conduct] Refine what "rare cases" means wrt violations outside our spaces.
Paul Robinson [Wed, 6 Jul 2016 19:32:41 +0000 (19:32 +0000)]
[Conduct] Refine what "rare cases" means wrt violations outside our spaces.
Text suggested by Daniel Berlin. While it is likely to be exactly what
the advisory committee would do anyway, codifying it does no harm and
helps reassure people that rare does not mean arbitrary.

Differential Revision: http://reviews.llvm.org/D21981

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274659 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] fix cost of SINT_TO_FP for i32 --> float (PR21356, PR28434)
Sanjay Patel [Wed, 6 Jul 2016 19:15:54 +0000 (19:15 +0000)]
[x86] fix cost of SINT_TO_FP for i32 --> float (PR21356, PR28434)

This is "cvtdq2ps" which does not appear to be particularly slow on any CPU
according to Agner's tables. Choosing "5" as a cost here as suggested in:
https://llvm.org/bugs/show_bug.cgi?id=21356
...but it seems very conservative given that the instruction is fully pipelined,
and I think these costs are supposed to model throughput.

Note that related costs are also most likely too high, but this fixes PR21356
and partly fixes PR28434.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274658 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWork around PR28400 a bit harder.
Sean Silva [Wed, 6 Jul 2016 19:05:41 +0000 (19:05 +0000)]
Work around PR28400 a bit harder.

We were still crashing in the "no change" case because LVI was not
getting invalidated.

See the thread "Should analyses be able to hold AssertingVH to IR?
(related to PR28400)" for more discussion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274656 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTailDuplicator: Remove live-in updating logic
Matthias Braun [Wed, 6 Jul 2016 18:55:10 +0000 (18:55 +0000)]
TailDuplicator: Remove live-in updating logic

This logic was introduced in r157663 and does not make any sense to me.
The motivating example in rdar://11538365 looks like this:

This is the tail:
BB#16: derived from LLVM BB %if.end68
    Live Ins: %R0 %R4 %R5
    Predecessors according to CFG: BB#15 BB#5
        tBLXi pred:14, pred:%noreg, <ga:@CFRelease>, %R0<kill>, <regmask>, %LR<imp-def,dead>, %SP<imp-use>, %SP<imp-def>
        t2B <BB#20>, pred:14, pred:%noreg
    Successors according to CFG: BB#20

This is the predBB:
BB#5:
    Live Ins: %R5
    Predecessors according to CFG: BB#4
        %R4<def> = t2MOVi 0, pred:14, pred:%noreg, opt:%noreg
        t2B <BB#16>, pred:14, pred:%noreg
    Successors according to CFG: BB#16

However this is invalid machine code to begin with, if %R0 is live-in to
BB#16 then it must be live-in to BB#5 as well if BB#5 does not define
it.  We should not need logic to retroactively fix broken machine code
and in fact the example from r157663 passes cleanly with the code
removed and I do not see any (newly) failing tests with the machine
verifier enabled.

Differential Revision: http://reviews.llvm.org/D22031

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274655 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Sort cast cost tables. NFC.
Michael Kuperstein [Wed, 6 Jul 2016 18:26:48 +0000 (18:26 +0000)]
[X86] Sort cast cost tables. NFC.

Cast cost tables are now sorted, for each cast type, lexicographically on
[source base type, source vector width, dest base type, base vector width].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274653 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SystemZ] Remove AND mask of bottom 6 bits when result is used for shift/rotate
Elliot Colp [Wed, 6 Jul 2016 18:13:11 +0000 (18:13 +0000)]
[SystemZ] Remove AND mask of bottom 6 bits when result is used for shift/rotate

On SystemZ, shift and rotate instructions only use the bottom 6 bits of the shift/rotate amount.
Therefore, if the amount is ANDed with an immediate mask that has all of the bottom 6 bits set, we
can remove the AND operation entirely.

Differential Revision: http://reviews.llvm.org/D21854

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274650 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNFC changed names in FunctionImport
Piotr Padlewski [Wed, 6 Jul 2016 18:12:23 +0000 (18:12 +0000)]
NFC changed names in FunctionImport

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274649 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Fixed typo in insertps lowering.
Simon Pilgrim [Wed, 6 Jul 2016 18:09:08 +0000 (18:09 +0000)]
[X86][SSE] Fixed typo in insertps lowering.

We were checking for 2 insertions (which is caught earlier in the pattern matching loop) instead of the case where we have no insertions.

Turns out this code never fires as we always try to lower to insertps after trying to lower to blendps, which would catch these cases - I'm about to make some changes to support combining to insertps which could cause this to fire so I don't want to remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Round trip the PDB stream between YAML and binary PDB.
Zachary Turner [Wed, 6 Jul 2016 18:05:57 +0000 (18:05 +0000)]
[pdb] Round trip the PDB stream between YAML and binary PDB.

This gets writing of the PDB stream working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274647 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnsure all uses of permute instructions feed vector stores
Kit Barton [Wed, 6 Jul 2016 18:03:52 +0000 (18:03 +0000)]
Ensure all uses of permute instructions feed vector stores

There is a problem in VSXSwapRemoval where it is incorrectly removing permute instructions.
In this case, the permute is feeding both a vector store and also a non-store instruction. In this case, the permute cannot be removed.

The fix is to simply look at all the uses of the vector register defined by the permute and ensure that all the uses are vector store instructions.

This problem was reported in PR 27735 (https://llvm.org/bugs/show_bug.cgi?id=27735).

Test case based on the original problem reported.

Phabricator Review: http://reviews.llvm.org/D21802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAGCombiner] Fix visitSTORE to continue processing current SDNode, if findBetterNeig...
Tim Shen [Wed, 6 Jul 2016 17:44:03 +0000 (17:44 +0000)]
[DAGCombiner] Fix visitSTORE to continue processing current SDNode, if findBetterNeighborChains doesn't actually CombineTo it.

Summary:
findBetterNeighborChains may or may not find a better chain for each node it finds, which include the node ("St") that visitSTORE is currently processing. If no better chain is found for St, visitSTORE should continue instead of return SDValue(St, 0), as if it's CombinedTo'ed.

This fixes bug 28130. There might be other ways to make the test pass (see D21409). I think both of the patches are fixing actual bugs revealed by the same testcase.

Reviewers: echristo, wschmidt, hfinkel, kbarton, amehsan, arsenm, nemanjai, bogner

Subscribers: mehdi_amini, nemanjai, llvm-commits

Differential Revision: http://reviews.llvm.org/D21692

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274644 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[TTI] The cost model should not assume vector casts get completely scalarized
Michael Kuperstein [Wed, 6 Jul 2016 17:30:56 +0000 (17:30 +0000)]
[TTI] The cost model should not assume vector casts get completely scalarized

The cost model should not assume vector casts get completely scalarized, since
on targets that have vector support, the common case is a partial split up to
the legal vector size. So, when a vector cast  gets split, the resulting casts
end up legal and cheap.

Instead of pessimistically assuming scalarization, base TTI can use the costs
the concrete TTI provides for the split vector, plus a fudge factor to account
for the cost of the split itself. This fudge factor is currently 1 by default,
except on AMDGPU where inserts and extracts are considered free.

Differential Revision: http://reviews.llvm.org/D21251

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274642 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a default parameter for getRegisteredOptions.
Zachary Turner [Wed, 6 Jul 2016 17:25:16 +0000 (17:25 +0000)]
Add a default parameter for getRegisteredOptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274640 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDisable hash verification of enums.
Zachary Turner [Wed, 6 Jul 2016 17:25:12 +0000 (17:25 +0000)]
Disable hash verification of enums.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274639 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPrune RelocVisitor.h include to avoid including COFF.h from MCJIT.h
Reid Kleckner [Wed, 6 Jul 2016 16:56:42 +0000 (16:56 +0000)]
Prune RelocVisitor.h include to avoid including COFF.h from MCJIT.h

This helps to mitigate the conflict between COFF.h and winnt.h, which is
PR28399.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274637 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo; NFC
Sanjay Patel [Wed, 6 Jul 2016 16:42:46 +0000 (16:42 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274636 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Emit CodeView type records for nested classes."
Adrian McCarthy [Wed, 6 Jul 2016 15:14:10 +0000 (15:14 +0000)]
Revert "Emit CodeView type records for nested classes."

This reverts commit 256b29322c827a2d94da56468c936596f5509032.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274632 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added test cases for missed opportunities to combine pshufb to pslldq...
Simon Pilgrim [Wed, 6 Jul 2016 15:09:48 +0000 (15:09 +0000)]
[X86][SSE] Added test cases for missed opportunities to combine pshufb to pslldq/psrldq

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274631 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEmit CodeView type records for nested classes.
Adrian McCarthy [Wed, 6 Jul 2016 14:47:32 +0000 (14:47 +0000)]
Emit CodeView type records for nested classes.

Differential Revision: http://reviews.llvm.org/D21939

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274629 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Don't widen trivial induction variables
Matthew Simpson [Wed, 6 Jul 2016 14:26:59 +0000 (14:26 +0000)]
[LV] Don't widen trivial induction variables

We currently always vectorize induction variables. However, if an induction
variable is only used for counting loop iterations or computing addresses with
getelementptr instructions, we don't need to do this. Vectorizing these trivial
induction variables can create vector code that is difficult to simplify later
on. This is especially true when the unroll factor is greater than one, and we
create vector arithmetic when computing step vectors. With this patch, we check
if an induction variable is only used for counting iterations or computing
addresses, and if so, scalarize the arithmetic when computing step vectors
instead. This allows for greater simplification.

This patch addresses the suboptimal pointer arithmetic sequence seen in
PR27881.

Reference: https://llvm.org/bugs/show_bug.cgi?id=27881
Differential Revision: http://reviews.llvm.org/D21620

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRe-commit of 274613.
Elena Demikhovsky [Wed, 6 Jul 2016 14:15:43 +0000 (14:15 +0000)]
Re-commit of 274613.

The prev commit failed on compilation.
A minor change in one pattern in lib/Target/X86/X86InstrAVX512.td fixes the failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274626 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: regression tests for bug 28413. NFC
Sam Kolton [Wed, 6 Jul 2016 12:52:20 +0000 (12:52 +0000)]
[AMDGPU] Assembler: regression tests for bug 28413. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274623 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 2 flags.
Diana Picus [Wed, 6 Jul 2016 11:22:11 +0000 (11:22 +0000)]
[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 2 flags.

This is a follow-up for r273544.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.

This commit also removes two command-line flags that weren't used in any of the
tests: widen-vmovs and swift-partial-update-clearance. The former may be easily
replaced with the mattr mechanism, but the latter may not (as it is a subtarget
property, and not a proper feature).

Differential Revision: http://reviews.llvm.org/D21797

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274620 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Do not test for CPUs, use SubtargetFeatures (Part 3). NFCI
Diana Picus [Wed, 6 Jul 2016 09:22:23 +0000 (09:22 +0000)]
[ARM] Do not test for CPUs, use SubtargetFeatures (Part 3). NFCI

This is a follow-up for r273544 and r273853.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.
This commit also marks them as obsolete.

Differential Revision: http://reviews.llvm.org/D21796

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274616 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReverted 274613 due to compilation failue.
Elena Demikhovsky [Wed, 6 Jul 2016 09:11:49 +0000 (09:11 +0000)]
Reverted 274613 due to compilation failue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274615 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: Optimization for patterns with i1 scalar type
Elena Demikhovsky [Wed, 6 Jul 2016 09:01:20 +0000 (09:01 +0000)]
AVX-512: Optimization for patterns with i1 scalar type

The patch removes redundant kmov instructions (not all, we still have a lot of work here) and redundant "and" instructions after "setcc".
I use "AssertZero" marker between X86ISD::SETCC node and "truncate" to eliminate extra "and $1" instruction.
I also changed zext, aext and trunc patterns in the .td file. It allows to remove extra "kmov" instruictions.

This patch fixes https://llvm.org/bugs/show_bug.cgi?id=28173.

Fast ISEL mode is not supported correctly for AVX-512. ICMP/FCMP scalar instruction should return result in k-reg. It will be fixed in one of the next patches. I redirected handling of "cmp" to the DAG builder mode. (The code looks worse in one specific test case, but without this fix the new patch fails).

Differential revision: http://reviews.llvm.org/D21956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274613 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix return of non-void-returning shaders
Nicolai Haehnle [Wed, 6 Jul 2016 08:35:17 +0000 (08:35 +0000)]
AMDGPU: Fix return of non-void-returning shaders

Summary:
Since "AMDGPU: Fix verifier errors in SILowerControlFlow", the logic that
ensures that a non-void-returning shader falls off the end of the last
basic block was effectively disabled, since SI_RETURN is now used.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96731

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, kzhuravl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21975

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274612 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVector GEP test: renamed + some comments
Elena Demikhovsky [Wed, 6 Jul 2016 08:11:23 +0000 (08:11 +0000)]
Vector GEP test: renamed + some comments

Differential revision: http://reviews.llvm.org/D21957

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274611 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove GCC builtin names from sse/avx packed fp cmp intrinsics so clang can...
Craig Topper [Wed, 6 Jul 2016 06:27:25 +0000 (06:27 +0000)]
[X86] Remove GCC builtin names from sse/avx packed fp cmp intrinsics so clang can special handle some of the immediate values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274607 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix handling of forward unreachable but reverse-reachable blocks in MemorySSA constru...
Daniel Berlin [Wed, 6 Jul 2016 05:32:05 +0000 (05:32 +0000)]
Fix handling of forward unreachable but reverse-reachable blocks in MemorySSA construction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274606 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove GCC builtins from the vplzcntd/q intrinsics so we can emit native...
Craig Topper [Wed, 6 Jul 2016 04:24:24 +0000 (04:24 +0000)]
[AVX512] Remove GCC builtins from the vplzcntd/q intrinsics so we can emit native IR using the generic ctlz intrinsic in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274602 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Split out more things from CFLSteens. NFC.
George Burgess IV [Wed, 6 Jul 2016 00:47:21 +0000 (00:47 +0000)]
[CFLAA] Split out more things from CFLSteens. NFC.

"More things" = StratifiedAttrs and various bits like interprocedural
summaries.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274592 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Split the CFL graph out from CFLSteens. NFC.
George Burgess IV [Wed, 6 Jul 2016 00:36:12 +0000 (00:36 +0000)]
[CFLAA] Split the CFL graph out from CFLSteens. NFC.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21963

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274591 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSSA] Fix typo. NFC.
George Burgess IV [Wed, 6 Jul 2016 00:28:43 +0000 (00:28 +0000)]
[MSSA] Fix typo. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274590 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Split into Anders+Steens analysis.
George Burgess IV [Wed, 6 Jul 2016 00:26:41 +0000 (00:26 +0000)]
[CFLAA] Split into Anders+Steens analysis.

StratifiedSets (as implemented) is very fast, but its accuracy is also
limited. If we take a more aggressive andersens-like approach, we can be
way more accurate, but we'll also end up being slower.

So, we've decided to split CFLAA into CFLSteensAA and CFLAndersAA.

Long-term, we want to end up in a place where CFLSteens is queried
first; if it can provide an answer, great (since queries are basically
map lookups). Otherwise, we'll fall back to CFLAnders, BasicAA, etc.

This patch splits everything out so we can try to do something like
that when we get a reasonable CFLAnders implementation.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21910

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274589 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: try to fix optimized build failure.
Tim Northover [Tue, 5 Jul 2016 23:15:58 +0000 (23:15 +0000)]
AArch64: try to fix optimized build failure.

I think the Ops filled out by Regex::match contain pointers into the temporary
std::string returned by StringRef::upper. Its lifetime is extended by the call
to match, but only until the end of that call (not to the uses of Ops later
on).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274586 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTableGen: avoid string copy.
Tim Northover [Tue, 5 Jul 2016 22:51:30 +0000 (22:51 +0000)]
TableGen: avoid string copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274584 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Simplified BROADCAST combining to avoid repeated matching attempts
Simon Pilgrim [Tue, 5 Jul 2016 22:41:04 +0000 (22:41 +0000)]
[X86][AVX2] Simplified BROADCAST combining to avoid repeated matching attempts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274583 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix an ordering problem in r274431
Manman Ren [Tue, 5 Jul 2016 22:24:44 +0000 (22:24 +0000)]
Fix an ordering problem in r274431

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274582 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove unnecessary string usage in AsmPrinter
Matt Arsenault [Tue, 5 Jul 2016 22:06:56 +0000 (22:06 +0000)]
AMDGPU: Remove unnecessary string usage in AsmPrinter

Registers are printed a lot, so don't create temporary
std::strings. Using char instead of a string to an ostream
saves a function call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274581 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[asan] Add a hidden option for Mach-O global metadata liveness tracking
Ryan Govostes [Tue, 5 Jul 2016 21:53:08 +0000 (21:53 +0000)]
[asan] Add a hidden option for Mach-O global metadata liveness tracking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274578 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: TableGenerate system instruction operands.
Tim Northover [Tue, 5 Jul 2016 21:23:04 +0000 (21:23 +0000)]
AArch64: TableGenerate system instruction operands.

The way the named arguments for various system instructions are handled at the
moment has a few problems:

  - Large-scale duplication between AArch64BaseInfo.h and AArch64BaseInfo.cpp
  - That weird Mapping class that I have no idea what I was on when I thought
    it was a good idea.
  - Searches are performed linearly through the entire list.
  - We print absolutely all registers in upper-case, even though some are
    canonically mixed case (SPSel for example).
  - The ARM ARM specifies sysregs in terms of 5 fields, but those are relegated
    to comments in our implementation, with a slightly opaque hex value
    indicating the canonical encoding LLVM will use.

This adds a new TableGen backend to produce efficiently searchable tables, and
switches AArch64 over to using that infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274576 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTableGen: promote "code" type from syntactic sugar.
Tim Northover [Tue, 5 Jul 2016 21:22:55 +0000 (21:22 +0000)]
TableGen: promote "code" type from syntactic sugar.

It's being immediately converted to a "string", but being able to tell what
type the field was originally can be useful in backends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274575 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTransfer ownership of the gold plugin.
Rafael Espindola [Tue, 5 Jul 2016 20:49:50 +0000 (20:49 +0000)]
Transfer ownership of the gold plugin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274574 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r259387: "AArch64: Implement missed conditional compare sequences."
Balaram Makam [Tue, 5 Jul 2016 20:24:05 +0000 (20:24 +0000)]
Revert r259387: "AArch64: Implement missed conditional compare sequences."

    This reverts commit r259387 because it inserts illegal code after legalization
    in some backends where i64 OR type is illegal for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274573 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Add support for target shuffle combining to BROADCAST
Simon Pilgrim [Tue, 5 Jul 2016 20:11:29 +0000 (20:11 +0000)]
[X86][AVX2] Add support for target shuffle combining to BROADCAST

Only support broadcast from vector register so far - memory folding support will have to wait.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274572 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Fixed decoding of permd/permpd variable mask shuffles + enabled them...
Simon Pilgrim [Tue, 5 Jul 2016 18:31:17 +0000 (18:31 +0000)]
[X86][AVX512] Fixed decoding of permd/permpd variable mask shuffles + enabled them for target shuffle combining

Corrected element mask masking to extract the bottom index bits (now matches the perm2 implementation but for unary inputs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274571 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoARM: fix `-mlong-calls` for WoA
Saleem Abdulrasool [Tue, 5 Jul 2016 18:30:52 +0000 (18:30 +0000)]
ARM: fix `-mlong-calls` for WoA

Not all code-paths set the relocation model to static for Windows.  This
currently breaks on Windows ARM with `-mlong-calls` when built with clang.
Loosen the assertion to what it was previously.  We would ideally ensure that
all the configuration sets Windows to static relocation model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274570 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Fold away vector extract of insert with the same index
Matt Arsenault [Tue, 5 Jul 2016 18:25:02 +0000 (18:25 +0000)]
DAGCombiner: Fold away vector extract of insert with the same index

This only really matters when the index is non-constant since the
constant case already gets taken care of by other combines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274569 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: use correct SDValue # when looking for bitfield placement.
Tim Northover [Tue, 5 Jul 2016 18:02:57 +0000 (18:02 +0000)]
AArch64: use correct SDValue # when looking for bitfield placement.

The other use really does only care about the SDNode (it checks the
opcode against a whitelist), but bitFieldPlacement can be misled if
the node produces multiple results.

Patch by Ismail Badawi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274567 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix folding SGPRs into madak/madmk src0
Matt Arsenault [Tue, 5 Jul 2016 17:09:01 +0000 (17:09 +0000)]
AMDGPU: Fix folding SGPRs into madak/madmk src0

Because of the special immediate operand, the constant
bus is already used so SGPRs are never useful.

r263212 changed the name of the immediate operand, which
broke the verifier check for the restriction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274564 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC/Darwin] Fix a -Wmisleading-indentation warning, reported by GCC 6.
Davide Italiano [Tue, 5 Jul 2016 16:56:09 +0000 (16:56 +0000)]
[MC/Darwin] Fix a -Wmisleading-indentation warning, reported by GCC 6.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274563 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove address space query functions from AMDGPUDAGToDAGISel
Tom Stellard [Tue, 5 Jul 2016 16:10:44 +0000 (16:10 +0000)]
AMDGPU/SI: Remove address space query functions from AMDGPUDAGToDAGISel

Summary:
These have been replaced with TableGen code (except for isConstantLoad,
which is still used for R600).  The queries were broken for cases
where MemOperand was a PseudoSourceValue.

Reviewers: arsenm

Subscribers: arsenm, kzhuravl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274561 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Refactor integer induction widening (NFC)
Matthew Simpson [Tue, 5 Jul 2016 15:41:28 +0000 (15:41 +0000)]
[LV] Refactor integer induction widening (NFC)

This patch also removes the SCEV variants of getStepVector() since they have no
uses after the refactoring.

Differential Revision: http://reviews.llvm.org/D21903

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274558 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] rename DS_1A1D_Off8_NORET to DS_1A2D_Off8_NORET as ds_write2xx use 2 source...
Valery Pykhtin [Tue, 5 Jul 2016 15:15:28 +0000 (15:15 +0000)]
[AMDGPU] rename DS_1A1D_Off8_NORET to DS_1A2D_Off8_NORET as ds_write2xx use 2 source registers. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274556 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Remove vector BROADCAST builtins.
Simon Pilgrim [Tue, 5 Jul 2016 14:49:58 +0000 (14:49 +0000)]
[X86][AVX512] Remove vector BROADCAST builtins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274555 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LLVM][INTRINSICS] adding intrinsics of CLFLUSHOPT
Michael Zuckerman [Tue, 5 Jul 2016 14:42:12 +0000 (14:42 +0000)]
[LLVM][INTRINSICS] adding intrinsics of CLFLUSHOPT

Differential Revision: http://reviews.llvm.org/D21789

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274553 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: Fix parsing error with floating-point literals passed to integer...
Sam Kolton [Tue, 5 Jul 2016 14:01:11 +0000 (14:01 +0000)]
[AMDGPU] Assembler: Fix parsing error with floating-point literals passed to integer instructions

Differential Revision: http://reviews.llvm.org/D21972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274551 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Autoupgrade the BROADCAST intrinsics
Simon Pilgrim [Tue, 5 Jul 2016 13:58:47 +0000 (13:58 +0000)]
[X86][AVX512] Autoupgrade the BROADCAST intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274550 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][ias] Remove k_PhysReg since it's not possible to create an operand of this...
Daniel Sanders [Tue, 5 Jul 2016 13:38:40 +0000 (13:38 +0000)]
[mips][ias] Remove k_PhysReg since it's not possible to create an operand of this kind.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D21986

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274547 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CMake] Adjust export_executable_symbols to cope with non-target link libraries
John Brawn [Tue, 5 Jul 2016 13:16:54 +0000 (13:16 +0000)]
[CMake] Adjust export_executable_symbols to cope with non-target link libraries

export_executable_symbols looks though the link libraries of the executable in
order to figure out transitive dependencies, but in doing so it assumes that
all link libraries are also targets. This is not true as of r273302, so adjust
it to check if they actually are targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274546 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512BW] Added BROADCAST intrinsics fast-isel generic IR tests
Simon Pilgrim [Tue, 5 Jul 2016 13:16:05 +0000 (13:16 +0000)]
[X86][AVX512BW] Added BROADCAST intrinsics fast-isel generic IR tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274545 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Thumb] Reapply r272251 with a fix for PR28348 (mk 2)
James Molloy [Tue, 5 Jul 2016 12:37:13 +0000 (12:37 +0000)]
[Thumb] Reapply r272251 with a fix for PR28348 (mk 2)

The important thing I was missing was ensuring newly added constants were kept in topological order. Repositioning the node is correct if the constant is newly added (so it has no topological ordering) but wrong if it already existed - positioning it next in the worklist would break the topological ordering.

Original commit message:
  [Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally negated

  If an immediate is only used in an AND node, it is possible that the immediate can be more optimally materialized when negated. If this is the case, we can negate the immediate and use a BIC instead;

    int i(int a) {
      return a & 0xfffffeec;
    }

  Used to produce:
      ldr r1, [CONSTPOOL]
      ands r0, r1
    CONSTPOOL: 0xfffffeec

  And now produces:
      movs    r1, #255
      adds    r1, #20  ; Less costly immediate generation
      bics    r0, r1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274543 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r274536: [mips][ias] Don't break apart and reconstruct StringRef's for k_Token...
Daniel Sanders [Tue, 5 Jul 2016 10:44:24 +0000 (10:44 +0000)]
Revert r274536: [mips][ias] Don't break apart and reconstruct StringRef's for k_Token. NFC.

It turns out that MSVC requires this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274538 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Added BROADCAST intrinsics fast-isel generic IR tests
Simon Pilgrim [Tue, 5 Jul 2016 10:15:14 +0000 (10:15 +0000)]
[X86][AVX512] Added BROADCAST intrinsics fast-isel generic IR tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274537 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][ias] Don't break apart and reconstruct StringRef's for k_Token. NFC.
Daniel Sanders [Tue, 5 Jul 2016 10:10:36 +0000 (10:10 +0000)]
[mips][ias] Don't break apart and reconstruct StringRef's for k_Token. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274536 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] - Legalize vector types by widening instead of integer promotion
Nemanja Ivanovic [Tue, 5 Jul 2016 09:22:29 +0000 (09:22 +0000)]
[PowerPC] - Legalize vector types by widening instead of integer promotion

This patch corresponds to review:
http://reviews.llvm.org/D20443

It changes the legalization strategy for illegal vector types from integer
promotion to widening. This only applies for vectors with elements of width
that is a multiple of a byte since we have hardware support for vectors with
1, 2, 3, 8 and 16 byte elements.
Integer promotion for vectors is quite expensive on PPC due to the sequence
of breaking apart the vector, extending the elements and reconstituting the
vector. Two of these operations are expensive.
This patch causes between minor and major improvements in performance on most
benchmarks. There are very few benchmarks whose performance regresses. These
regressions can be handled in a subsequent patch with a DAG combine (similar
to how this patch handles int -> fp conversions of illegal vector types).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274535 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Added VSHUFPD intrinsics fast-isel generic IR tests
Simon Pilgrim [Tue, 5 Jul 2016 09:10:07 +0000 (09:10 +0000)]
[X86][AVX512] Added VSHUFPD intrinsics fast-isel generic IR tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274534 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512VL] Added VSHUFPD/VSHUFPS intrinsics fast-isel generic IR tests
Simon Pilgrim [Tue, 5 Jul 2016 09:09:41 +0000 (09:09 +0000)]
[X86][AVX512VL] Added VSHUFPD/VSHUFPS intrinsics fast-isel generic IR tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274533 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotest: relax the match on the timestamp
Saleem Abdulrasool [Tue, 5 Jul 2016 01:14:53 +0000 (01:14 +0000)]
test: relax the match on the timestamp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274529 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoObject: support empty UID/GID fields
Saleem Abdulrasool [Tue, 5 Jul 2016 00:23:05 +0000 (00:23 +0000)]
Object: support empty UID/GID fields

Normal archives do not have empty UID/GID fields.  However, the Microsoft
Import library format is a customized archive (it just uses an alternate symbol
index format).  When the import library is constructed by lib.exe, the UID and
GID fields are left empty.  Do not abort on such an input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274528 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/R600: Add PatFrags for selecting the correct vtx id for loads
Tom Stellard [Tue, 5 Jul 2016 00:12:51 +0000 (00:12 +0000)]
AMDGPU/R600: Add PatFrags for selecting the correct vtx id for loads

This moves of the r600 logic out of isGlobalLoad() and into the
TableGen files.

Differential Revision: http://reviews.llvm.org/D21710

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274527 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support][Error] Make logAllUnhandledErrors take a Twine for the banner, rather
Lang Hames [Mon, 4 Jul 2016 22:47:53 +0000 (22:47 +0000)]
[Support][Error] Make logAllUnhandledErrors take a Twine for the banner, rather
than a const string&.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274526 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IR,X86] Remove some intrinsic prefixes earlier in the auto-upgrade code so we can...
Craig Topper [Mon, 4 Jul 2016 20:56:38 +0000 (20:56 +0000)]
[IR,X86] Remove some intrinsic prefixes earlier in the auto-upgrade code so we can shorten the length of the comparison strings and avoid repeatedly comparing the common prefix. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274522 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove hack for selecting < 32-bit loads to MUBUF instructions
Tom Stellard [Mon, 4 Jul 2016 20:41:48 +0000 (20:41 +0000)]
AMDGPU/SI: Remove hack for selecting < 32-bit loads to MUBUF instructions

Summary:
The isGlobalLoad() query was returning true for constant address space loads
with memory types less than 32-bits, which is wrong.  This logic has been
replaced with PatFrag in the TableGen files, to provide the same functionality.

Reviewers: arsenm

Subscribers: arsenm, kzhuravl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21696

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274521 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Add support for lowering shuffles to VSHUFPD
Simon Pilgrim [Mon, 4 Jul 2016 20:41:24 +0000 (20:41 +0000)]
[X86][AVX512] Add support for lowering shuffles to VSHUFPD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274520 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove masked VPERMD/VPERMQ/VPERMILPS/VPERMILPD intrinsics. They were autoup...
Craig Topper [Mon, 4 Jul 2016 19:58:38 +0000 (19:58 +0000)]
[AVX512] Remove masked VPERMD/VPERMQ/VPERMILPS/VPERMILPD intrinsics. They were autoupgraded to native IR in r274506 and r274506.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274519 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/R600: Add indentation to VTX and TEX fetch asm strings
Jan Vesely [Mon, 4 Jul 2016 19:45:00 +0000 (19:45 +0000)]
AMDGPU/R600: Add indentation to VTX and TEX fetch asm strings

These are printed as part of Fetch clauses.

Differential Revision: http://reviews.llvm.org/D21730

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274517 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[TableGen] Remove dead code. NFCI.
Davide Italiano [Mon, 4 Jul 2016 19:21:42 +0000 (19:21 +0000)]
[TableGen] Remove dead code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274515 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[Thumb] Reapply r272251 with a fix for PR28348"
James Molloy [Mon, 4 Jul 2016 17:14:24 +0000 (17:14 +0000)]
Revert "[Thumb] Reapply r272251 with a fix for PR28348"

This reverts commit r274510 - it made green dragon unhappy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274512 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Thumb] Reapply r272251 with a fix for PR28348
James Molloy [Mon, 4 Jul 2016 16:35:41 +0000 (16:35 +0000)]
[Thumb] Reapply r272251 with a fix for PR28348

We were using DAG->getConstant instead of DAG->getTargetConstant. This meant that we could inadvertently increase the use count of a constant if stars aligned, which it did in this testcase. Increasing the use count of the constant could cause ISel to fall over (because DAGToDAG lowering assumed the constant had only one use!)

Original commit message:
  [Thumb] Select a BIC instead of AND if the immediate can be encoded more optimally negated

  If an immediate is only used in an AND node, it is possible that the immediate can be more optimally materialized when negated. If this is the case, we can negate the immediate and use a BIC instead;

    int i(int a) {
      return a & 0xfffffeec;
    }

  Used to produce:
      ldr r1, [CONSTPOOL]
      ands r0, r1
    CONSTPOOL: 0xfffffeec

  And now produces:
      movs    r1, #255
      adds    r1, #20  ; Less costly immediate generation
      bics    r0, r1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274510 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Autoupgrade the VPERMPD/VPERMQ intrinsics
Simon Pilgrim [Mon, 4 Jul 2016 14:19:05 +0000 (14:19 +0000)]
[X86][AVX512] Autoupgrade the VPERMPD/VPERMQ intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274506 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Added VPERMPD/VPERMQ intrinsics fast-isel generic IR tests
Simon Pilgrim [Mon, 4 Jul 2016 13:43:10 +0000 (13:43 +0000)]
[X86][AVX512] Added VPERMPD/VPERMQ intrinsics fast-isel generic IR tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274503 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Autoupgrade the VPERMILPD/VPERMILPS intrinsics
Simon Pilgrim [Mon, 4 Jul 2016 12:40:54 +0000 (12:40 +0000)]
[X86][AVX512] Autoupgrade the VPERMILPD/VPERMILPS intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274498 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixed warning caused by r274402.
Eric Liu [Mon, 4 Jul 2016 12:10:08 +0000 (12:10 +0000)]
Fixed warning caused by r274402.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274497 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Added VPERMILPD/VPERMILPS intrinsics fast-isel generic IR tests
Simon Pilgrim [Mon, 4 Jul 2016 11:07:50 +0000 (11:07 +0000)]
[X86][AVX512] Added VPERMILPD/VPERMILPS intrinsics fast-isel generic IR tests

Added PSHUFD tests as well

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274493 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd writeonly IR attribute
Nicolai Haehnle [Mon, 4 Jul 2016 08:01:29 +0000 (08:01 +0000)]
Add writeonly IR attribute

Summary:
This complements the earlier addition of IntrWriteMem and IntrWriteArgMem
LLVM intrinsic properties, see D18291.

Also start using the attribute for memset, memcpy, and memmove intrinsics,
and remove their special-casing in BasicAliasAnalysis.

Reviewers: reames, joker.eph

Subscribers: joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D18714

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274485 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Make the code that detects a if a shuffle is really a concatenation of...
Craig Topper [Mon, 4 Jul 2016 06:19:35 +0000 (06:19 +0000)]
[CodeGen] Make the code that detects a if a shuffle is really a concatenation of the inputs more general purpose.

We can now handle concatenation of each source multiple times. The previous code just checked for each source to appear once in either order.

This also now handles an entire source vector sized piece having undef indices correctly. We now concat with UNDEF instead of using one of the sources. This is responsible for the test case change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274483 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReformat blank lines.
NAKAMURA Takumi [Mon, 4 Jul 2016 01:26:33 +0000 (01:26 +0000)]
Reformat blank lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274481 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReformat comment lines.
NAKAMURA Takumi [Mon, 4 Jul 2016 01:26:27 +0000 (01:26 +0000)]
Reformat comment lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274480 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUntabify.
NAKAMURA Takumi [Mon, 4 Jul 2016 01:26:21 +0000 (01:26 +0000)]
Untabify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274479 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReformat.
NAKAMURA Takumi [Mon, 4 Jul 2016 01:26:14 +0000 (01:26 +0000)]
Reformat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274478 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Add shuffle mask rescaling helper function. NFCI.
Simon Pilgrim [Sun, 3 Jul 2016 21:28:17 +0000 (21:28 +0000)]
[X86] Add shuffle mask rescaling helper function. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274476 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Merge unary permute matching behind the same V2.isUndef() condition....
Simon Pilgrim [Sun, 3 Jul 2016 20:39:42 +0000 (20:39 +0000)]
[X86][AVX2] Merge unary permute matching behind the same V2.isUndef() condition. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274474 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Add support for 512-bit shuffle lowering to VPERMPD/VPERMQ
Simon Pilgrim [Sun, 3 Jul 2016 19:50:06 +0000 (19:50 +0000)]
[X86][AVX512] Add support for 512-bit shuffle lowering to VPERMPD/VPERMQ

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274473 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Teach OR combine of shuffles involving zero vectors to better handle undef...
Craig Topper [Sun, 3 Jul 2016 19:37:12 +0000 (19:37 +0000)]
[CodeGen] Teach OR combine of shuffles involving zero vectors to better handle undef indices.

Undef indices can now be treated as zeros. Or if its undef ORed with zero, we will keep the undef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274472 91177308-0d34-0410-b5e6-96231b3b80d8