135456 Commits

Author SHA1 Message Date
Vedant Kumar
ee8657416e [llvm-cov] Re-write a very opaque comment (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 18:02:54 +00:00
Hans Wennborg
e046459aa5 Trunk release notes now refer to 4.0.0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 18:02:23 +00:00
Vedant Kumar
98c7b9a114 [llvm-cov] Place anchors around line numbers in html reports
Based on a suggestion by Harlan Haskins!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:53:16 +00:00
Vedant Kumar
a3ff212693 [llvm-cov] Clean up error reporting (NFC)
Use CodeCoverageTool::{error,warning} everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275837 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:53:12 +00:00
Hans Wennborg
5337a14483 Bump the trunk version to 4.0.0svn.
Differential Revision: https://reviews.llvm.org/D21821

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275827 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:51:04 +00:00
Krzysztof Parzyszek
44217e1169 [Hexagon] Handle returning small structures by value
This is not compliant with the official ABI, but allows experimentation
with calling conventions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:36:46 +00:00
Krzysztof Parzyszek
b3b8a5a691 [Hexagon] Revert r275822: mistake in commit message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275824 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:34:49 +00:00
Simon Pilgrim
c91180f272 [X86][AVX] Add target shuffle decode support for VBROADCAST
Currently we only decode broadcasts from a vector of the same size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275823 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:32:59 +00:00
Krzysztof Parzyszek
4cb51c5c01 [Hexagon] Handle returning small structures by value
This is compliant with the official ABI, but allows experimentation with
calling conventions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275822 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:30:41 +00:00
Chih-Hung Hsieh
f94271deae [X86] Accept SELECT op code for x86-64 fp128 type
DAGTypeLegalizer::CanSkipSoftenFloatOperand should allow
SELECT op code for x86_64 fp128 type for MME targets,
so SoftenFloatOperand does not abort on SELECT op code.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:20:09 +00:00
David Majnemer
a9c9423e52 [MathExtras] Fix UB in minIntN
We negated a value with a signed type which invited problems when that
value was the most negative signed number.  Use an unsigned type
for the value instead.  It will compute the same twos complement
result without the UB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 17:03:09 +00:00
Adam Nemet
7778b11654 [LoopDist] This test does not require ASSERTS
Only its counterpart, diagnostics-with-hotness-lazy-BFI.ll, which
invokes opt with -debug-only=.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275812 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:37:32 +00:00
Adam Nemet
9b7ecbef6d [LoopDist] Port to new PM
Summary:
The direct motivation for the port is to ensure that the OptRemarkEmitter
tests work with the new PM.

This remains a function pass because we not only create multiple loops
but could also version the original loop.

In the test I need to invoke opt
with -passes='require<aa>,loop-distribute'.  LoopDistribute does not
directly depend on AA however LAA does.  LAA uses getCachedResult so
I *think* we need manually pull in 'aa'.

Reviewers: davidxl, silvas

Subscribers: sanjoy, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:29:27 +00:00
Adam Nemet
c7b8b5e22d [OptRemarkEmitter] Port to new PM
Summary:
The main goal is to able to start using the new OptRemarkEmitter
analysis from the LoopVectorizer.  Since the vectorizer was recently
converted to the new PM, it makes sense to convert this analysis as
well.

This pass is currently tested through the LoopDistribution pass, so I am
also porting LoopDistribution to get coverage for this analysis with the
new PM.

Reviewers: davidxl, silvas

Subscribers: llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275810 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:29:21 +00:00
Adam Nemet
c476e1701d Sort include headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:29:17 +00:00
Simon Pilgrim
00a0a786d0 [X86][AVX2] Added tests that demonstrate duplicate broadcasts
We don't yet decode broadcasts as a target shuffle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:17:34 +00:00
Krzysztof Parzyszek
2cdac8994e [Hexagon] Misc changes to HexagonMachineScheduler, NFC
- Remove duplicated code.
- Convert loop to range-for.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:15:15 +00:00
Krzysztof Parzyszek
a7c00b136c [Hexagon] Enable .cur formation in MISched for Hexagon V60
Schedule a load and its use in the same packet in MISched. Previously,
isResourceAvailable was returning false for dependences in the same
packet, which prevented MISched from packetizing a load and its use in
the same packet for v60.

Patch by Ikhlas Ajbar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 16:05:27 +00:00
Alexander Kornienko
71c0ef585b Revert "r275571 [DSE]Enhance shorthening MemIntrinsic based on OverlapIntervals"
Causes https://llvm.org/bugs/show_bug.cgi?id=28588


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 15:51:31 +00:00
Krzysztof Parzyszek
c47bedaa1b [Hexagon] Add verbose debugging mode to Hexagon MI Scheduler
Patch by Sergei Larin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 15:47:25 +00:00
Nemanja Ivanovic
fe4ad6d3ea [PowerPC] Remove redundant direct moves when extracting integers and converting to FP
This patch corresponds to review:
https://reviews.llvm.org/D21354

We use direct moves for extracting integer elements from vectors. We also use
direct moves when converting integers to FP. When these operations are chained,
we get a direct move out of a VSR followed by a direct move back into a VSR.
These are redundant - all we need to do is line up the element and convert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275796 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 15:30:00 +00:00
Nirav Dave
5646cdbe39 [MC] Cleanup Error Handling in AsmParser
Add parseToken and compatriot functions to stitch error checks in
straight linear code. As part of this fix some erronous handling of
directives where the EndOfStatement token either was not checked or
Lexed on termination.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275795 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 15:24:03 +00:00
Krzysztof Parzyszek
56af121d06 [Hexagon] Use timing class info as tie-breaker in machine scheduler
Patch by Sirish Pande.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275794 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 15:17:10 +00:00
Krzysztof Parzyszek
98b655feba [Hexagon] HexagonMachineScheduler should account for resources
The machine scheduler needs to account for available resources
more accurately in order to avoid scheduling an instruction that
forces a new packet to be created.

This occurs in two ways: First, an instruction without an available
resource may have a large priority due to other metrics and be
scheduled when there are other instructions with available resources.
Second, an instruction with a non-zero latency may become available
prematurely. In both these cases, we attempt change the priority
in order to allow a better instruction to be scheduled.

Patch by Brendon Cahoon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275793 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 14:52:13 +00:00
Krzysztof Parzyszek
9547556e81 [Hexagon] Fix zero latency instructions with multiple predecessors
An instruction may have multiple predecessors that are candidates
for using .cur. However, only one of them can use .cur in the
packet. When this case occurs, we need to make sure that only
one of the dependences gets a 0 latency value.

Patch by Brendon Cahoon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275790 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 14:23:10 +00:00
Alexander Kornienko
46f9c274d1 Fixed errors in docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 14:13:18 +00:00
Simon Pilgrim
0537d4bb36 [SLPVectorizer][X86] Added sqrt vectorization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 13:20:54 +00:00
Simon Dardis
5ebefb8fd2 [inlineasm] Propagate operand constraints to the backend
When SelectionDAGISel transforms a node representing an inline asm
block, memory constraint information is not preserved. This can cause
constraints to be broken when a memory offset is of the form:

offset + frame index

when the frame is resolved.

By propagating the constraints all the way to the backend, targets can
enforce memory operands of inline assembly to conform to their constraints.

For MIPSR6, some instructions had their offsets reduced to 9 bits from
16 bits such as ll/sc. This becomes problematic when using inline assembly
to perform atomic operations, as an offset can generated that is too big to
encode in the instruction.

Reviewers: dsanders, vkalintris

Differential Review: https://reviews.llvm.org/D21615


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 13:17:31 +00:00
Nicolai Haehnle
0c05ce4746 AMDGPU: Disable AMDGPUPromoteAlloca pass for shader calling conventions.
Summary:
The work item intrinsics are not available for the shader
calling conventions. And even if we did hook them up most
shader stages haves some extra restrictions on the amount
of available LDS.

Reviewers: tstellarAMD, arsenm

Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 09:02:47 +00:00
Diana Picus
7e13fe031b [ARM] Update test to use CHECK-LABEL. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 07:48:42 +00:00
Diana Picus
ef2833b8f3 [ARM] Skip inline asm memory operands in DAGToDAGISel
The current logic for handling inline asm operands in DAGToDAGISel interprets
the operands by looking for constants, which should represent the flags
describing the kind of operand we're dealing with (immediate, memory, register
def etc). The operands representing actual data are skipped only if they are
non-const, with the exception of immediate operands which are skipped explicitly
when a flag describing an immediate is found.

