144551 Commits

Author SHA1 Message Date
Craig Topper
371f918f70 [AVX-512] Add scalar masked add/sub/mul/div intrinsic instructions to the load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294152 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:42 +00:00
Craig Topper
e91c6128e6 [AVX-512] Add masked scalar FMA intrinsics to isNonFoldablePartialRegisterLoad to improve load folding of scalar loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294151 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:40 +00:00
Craig Topper
dcc9f92981 [AVX-512] Add test cases that show failure to fold scalar loads into masked scalar FMA intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294150 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:37 +00:00
Craig Topper
9820885936 [AVX-512] Move 128/256-bit intrinsic tests from avx512bwvl test file to avx512vl test file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294149 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 22:25:35 +00:00
Simon Pilgrim
5996d6f385 [X86][AVX] Add 8i32 -> 8f32 sitofp tests with constant insertion
Some elements are constant inserted into the source integer vector before conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294147 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:40:25 +00:00
Dylan McKay
92f59a0260 [AVR] Implement stacksave/stackrestore by expanding (PR31342)
Summary:
Authored by Florian Zeitz.

This implements the missing stacksave/stackrestore intrinsics via expansion.

Output of `llc -O0 -march=avr ~/devel/llvm/test/CodeGen/Generic/stacksave-restore.ll` for sanity checking (comments mine):

```
	.text
	.file	".../llvm/test/CodeGen/Generic/stacksave-restore.ll"
	.globl	test
	.p2align	1
	.type	test,@function
test:                                   ; @test
; BB#0:
	push	r28
	push	r29

	in	r28, 61
	in	r29, 62
	sbiw	r28, 4
	in	r0, 63
	cli
	out	62, r29
	out	63, r0
	out	61, r28

	in	r18, 61
	in	r19, 62

	mov	r20, r22
	mov	r21, r23

	in	r30, 61
	in	r31, 62

	lsl	r22
	rol	r23
	lsl	r22
	rol	r23
	in	r26, 61
	in	r27, 62
	sub	r26, r22
	sbc	r27, r23
	andi	r26, 252
	in	r0, 63
	cli
	out	62, r27
	out	63, r0
	out	61, r26

	in	r0, 63
	cli
	out	62, r31
	out	63, r0
	out	61, r30

	in	r30, 61
	in	r31, 62
	sub	r30, r22
	sbc	r31, r23
	andi	r30, 252
	in	r0, 63
	cli
	out	62, r31
	out	63, r0
	out	61, r30

	std	Y+3, r24                ; 2-byte Folded Spill
	std	Y+4, r25                ; 2-byte Folded Spill

	mov	r24, r26
	mov	r25, r27

	in	r0, 63
	cli
	out	62, r19
	out	63, r0
	out	61, r18

	std	Y+1, r20                ; 2-byte Folded Spill
	std	Y+2, r21                ; 2-byte Folded Spill

	adiw	r28, 4
	in	r0, 63
	cli
	out	62, r29
	out	63, r0
	out	61, r28

	pop	r29
	pop	r28
	ret
.Lfunc_end0:
	.size	test, .Lfunc_end0-test
```

Reviewers: dylanmckay

Reviewed By: dylanmckay

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294146 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:35:45 +00:00
Dylan McKay
c24ff540a8 [docs] Document the staging buildbot
Summary:
This also adds docs to suggest that maintainers of buildbots for
experimental backends should use this buildmaster.

Reviewers: dsanders, grosser, asb, mehdi_amini

Reviewed By: grosser

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294144 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:21:23 +00:00
Kamil Rytarowski
a629f93c3e Revamp llvm::once_flag to be closer to std::once_flag
Summary:
Make this interface reusable similarly to std::call_once and std::once_flag interface.

This makes porting LLDB to NetBSD easier as there was in the original approach a portable way to specify a non-static once_flag. With this change translating std::once_flag to llvm::once_flag is mechanical.

Sponsored by <The NetBSD Foundation>

Reviewers: mehdi_amini, labath, joerg

Reviewed By: mehdi_amini

