139705 Commits

Author SHA1 Message Date
Daniel Jasper
c678874ec2 Silence unused warning in non-assert builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 06:39:44 +00:00
Craig Topper
1c62059ce7 [AVX-512] Fix v16i32 zero extending shuffle test case so it's really zero extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284106 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:41:01 +00:00
Craig Topper
6c06855a1a [AVX-512] Teach shuffle lowering to recognize 512-bit zero extends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:29:41 +00:00
Craig Topper
c42ce5a0ba [AVX-512] Add tests for basic 512-bit zero extending shuffle patterns. Code will be improved in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284104 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:29:37 +00:00
Diana Picus
bc668c9c34 Remove a FIXME that I forgot about. NFC.
Sorry about the noise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 05:28:55 +00:00
Craig Topper
350bc2e971 [X86] Simplify the lowering code for extracting and inserting subvectors.
We don't need to check if AVX is enabled. It's implied by the operation action being set to Custom.
We don't need to check both the input and output type widths. We only need to check the type that's being inserted or extracted. The other type is known to be a legal type and we can assume its a different width.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284102 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 04:14:47 +00:00
Sebastian Pop
7c621c7bc8 Memory-SSA: strengthen defClobbersUseOrDef interface
As Danny pointed out, defClobbersUseOrDef should use MemoryLocOrCall to make
sure fences are properly handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 03:23:33 +00:00
Sebastian Pop
0d25a932be commit back "GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)"
This is with an extra change to avoid calling MemoryLocation::get() on a call instruction.

Differential Revision: https://reviews.llvm.org/D25542

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284098 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 01:39:10 +00:00
Quentin Colombet
10c508497f [AArch64][RegisterBankInfo] Provide alternative mappings for 64-bit load
This allows RegBankSelect in greedy mode to get rid some of the cross
register bank copies when loads are involved in the chain of
computation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 01:01:23 +00:00
Reid Kleckner
db2e3264a9 Correct PrivateLinkage for COFF
- Use storage class C_STAT for 'PrivateLinkage' The storage class for
  PrivateLinkage should equal to the Internal Linkage.

- Set 'PrivateGlobalPrefix' from "L" to ".L" for MM_WinCOFF (includes
  x86_64) MM_WinCOFF has empty GlobalPrefix '\0' so PrivateGlobalPrefix
  "L" may conflict to the normal symbol name starting with 'L'.

Based on a patch by Han Sangjin! Manually updated test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:55:24 +00:00
Quentin Colombet
6837af0c59 [AArch64][RegisterBankInfo] Provide alternative mappings for G_BITCASTs.
Thanks to this patch, RegBankSelect is able to get rid of some register
bank copies as demonstrated in the test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:34:48 +00:00
Reid Kleckner
dd19d1b4f7 Revert "GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)"
This CL didn't actually address the test case in PR30499, and clang
still crashes.

Also revert dependent change "Memory-SSA cleanup of clobbers interface, NFC"

Reverts r283965 and r283967.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:18:26 +00:00
Quentin Colombet
342fb3e27b [AArch64][RegisterBankInfo] Describe cross regbank copies statically.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:12:06 +00:00
Quentin Colombet
d8bc7a16c7 [AArch64][RegisterBankInfo] Use static mapping for same bank G_BITCAST.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:12:04 +00:00
Quentin Colombet
df3941c1ca [AArch64][MachineLegalizer] Mark more G_BITCAST as legal.
Basically any vector types that fits in a 32-bit register is also valid
as far as copies are concerned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:12:01 +00:00
Quentin Colombet
7d96cfea3f [AArch64][RegisterBankInfo] Bump the cost of vector loads.
This does not change anything yet, because we do not offer any
alternative mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:11:59 +00:00
Quentin Colombet
d53b5adea4 [AArch64][RegisterBankInfo] Use a proper cost for cross regbank G_BITCASTs.
This does not change anything yet, because we do not offer any
alternative mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:11:57 +00:00
Quentin Colombet
910b53f361 [AArch64][RegisterBankInfo] Provide more realistic copy costs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 00:11:55 +00:00
Albert Gutowski
c0fa9afe60 fix function label name in addressofreturnaddress test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:58:45 +00:00
Mehdi Amini
d48e8c69be [GitHubMove Doc] Properly nest a subsection in the proposal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284082 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:36:11 +00:00
Albert Gutowski
fc61cb55fa fix title underline length
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:10:02 +00:00
Mehdi Amini
d6afe384af Moving to GitHub - Unified Proposal
This document describes the proposal to move to GitHub, and
compare the two proposals through various workflow examples,
presenting the current set of commands following by the ones
involved in each of the two proposals.