The oversight is that memory operands may be const too (e.g. for device drivers
reading a fixed address), so we should explicitly skip the operand following a
flag describing a memory operand. If we don't, we risk interpreting that
constant as a flag, which is definitely not intended.

Fixes PR26038

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 07:35:14 +00:00
Craig Topper
c9ba7aa68b [AVX512] Add EVEX versions of scalar ADD/SUB/MUL/DIV to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275775 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:49:32 +00:00
Craig Topper
4052e7231f [X86] Fix test checks to include leading 'v' on avx mnemonic names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:49:29 +00:00
Diana Picus
d504c85ea6 [ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl
At higher optimization levels, we generate the libcall for DIVREM_Ix, which is
fine: aeabi_{u|i}divmod. At -O0 we generate the one for REM_Ix, which is the
default {u}mod{q|h|s|d}i3.

This commit makes sure that we don't generate REM_Ix calls for ABIs that
don't support them (i.e. where we need to use DIVREM_Ix instead). This is
achieved by bailing out of FastISel, which can't handle non-double multi-reg
returns, and letting the legalization infrastructure expand the REM_Ix calls.

It also updates the divmod-eabi.ll test to run under -O0 as well, and adds some
Windows checks to it to make sure we don't break things for it.

Fixes PR27068

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:48:25 +00:00
Craig Topper
b06a386b31 [AVX512] Add KADD/KAND/KOR/KXOR to X86InstrInfo::isAssociativeAndCommutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275771 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:59 +00:00
Craig Topper
ad7e1daba6 [X86] Add VPMULLW/D/Q instructions to X86InstrInfo::isAssociativeAndCommutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:57 +00:00
Craig Topper
fefffbf697 [X86] Add VPADD instructions to X86InstrInfo::isAssociativeAndCommutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:54 +00:00
Craig Topper
81c3344bd0 [X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275768 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:50 +00:00
Craig Topper
4388ffce8e [X86] Add AVX512 instructions to X86InstrInfo::isAssociativeAndCommutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:47 +00:00
Craig Topper
224d1467d3 [X86] Add more AVX512 instructions to X86InstrInfo::isHighLatencyDef. Also add all packed fp division instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:45 +00:00
Craig Topper
3305a40150 [X86] Add AVX512 load opcodes and a couple AVX load opcodes to X86InstrInfo::areLoadsFromSameBasePtr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:43 +00:00
Craig Topper
e70f2b66e1 [X86] Add more opcodes to isFrameLoadOpcode/isFrameStoreOpcode. Mainly AVX-512 related.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:39 +00:00
Craig Topper
0c4677f3cc [AVX512] Use VMOVAPSZ128rr/VMOVAPS256rr for VR128X/VR256X physreg moves when VLX is supported.
Ideally we would use VEX encoded moves instead of EVEX if the high 16 registers aren't referenced, but this a good first step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275763 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:34 +00:00
Craig Topper
92763c0edd [X86] Fix 80-column violations. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:14:26 +00:00
David Majnemer
93324fe683 [GVNHoist] Change the key for VNtoInsns to a pair
While debugging GVNHoist, I found it confusing that the entries in a
VNtoInsns were not always value numbers.  They _usually_ were except for
StoreInst in which case they were a hash of two different value numbers.

This leads to two observations:
- It is more difficult to debug things when the semantic contents of
  VNtoInsns changes over time.
- Using a single value number is not much cheaper, the value of
  VNtoInsns is a SmallVector.
- It is not immediately clear what the algorithm would do if there were
  hash collisions in the StoreInst case.

Using a DenseMap of std::pair sidesteps all of this.

N.B.  The changes in the test were due their sensitivity to the
iteration order of VNtoInsns which has changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275761 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 06:11:37 +00:00
Vedant Kumar
4893e1f8d4 [llvm-cov] Attempt to fix a test failure on Windows
Don't make the test/tools/llvm-cov/demangle.test depend on the order in
which symbols are seen, or on the exact formatting llvm-cov emits after
a symbol is printed. This is an attempt to fix a Windows bot failure:

  http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9141

I don't know what the root cause of the failure is, or why the
showTemplateInstantiations test doesn't fail in the same way on the
Windows bots. However, this measure can't hurt, and it'll at least get
me on the blamelists again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 04:49:42 +00:00
NAKAMURA Takumi
73585958d4 Revert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute""
This reverts also r275029, "Update Clang tests after adding inference for the returned argument attribute"

It broke LTO build. Seems miscompilation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275756 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 03:23:25 +00:00
David Majnemer
a6f9e21635 [GVNHoist] Sink HoistedCtr into GVNHoist
HoistedCtr cannot be a mutated global variable, that will open us up to
races between threads compiling code in parallel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 00:35:01 +00:00
David Majnemer
326770a316 [GVNHoist] Some small cleanups
No functional change is intended, just trying to clean things up a
little.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 00:34:58 +00:00
Davide Italiano
7f321092d8 [GVN] Move other PRE tests to a subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-17 23:55:20 +00:00