Subscribers: emaste, clayborg

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294143 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 21:13:06 +00:00
Dylan McKay
cf8a46b934 [AVR] Marm MIR test functions as tracking liveness information
This fixes an assertion error that broke three tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294140 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:25:34 +00:00
Vedant Kumar
2006b414f1 [llvm-cov] Don't show function summaries when filtering by filename (fixes PR31395)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294137 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:11:08 +00:00
Vedant Kumar
b766e93f51 [llvm-cov] Demangle symbols in function summaries (fixes PR31394)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294136 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:11:03 +00:00
Vedant Kumar
4858447bc5 [llvm-cov] Refactor logic for storing demangled symbols, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294135 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:10:58 +00:00
Vedant Kumar
95f974241b [llvm-cov] Fix a comment, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294134 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:10:55 +00:00
Craig Topper
7fa46d07d9 [X86] Fix printing of sha256rnds2 to include the implicit %xmm0 argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 18:33:31 +00:00
Craig Topper
cc54be0676 [X86] Fix printing of blendvpd/blendvps/pblendvb to include the implicit %xmm0 argument. This makes codegen output more obvious about the %xmm0 usage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 18:33:24 +00:00
Craig Topper
53eca87929 [X86] In LowerTRUNCATE, create an ISD::VECTOR_SHUFFLE instead of explicitly creating a PSHUFB. This will be lowered by regular shuffle lowering to a PSHUFB later.
Similar was already done for several other shuffles in this function.

The test changes are because the old code used explicity zeroing for elements that could have been undef.

While I was here I also changed other shuffle vectors in the same function to use the same input twice instead of creating UNDEF nodes. getVectorShuffle can create the UNDEF for us.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294130 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 18:33:14 +00:00
Geoff Berry
6698ce1acb [SelectionDAG] In InstrEmitter, handle EXTRACT_SUBREG of a physical register.
Summary:
Without this change, the getVR() call would hit an assert since it was
being passed a physical register.

Update the AArch64/ldst-opt.ll test with a case that triggers this
behavior by adding a run with strict-align, which causes an unaligned
STR XZR instruction to be split into byte stores, creating an
EXTRACT_SUBREG of XZR that triggers the original problem.

Reviewers: bogner, qcolombet, MatzeB, atrick

Subscribers: aemerson, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294129 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 18:28:14 +00:00
Simon Pilgrim
afb9ace066 [X86][SSE] Add target cpu specific reciprocal tests
As discussed on D26855, check individual cpu targets as part of the investigation into moving more combines to MachineCombiner



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294128 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 18:26:17 +00:00
Amaury Sechet
095ffad7c6 [DAGCombiner] Leverage add's commutativity
Summary: This avoid the need to duplicate all pattern and actually end up exposing some opportunity to optimize existing pattern that did not exists in both directions on an existing test case.

Reviewers: mkuper, spatel, bkramer, RKSimon, zvi

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294125 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 14:22:20 +00:00
Daniel Sanders
e0fd89875d [globalisel][arm] Tablegen-erate current Register Bank Information.
Summary:
This patch tablegen-erates the ARM register bank information so that the
static tables added in D27807 no longer need to be maintained.

Depends on D27338

Reviewers: t.p.northover, rovka, ab, qcolombet, aditya_nandakumar

Reviewed By: rovka

Subscribers: aemerson, rengolin, mgorny, dberris, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294124 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 12:07:55 +00:00
Dylan McKay
55c879f90c [AVR] Fix a bug where asm operands are printed twice
We would unconditionally call printOperand, even if PrintAsmOperand
already printed the immediate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294121 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 10:42:49 +00:00
Dylan McKay
10348c4bad [AVR] Support zero-sized arguments in defined methods
It is sufficient to skip emission of these arguments as we have nothing
to actually pass through the function call.