It is intended to supersede the previous "submodule proposal"
document entirely, and drive the discussion at the BoF during
the next Dev Meeting.

Differential Revision: https://reviews.llvm.org/D24167

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 23:02:02 +00:00
Krzysztof Parzyszek
6dcccf4d12 Handle lane masks in LivePhysRegs when adding live-ins
Differential Revision: https://reviews.llvm.org/D25533


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284076 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:53:41 +00:00
Tim Northover
5c4187e750 GlobalISel: support G_TRUNC selection on AArch64.
Ahmed's patch again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:15 +00:00
Tim Northover
8394d5db03 GlobalISel: support int <-> float conversions on AArch64.
More of Ahmed's work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284074 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:11 +00:00
Tim Northover
e205ee4f2c GlobalISel: select G_FCMP instructions on AArch64.
Another of Ahmed's patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284073 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:07 +00:00
Tim Northover
7bd256df7f GlobalISel: support selection of G_ICMP on AArch64.
Patch from Ahmed Bougaca again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:04 +00:00
Tim Northover
8e4c0619c7 GlobalISel: select G_BRCOND instructions on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:49:01 +00:00
Tim Northover
110db83eac GlobalISel: mark G_BRCOND on s1 as legal.
It's going to be a TBNZ (at -O0) anyway, so the high bits don't matter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:48:36 +00:00
Vedant Kumar
7c9f5f9286 [unittests] Delete even more copy constructors (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:44:50 +00:00
Vedant Kumar
f466ec4545 [unittests] Delete some copy constructors (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:27:54 +00:00
Vedant Kumar
3d6253492a [unittest] Pass a reference instead of making a copy (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:27:52 +00:00
Vedant Kumar
d05e76c71d [Coverage] Delete some copy constructors (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284064 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:27:49 +00:00
Vedant Kumar
98f853ee4f [Coverage] Factor out logic to create FunctionRecords (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:27:45 +00:00
Albert Gutowski
16bf208ba8 Create llvm.addressofreturnaddress intrinsic
Summary: We need a new LLVM intrinsic to implement MS _AddressOfReturnAddress builtin on 64-bit Windows.

Reviewers: majnemer, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25293

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 22:13:19 +00:00
Reid Kleckner
6cf9f6d8cb Update _MSC_VER equality checks for msdiaNNN.dll
Use inequality instead of equality to defend against minor version
increases in _MSC_VER. An _MSC_VER value of 1901 should still use
msdia140.dll, as described in this blog post:
https://blogs.msdn.microsoft.com/vcblog/2016/10/05/visual-c-compiler-version/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 21:51:14 +00:00
Michal Gorny
dee2afd336 [lit] Fix test shtest-timeout.py for modern output
Update the CHECK lines in the shtest-timeout.py lit test to account for
the current output. The output has been changed in r271610 without
adjusting the tests.

Differential Revision: https://reviews.llvm.org/D25236

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 21:40:08 +00:00
Michal Gorny
e58533d1b8 [lit] Fix FormatError on individual test timeout
Differential Revision: https://reviews.llvm.org/D25195

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284056 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 21:40:04 +00:00
Haicheng Wu
b893afb0a5 Reapply "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop"
Reappy r284044 after revert in r284051. Krzysztof fixed the error in r284049.

The original summary:

This patch tries to fully unroll loops having break statement like this

for (int i = 0; i < 8; i++) {
    if (a[i] == value) {
        found = true;
        break;
    }
}

GCC can fully unroll such loops, but currently LLVM cannot because LLVM only
supports loops having exact constant trip counts.

The upper bound of the trip count can be obtained from calling
ScalarEvolution::getMaxBackedgeTakenCount(). Part of the patch is the
refactoring work in SCEV to prevent duplicating code.

The feature of using the upper bound is enabled under the same circumstance
when runtime unrolling is enabled since both are used to unroll loops without
knowing the exact constant trip count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 21:29:38 +00:00
Krzysztof Parzyszek
b15c25855e [MIRParser] Parse lane masks for register live-ins
Differential Revision: https://reviews.llvm.org/D25530


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 21:06:45 +00:00
Haicheng Wu
3d05abfa85 Revert "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop"
This reverts commit r284044.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 21:02:22 +00:00
Krzysztof Parzyszek
dd572aa47e Fix testcases failing after r284036
The codegen has changed slightly between my tests and the commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 20:39:33 +00:00
Haicheng Wu
6ceda533e5 [LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop
This patch tries to fully unroll loops having break statement like this

for (int i = 0; i < 8; i++) {
    if (a[i] == value) {
        found = true;
        break;
    }
}

GCC can fully unroll such loops, but currently LLVM cannot because LLVM only
supports loops having exact constant trip counts.

The upper bound of the trip count can be obtained from calling
ScalarEvolution::getMaxBackedgeTakenCount(). Part of the patch is the
refactoring work in SCEV to prevent duplicating code.

The feature of using the upper bound is enabled under the same circumstance
when runtime unrolling is enabled since both are used to unroll loops without
knowing the exact constant trip count.

Differential Revision: https://reviews.llvm.org/D24790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 20:24:32 +00:00
Peter Collingbourne
d84bb1caf8 LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions().
We need to use the overload of Mangler::getNameWithPrefix that takes a
GlobalValue in order to mangle in the stdcall stack byte count for Windows
targets.

Differential Revision: https://reviews.llvm.org/D25529

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 20:12:19 +00:00
Teresa Johnson
e0ace4ad68 [ThinLTO] Fix bot failure due to unused variable with NDEBUG
Put variable only used in assert under #ifndef NDEBUG.

This should fix bot failure at
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/28537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284039 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 20:06:02 +00:00
Mehdi Amini
fed07c121e Revert "[ADT] Zip range adapter"
This reverts commit r284035, which breaks with MSVC 2013.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 19:54:08 +00:00
Krzysztof Parzyszek
7479130c26 Do not remove implicit defs in BranchFolder
Branch folder removes implicit defs if they are the only non-branching
instructions in a block, and the branches do not use the defined registers.
The problem is that in some cases these implicit defs are required for
the liveness information to be correct.

Differential Revision: https://reviews.llvm.org/D25478


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 19:50:57 +00:00
Mehdi Amini
7227e00003 [ADT] Zip range adapter
This augments the STLExtras toolset with a zip iterator and range
adapter. Zip comes in two varieties: `zip`, which will zip to the
shortest of the input ranges, and `zip_first`, which limits its
`begin() == end()` checks to just the first krange.

Patch by: Bryant Wong <github.com/bryant>

Differential Revision: https://reviews.llvm.org/D23252

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 19:43:02 +00:00
Matt Arsenault
7b6a558f24 AMDGPU: Initial implementation of VGPR indexing mode
This is the most basic handling of the indirect access
pseudos using GPR indexing mode. This currently only enables
the mode for a single v_mov_b32 and then disables it.
This is much more complicated to use than the movrel instructions,
so a new optimization pass is probably needed to fold the access
into the uses and keep the mode enabled for them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284031 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 18:49:05 +00:00
Teresa Johnson
256d6fed02 [ThinLTO] Don't link module level assembly when importing
Module inline asm was always being linked/concatenated
when running the IRLinker. This is correct for full LTO but not when
we are importing for ThinLTO, as it can result in multiply defined
symbols when the module asm defines a global symbol.

In order to test with llvm-lto2, I had to work around PR30396,
where a symbol that is defined in module assembly but defined in the
LLVM IR appears twice. Added workaround to llvm-lto2 with a FIXME.

Fixes PR30610.

Reviewers: mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25359

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284030 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-12 18:39:29 +00:00