Commit Graph

144540 Commits

Author SHA1 Message Date
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
Ahmed Bougacha
3ebe403844 [GlobalISel] Add a test for the tablegen selector emitter backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294075 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:47:05 +00:00
Ahmed Bougacha
40d6dfa91e [GlobalISel] Separate matchers with newlines in emitted selector. NFC.
We don't try very hard to format the emitted code, but newlines
are an easy way to make it more readable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:47:02 +00:00
Ahmed Bougacha
6dc8838a5b [Support] Simplify triple check in Host CPU test. NFC.
Cleanup the check added in r293990 using the Triple helpers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294073 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:46:59 +00:00
Eugene Zelenko
3a1cd31471 [Sparc] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294072 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:36:49 +00:00
Brendon Cahoon
f7dc192ed6 [RegisterCoalescer] Do not call getInstructionIndex with DBG_VALUE
An assert occurs when calling SlotIndexes::getInstructionIndex with
a DBG_VALUE instruction because the function expects an instruction
with a slot index. However, there is no slot index for a DBG_VALUE
instruction.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294070 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-04 00:10:22 +00:00
Eugene Zelenko
591fad1982 [Mips] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294069 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 23:39:33 +00:00
Eugene Zelenko
cdc36e9281 [SystemZ] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294068 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 23:39:06 +00:00
Eugene Zelenko
bbfbbad7f5 [AMDGPU] Fix some Include What You Use warnings; other minor fixes (NFC).
This is preparation to reduce MCExpr.h dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294067 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 23:38:40 +00:00
Sanjay Patel
7c4d39c349 [InstCombine] treat i1 as a special type in shouldChangeType()
This patch is based on the llvm-dev discussion here:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109631.html

Folding to i1 should always be desirable because that's better for value tracking 
and we have special folds for i1 types.

I checked for other users of shouldChangeType() where this might have an effect, 
but we already handle the i1 case differently than other types in all of those cases.

Side note: the default datalayout includes i1, so it seems we only find this gap in 
shouldChangeType + phi folding for the case when there is (1) an explicit datalayout 
without i1, (2) casting to i1 from a legal type, and (3) a phi with exactly 2 incoming
casted operands (as Björn mentioned).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294066 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 23:13:11 +00:00
Amaury Sechet
21b9ce0d3d [APInt] Add integer API bor bitwise operations.
Summary: As per title. I ran into that limitation of the API doing some other work, so I though that'd be a nice addition.

Reviewers: jroelofs, compnerd, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 22:54:41 +00:00
Kostya Serebryany
66d69563f7 [libFuzzer] properly hide the memcmp interceptor from msan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 22:51:38 +00:00