The AVR-GCC reference has nothing to say about zero-sized arguments,
presumably because C/C++ doesn't support them. This means we don't have
to worry about ABI differences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 09:53:45 +00:00
Dehao Chen
43293357c1 Refactor SampleProfile.cpp to make it cleaner. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294118 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 07:32:17 +00:00
Craig Topper
1cfb6c6e52 [X86] Add support for folding (insert_subvector vec1, (extract_subvector vec2, idx1), idx1) -> (blendi vec2, vec1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294112 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 23:26:46 +00:00
Craig Topper
7a4069d5de [X86] Simplify the code that turns INSERT_SUBVECTOR into BLENDI. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294111 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 23:26:42 +00:00
Craig Topper
156f3b7199 [DAGCombiner] Canonicalize the order of a chain of INSERT_SUBVECTORs.
Based on similar code for INSERT_VECTOR_ELT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294110 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 23:26:39 +00:00
Craig Topper
eff9145f5d [DAGCombiner] Use DAG.getAnyExtOrTrunc to simplify some code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294109 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 23:26:37 +00:00
Craig Topper
d85a5427b8 [DAGCombiner] In visitINSERT_VECTOR_ELT, move check for BUILD_VECTOR being legal below code that just canonicalizes INSERT_VECTOR_ELT without creating BUILD_VECTORS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 23:26:34 +00:00
Amaury Sechet
bc915ed403 Add test cases for (trunc adde) DAGCombiner patterns. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 22:53:07 +00:00
Alex Denisov
06d3c348d7 TripleTest.FileFormat: check non-default value
Triple::objectFormat defaults to an Elf format.
Changing objectFormat to Elf doesn't make any difference.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294104 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 22:49:22 +00:00
Dimitry Andric
68a49ae82c Add lld to the test-release.sh script
Building lld is enabled by default, but it can be disabled using the
-no-lld option.

Reviewers: tstellarAMD, rengolin, hans

Reviewed By: hans

Subscribers: grosser, wdng, emaste, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294102 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 22:24:55 +00:00
Simon Pilgrim
598cdd31a0 [X86][SSE] Add target shuffle combine buildvec style tests
Extra tests for D29399

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294101 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 22:17:22 +00:00
Davide Italiano
3fec6ee9cb [IPCP] Don't propagate return value for naked functions.
This is pretty much the same change made in SCCP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294098 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 19:44:14 +00:00
Alex Denisov
e6120c3c7f TripleTest.BitWidthArchVariants: add missing arch types (thumb, arm, le, ...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294096 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 18:20:20 +00:00
Alex Denisov
9fea1e77a4 TripleTest.EndianArchVariants: add missing arch types (tce, le)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 17:04:50 +00:00
Amaury Sechet
ca299bbd89 Formatting in DAGCombiner. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294091 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 13:01:53 +00:00
Xinliang David Li
7fdf3d7012 Fix variable name /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294090 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 07:40:43 +00:00
Craig Topper
516cb3de69 [CodeGen] Add v32i1 to is32BitVector and v64i1 to is64BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294089 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 03:09:42 +00:00
Matthias Braun
b6384b27aa MachineCopyPropagation: Respect implicit operands of COPY
The code missed to check implicit operands of COPY instructions for
defs/uses.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294088 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 02:27:20 +00:00
Matthias Braun
e92225895c MachineCopyPropagation: Do not consider undef operands as clobbers
This was originally introduced in r278321 to work around correctness
problems in the ExecutionDepsFix pass; Probably also to keep the
performance benefits of breaking the false dependencies which of course
also affect undef operands.

ExecutionDepsFix has been improved here recently (see for example
r278321) so we should not need this exception any longer.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294087 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 02:27:13 +00:00
Kyle Butt
286f20b1a2 [CodeGen]: BlockPlacement: Skip extraneous logging.
Move a check for blocks that are not candidates for tail duplication up before
the logging. Reduces logging noise. No non-logging changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294086 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 02:26:34 +00:00
Kyle Butt
7a25257c6c [CodeGen]: BlockPlacement: Apply const liberally. NFC
Anything that needs to be passed to AnalyzeBranch unfortunately can't be const,
or more would be const. Added const_iterator to BlockChain to allow
BlockChain to be const when we don't expect to change it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 02:26:32 +00:00
Eugene Zelenko
a4690f8340 [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce TargetInstrInfo.h dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 02:00:53 +00:00
Craig Topper
e8a9482235 [TwoAddressInstruction] Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 01:58:10 +00:00
Justin Lebar
ff921bc617 [NVPTX] Add tests that invariant vector loads get lowered to ld.global.nc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294082 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 01:54:56 +00:00
Eric Christopher
57dbe87087 Remove a bunch of unnecessary casts to a target specific version of TII and TRI as we're working from a target specific STI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294081 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 01:52:17 +00:00
Amaury Sechet
01b02c18d6 Add test cases for bug 31719. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294080 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 01:48:30 +00:00
Bob Haarman
447e81d4e2 fix nullptr Mangler in LTOModule
Reviewers: kcc, pcc

Subscribers: mehdi_amini

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294079 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 01:28:44 +00:00
Ahmed Bougacha
15b47b4b5e [GlobalISel] Add a few comments to the tablegen backend. NFC.
Based on a review of D29478 by Kristof Beyls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:47:10 +00:00
Ahmed Bougacha
f2992531eb [GlobalISel] Print the matched patterns using an action.
This lets us split out PatternToMatch from the top-level RuleMatcher,
where it doesn't really belong.  That, in turn, lets us eventually
generate RuleMatchers from non-SelectionDAG sources.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294076 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:47:08 +00:00