OSDN Git Service
Thomas Preud'homme [Thu, 2 May 2019 00:04:38 +0000 (00:04 +0000)]
FileCheck [4/12]: Introduce @LINE numeric expressions
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch introduces the @LINE numeric
expressions.
This commit introduces a new syntax to express a relation a numeric
value in the input text must have with the line number of a given CHECK
pattern: [[#<@LINE numeric expression>]]. Further commits build on that
to express relations between several numeric values in the input text.
To help with naming, regular variables are renamed into pattern
variables and old @LINE expression syntax is referred to as legacy
numeric expression.
Compared to existing @LINE expressions, this new syntax allow arbitrary
spacing between the component of the expression. It offers otherwise the
same functionality but the commit serves to introduce some of the data
structure needed to support more general numeric expressions.
Copyright:
- Linaro (changes up to diff 183612 of revision D55940)
- GraphCore (changes in later versions of revision D55940 and
in new revision created off D55940)
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60384
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359741
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 23:32:38 +0000 (23:32 +0000)]
Revert r359717, "Make check-clang depend on the clang-check binary always"
The Tooling tests do have a lit.local.cfg with
if not config.root.clang_staticanalyzer:
config.unsupported = True
so what's wrong isn't the missing dep, but that lit prints a warning for
the binary missing. This will need a different kind of fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359739
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 1 May 2019 22:50:11 +0000 (22:50 +0000)]
Fix erroneous flag in GISel line for arm64-fast-isel-materialize.ll
Accidentally put a fast-isel-abort=2 instead of the GISel abort line.
This test doesn't actually fall back at all for GISel though, so remove the
fallback checks entirely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359737
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Wed, 1 May 2019 22:49:52 +0000 (22:49 +0000)]
[PGO][CHR] A bug fix.
Summary: Fix a transformation bug where two scopes share a common instrution to hoist.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359736
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 1 May 2019 22:40:23 +0000 (22:40 +0000)]
[ORC] Pass object buffer ownership back in NotifyEmitted.
Clients who want to regain ownership of object buffers after they have been
linked may now use the NotifyEmitted callback for this purpose.
Note: Currently NotifyEmitted is only called if linking succeeds. If linking
fails the buffer is always discarded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359735
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 1 May 2019 22:39:43 +0000 (22:39 +0000)]
[GlobalISel][AArch64] Use fmov for G_FCONSTANT when possible
This adds support for using fmov rather than a standard mov to materialize
G_FCONSTANT when it's safe to do so.
Update arm64-fast-isel-materialize.ll and select-constant.mir to show that the
selection is correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359734
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Wed, 1 May 2019 20:18:36 +0000 (20:18 +0000)]
[AArch64] Add tests for bool vector reductions; NFC
Baseline tests for PR41635.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359723
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 20:00:45 +0000 (20:00 +0000)]
Try to unbreak sphinx bot after r359714
The now-correctly-referenced label dbi_type_server_map_substream didn't
exist. Rewrite things a bit after looking at NewDBIHdr in dbi.h and its
use in dbi.cpp in the reference implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359721
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 19:34:00 +0000 (19:34 +0000)]
Make check-clang depend on the clang-check binary always
check-clang (the target that runs all clang tests) used to
only depend on clang-check (a binary like clang-tidy,
clang-refactor, etc) if the static analyzer is enabled.
However, several lit tests call clang-check unconditionally,
so always depend on it.
Fixes a "could not find clang-check" lit warning in clean builds with
the static analyzer disabled.
Also sort the deps in the CMake file and put just one dep on each line.
Differential Revision: https://reviews.llvm.org/D61324
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359717
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 19:29:30 +0000 (19:29 +0000)]
Minor tweaks to PDB docs
- Fix a broken link
- Some spelling fixes
- Remove an unnecessary "amortized"
- Don't say "log(n) random access"; "random access" means O(1)
- Make MSF overview a bit more concise
Differential Revision: https://reviews.llvm.org/D61196
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359714
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 19:15:05 +0000 (19:15 +0000)]
Convert PDB docs to unix line endings. No other changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359712
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 1 May 2019 17:34:30 +0000 (17:34 +0000)]
[PowerPC] add test that could infinite loop with reordered transforms; NFC
This is a slightly reduced version of the test from D61384.
Adding this as a preliminary step, so I can update D61149 with
the proposed fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359709
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 17:13:35 +0000 (17:13 +0000)]
[X86][SSE] Fold scalar horizontal add/sub for non-0/1 element extractions
We already perform horizontal add/sub if we extract from elements 0 and 1, this patch extends it to non-0/1 element extraction indices (as long as they are from the lowest 128-bit vector).
Differential Revision: https://reviews.llvm.org/D61263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359707
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 1 May 2019 16:52:29 +0000 (16:52 +0000)]
[globalisel] Update the legalizer documentation
Summary:
* The getActionDefinitionsBuilder() is now documented.
* Includes descriptions of the various actions (legal*, widenScalar*, lower*,
etc).
* Includes descriptions of the various predicates (*If, *For,
*ForCartesianProduct, etc.)
* Includes the rule-order details
* Removed the out-of-date prohibition on non-power-of-2 types.
* Removed the Vector types section since it was incorrect and vectors follow the
same ruleset as scalars. They're only special in the sense that more of the
actions and predicates are meaningful for them (e.g. moreElements).
* Clarified the position on context sensitive legality (which is not permitted)
and contrasted this with context sensitive legalization (which is permitted).
Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, arsenm
Reviewed By: paquette
Subscribers: wdng, rovka, kristof.beyls, jfb, Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61273
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359705
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 1 May 2019 16:49:31 +0000 (16:49 +0000)]
[AMDGPU] gfx1010 GCNRegBankReassign pass
Reassign registers to reduce register bank conflicts.
Differential Revision: https://reviews.llvm.org/D61344
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359704
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 16:45:15 +0000 (16:45 +0000)]
Option spell checking: Penalize delimiter flags if input has no argument
If the user passes a flag like `-version` to a program, it's more likely
they mean `--version` than `-version:`, since there's no parameter
passed. Hence, give delimited arguments a penalty of 1 if the user input
doesn't contain the delimiter or no data after it.
The motivation is that with this, lld-link can suggest "--version"
instead of "-version:" for "-version" and "-nodefaultlib" instead of
"-nodefaultlib:" for "-nodefaultlibs".
Differential Revision: https://reviews.llvm.org/D61382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359701
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 1 May 2019 16:40:49 +0000 (16:40 +0000)]
[AMDGPU] gfx1010 GCNNSAReassign pass
Convert NSA into non-NSA images.
Differential Revision: https://reviews.llvm.org/D61341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359700
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 1 May 2019 16:32:58 +0000 (16:32 +0000)]
[AMDGPU] gfx1010 MIMG implementation
Differential Revision: https://reviews.llvm.org/D61339
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359698
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 1 May 2019 16:26:59 +0000 (16:26 +0000)]
[ThinLTO] Fix unreachable code when parsing summary entries.
Summary:
Early returns were causing some code to be skipped. This was missed
since the summary entries are typically at the end of the llvm assembly
file.
Fixes PR41663.
Reviewers: RKSimon, wristow
Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61355
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359697
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 1 May 2019 16:11:11 +0000 (16:11 +0000)]
[AMDGPU] gfx1010 DS implementation
Differential Revision: https://reviews.llvm.org/D61332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359696
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 1 May 2019 16:06:21 +0000 (16:06 +0000)]
Revert "[DAGCombiner] try repeated fdiv divisor transform before building estimate"
This reverts commit
fb9a5307a94e6f1f850e4d89f79103b123f16279 (rL359398)
because it can cause an infinite loop due to opposing combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359695
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 16:01:49 +0000 (16:01 +0000)]
Fix 80 column violation. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359694
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Wed, 1 May 2019 15:58:24 +0000 (15:58 +0000)]
[SCEV] Use isKnownViaNonRecursiveReasoning for smax simplification
Summary:
Commit
rL331949: SCEV] Do not use induction in isKnownPredicate for simplification umax
changed the codepath for umax from isKnownPredicate to
isKnownViaNonRecursiveReasoning to avoid compile time blow up (and as
I found out also stack overflows). However, there is an exact copy of
the code for umax that was lacking this change. In D50167 I want to unify
these codepaths, but to avoid that being a behavior change for the smax
case, pull this independent bit out of it.
Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D61166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359693
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Wed, 1 May 2019 15:47:16 +0000 (15:47 +0000)]
[lit][tests][AIX] Update expected form of diagnostic messages; use `not` to normalize non-zero exit values
Summary:
Various tests in the `lit` testing suite expect specific return codes
and forms of diagnostic message from utility programs. As per
POSIX.1-2017 XCU Section 1.4, Utility Description Defaults, "[the]
format of diagnostic messages for most utilities is unspecified".
The STDERR subsections of the `cat` and `wc` utilities merely indicate
that "[the] standard error shall be used only for diagnostic messages".
The corresponding EXIT STATUS subsections merely indicate, with regard
to errors, an exit value of >0.
The affected tests are updated to accept the applicable diagnostic
message as produced by the utilities on AIX. The exit value is
normalized using `not` as necessary.
Reviewers: xingxue, sfertile, jasonliu
Reviewed By: xingxue
Subscribers: delcypher, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60553
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359690
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Wed, 1 May 2019 15:36:18 +0000 (15:36 +0000)]
[tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples
Summary:
Triple components in `XFAIL` lines are tested against the target triple.
Various tests that are expected to fail on big-endian hosts are marked
as being `XFAIL` for big-endian targets. This patch corrects these tests
by having them test against a new `host-byteorder-big-endian` feature.
Reviewers: xingxue, sfertile, jasonliu
Reviewed By: xingxue
Subscribers: jvesely, nhaehnle, fedor.sergeev, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60551
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359689
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 15:31:15 +0000 (15:31 +0000)]
[llvm-ar][llvm-nm][llvm-size] Change -long-option to --long-option in tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359688
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 14:50:50 +0000 (14:50 +0000)]
[X86][SSE] Add demanded elts support X86ISD::PMULDQ\PMULUDQ
Add to SimplifyDemandedVectorEltsForTargetNode and SimplifyDemandedBitsForTargetNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359686
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 14:46:17 +0000 (14:46 +0000)]
Fix OptTable::findNearest() adding delimiter for free
Prior to this, OptTable::findNearest() thought that the input `--foo`
had an editing distance of 0 from an existing flag `--foo=`, which made
it suggest flags with delimiters more often than flags without one.
After this, it correctly assigns this case an editing distance of 1.
Differential Revision: https://reviews.llvm.org/D61373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359685
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Wed, 1 May 2019 14:39:11 +0000 (14:39 +0000)]
[LoopInfo] Faster implementation of setLoopID. NFC.
Summary:
This change was part of D46460. However, in the meantime rL341926 fixed the
correctness issue here. What remained was the performance issue in setLoopID
where it would iterate through all blocks in the loop and their successors,
rather than just the predecessor of the header (the later presumably being
much faster). We already have the `getLoopLatches` to compute precisely these
basic blocks in an efficient manner, so just use it (as the original commit
did for `getLoopID`).
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D61215
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359684
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 13:51:09 +0000 (13:51 +0000)]
[X86][SSE] Add SSE vector shift support to SimplifyDemandedVectorEltsForTargetNode vector splitting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359680
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 1 May 2019 13:04:44 +0000 (13:04 +0000)]
Wrap to 80 columns, no behavior change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359679
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 12:48:42 +0000 (12:48 +0000)]
[X86][SSE] Split 512-bit -> 128-bit vector directly in SimplifyDemandedVectorEltsForTargetNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359678
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 12:37:41 +0000 (12:37 +0000)]
[X86][SSE] Add 512-bit vector support to SimplifyDemandedVectorEltsForTargetNode vector splitting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359677
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 1 May 2019 12:37:30 +0000 (12:37 +0000)]
DAG: allow DAG pointer size different from memory representation.
In preparation for supporting ILP32 on AArch64, this modifies the SelectionDAG
builder code so that pointers are allowed to have a larger type when "live" in
the DAG compared to memory.
Pointers get zero-extended whenever they are loaded, and truncated prior to
stores. In addition, a few not quite so obvious locations need updating:
* A GEP that has not been marked inbounds needs to enforce the IR-documented
2s-complement wrapping at the memory pointer size. Inbounds GEPs are
undefined if they overflow the address space, so no additional operations
are needed.
* Signed comparisons would give incorrect results if performed on the
zero-extended values.
This shouldn't affect CodeGen for now, but will become active when the AArch64
ILP32 support is committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359676
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 11:29:36 +0000 (11:29 +0000)]
[X86][SSE] Add X86ISD::PACKSS\PACKUS to SimplifyDemandedVectorEltsForTargetNode vector splitting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359673
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 11:17:11 +0000 (11:17 +0000)]
[X86][SSE] Add scalar horizontal add/sub tests for element extractions from upper lanes
As suggested on D61263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359671
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 11:08:03 +0000 (11:08 +0000)]
[X86][SSE] Add X86ISD::UNPCKL\UNPCK to SimplifyDemandedVectorEltsForTargetNode vector splitting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359670
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 10:58:38 +0000 (10:58 +0000)]
[X86][SSE] Move extract_subvector(pshufb) fold to SimplifyDemandedVectorEltsForTargetNode
This lets us hit more cases than combineExtractSubvector and allows us reuse more code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359669
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 10:40:48 +0000 (10:40 +0000)]
[llvm-objdump] Print newlines before and after "Disassembly of section ...:"
This improves readability and the behavior is consistent with GNU objdump.
The new test test/tools/llvm-objdump/X86/disassemble-section-name.s
checks we print newlines before and after "Disassembly of section ...:"
Differential Revision: https://reviews.llvm.org/D61127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359668
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 10:38:10 +0000 (10:38 +0000)]
[X86] SimplifyDemandedVectorEltsForTargetNode - pull out vector halving code. NFCI.
Pull out the HADD/HSUB code to halve vector widths if the upper half isn't used - prep work to adding support for other opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359667
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 1 May 2019 10:02:22 +0000 (10:02 +0000)]
[X86][SSE] Extract i1 elements from vXi1 bool vectors
This is an alternative to D59669 which more aggressively extracts i1 elements from vXi1 bool vectors using a MOVMSK.
Differential Revision: https://reviews.llvm.org/D61189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359666
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 1 May 2019 09:45:55 +0000 (09:45 +0000)]
[yaml2obj] - Report when unknown section is referenced from program header declaration block.
Previously we did not report this.
Also this removes multiple lookups in the map
what cleanups the code.
Differential revision: https://reviews.llvm.org/D61322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359663
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 09:28:24 +0000 (09:28 +0000)]
[llvm-readobj] Change -t to --symbols in tests. NFC
-t is --symbols in llvm-readobj but --section-details (unimplemented) in readelf.
The confusing option should not be used since we aim for improving
compatibility.
Keep just one llvm-readobj -t use case in test/tools/llvm-readobj/symbols.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359661
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 09:01:10 +0000 (09:01 +0000)]
[gold] Fix two readelf tests after rL359649
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359660
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 1 May 2019 06:53:03 +0000 (06:53 +0000)]
[X86FixupLEAs] Hoist the calls to isLEA out of the 3 separate functions and put it in the basic block instruction loop. NFC
Now need to check it 3 different times. Just do it once at the top of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359658
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 06:46:34 +0000 (06:46 +0000)]
Fix test/tools/llvm-readobj/mips-plt.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359657
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 05:55:22 +0000 (05:55 +0000)]
[llvm-readobj] llvm-readobj --elf-output-style=GNU => llvm-readelf. NFC
The latter is much more common.
A dedicated --elf-output-style=GNU test demonstrating it is the same as
llvm-readelf is sufficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359652
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 05:27:20 +0000 (05:27 +0000)]
[llvm-readobj] Change -long-option to --long-option in tests. NFC
We use both -long-option and --long-option in tests. Switch to --long-option for consistency.
In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf.
While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359649
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Wed, 1 May 2019 05:01:03 +0000 (05:01 +0000)]
Revert "[llvm] r359313 - [PowerPC] Update P9 vector costs for insert/extract element"
This causes segfaults during optimized builds. More details, including a reproducer, are on the llvm-commits thread for r359313.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359648
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 03:38:41 +0000 (03:38 +0000)]
Delete outdated comment about DISubprogram. NFC
rL301501 deleted DisplayName and rearranged the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359647
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 1 May 2019 02:43:52 +0000 (02:43 +0000)]
[JITLink] Make sure we explicitly deallocate memory on failure.
JITLinkGeneric phases 2 and 3 (focused on applying fixups and finalizing memory,
respectively) may fail for various reasons. If this happens, we need to
explicitly de-allocate the memory allocated in phase 1 (explicitly, because
deallocation may also fail and so is implemented as a method returning error).
No testcase yet: I am still trying to decide on the right way to test totally
platform agnostic code like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359643
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 1 May 2019 01:28:12 +0000 (01:28 +0000)]
Make some comments that were meant to be for public documentation
actually public documentation (i.e. // -> ///).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359640
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 1 May 2019 00:39:31 +0000 (00:39 +0000)]
[llvm-objcopy] Simplify SHT_NOBITS -> SHT_PROGBITS promotion
GNU objcopy uses bfd_elf_get_default_section_type to decide the candidate section type,
which roughly translates to our [a] (I assume SEC_COMMON implies SHF_ALLOC):
(!(Sec.Flags & ELF::SHF_ALLOC) || Flags & (SectionFlag::SecContents | SectionFlag::SecLoad)))
Then, it updates the section type in bfd/elf.c:elf_fake_sections if:
if (this_hdr->sh_type == SHT_NULL)
this_hdr->sh_type = sh_type; // common case
else if (this_hdr->sh_type == SHT_NOBITS
&& sh_type == SHT_PROGBITS
&& (asect->flags & SEC_ALLOC) != 0) // uncommon case
...
this_hdr->sh_type = sh_type;
If the following condition is met the uncommon branch is executed:
if (elf_section_type (osec) == SHT_NULL
&& (osec->flags == isec->flags
|| (final_link
&& ((osec->flags ^ isec->flags)
& ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC)) == 0)))
I suggest we just ignore this clause and follow the common case
behavior, which is done in this patch. Rationales to do so:
If --set-section-flags is a no-op (osec->flags == isec->flags)
(corresponds to the "readonly" test in set-section-flags.test), GNU
objcopy will require (Sec.Flags & ELF::SHF_ALLOC). [a] is essentially:
Flags & (SectionFlag::SecContents | SectionFlag::SecLoad)
This special case is not really useful. Non-SHF_ALLOC SHT_NOBITS
sections do not make much sense and it doesn't matter if they are
SHT_NOBITS or SHT_PROGBITS.
For all other RUN lines in set-section-flags.test, the new behavior
matches GNU objcopy, i.e. this patch improves compatibility.
Differential Revision: https://reviews.llvm.org/D60189
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359639
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 23:40:58 +0000 (23:40 +0000)]
gn build: Fix build on macOS after r359570 / r359527
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359637
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 23:22:40 +0000 (23:22 +0000)]
gn build: Merge r359626
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359635
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 30 Apr 2019 23:10:28 +0000 (23:10 +0000)]
[WebAssembly] Update expectations for gcc torture tests
This is needed to make the wasm waterfall green again
after we land the update to WASI:
https://github.com/WebAssembly/waterfall/pull/492
Differential Revision: https://reviews.llvm.org/D61351
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359634
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 30 Apr 2019 23:09:26 +0000 (23:09 +0000)]
[InstCombine] Limit a vector demanded elts rule which was producing invalid IR.
The demanded elts rules introduced for GEPs in https://reviews.llvm.org/rL356293 replaced vector constants with undefs (by design). It turns out that the LangRef disallows such cases when indexing structs. The right fix is probably to relax the langref requirement, and update other passes to expect the result, but for the moment, limit the transform to avoid compiler crashes.
This should fix https://bugs.llvm.org/show_bug.cgi?id=41624.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359633
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 23:04:49 +0000 (23:04 +0000)]
[WebAssembly] Test the "wasm32-wasi" triple
Add triple tests for "wasm32-wasi" and "wasm64-wasi", and also remove the
"-musl" component from the existing wasm triple tests as we're not using that
in practice (WASI libc is derived in part from musl, but it is not fully
musl-compatible).
Differential Revision: https://reviews.llvm.org/D61334
Reviewer: sbc100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359629
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Apr 2019 22:43:55 +0000 (22:43 +0000)]
[MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.
Summary:
MemorySSA keeps internal pointers of AA and DT.
If these get invalidated, so should MemorySSA.
Reviewers: george.burgess.iv, chandlerc
Subscribers: jlebar, Prazek, llvm-commits
Tags: LLVM
Differential Revision: https://reviews.llvm.org/D61043
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359627
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 22:42:01 +0000 (22:42 +0000)]
[ORC] Move SimpleCompiler/ConcurrentIRCompiler definitions into a .cpp file.
SimpleCompiler is no longer templated, so there's no reason for this code to be
in a header any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359626
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 30 Apr 2019 22:35:35 +0000 (22:35 +0000)]
[llvm-profdata] Fix indentation error in docs. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359625
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Apr 2019 22:15:47 +0000 (22:15 +0000)]
[AliasAnalysis/NewPassManager] Invalidate AAManager less often.
Summary:
This is a redo of D60914.
The objective is to not invalidate AAManager, which is stateless, unless
there is an explicit invalidate in one of the AAResults.
To achieve this, this patch adds an API to PAC, to check precisely this:
is this analysis not invalidated explicitly == is this analysis not abandoned == is this analysis stateless, so preserved without explicitly being marked as preserved by everyone
Reviewers: chandlerc
Subscribers: mehdi_amini, jlebar, george.burgess.iv, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61284
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359622
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 30 Apr 2019 22:08:23 +0000 (22:08 +0000)]
[AMDGPU] gfx1010 VMEM and SMEM implementation
Differential Revision: https://reviews.llvm.org/D61330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359621
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 30 Apr 2019 22:05:11 +0000 (22:05 +0000)]
[llvm-profdata] Fix indentation error. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359619
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Apr 2019 21:55:15 +0000 (21:55 +0000)]
Add an include of Module since we actually access it now and remove
the forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359618
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Apr 2019 21:44:21 +0000 (21:44 +0000)]
Fix a few -Werror warnings:
- Remove a variable only used in an assert
- Fix pessimizing move warning around copy elision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359617
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 30 Apr 2019 21:29:20 +0000 (21:29 +0000)]
[PassManagerBuilder] Add option for interleaved loops, for loop vectorize.
Summary:
Match NewPassManager behavior: add option for interleaved loops in the
old pass manager, and use that instead of the flag used to disable loop unroll.
No changes in the defaults.
Reviewers: chandlerc
Subscribers: mehdi_amini, jlebar, dmgreen, hsaito, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61030
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359615
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 21:28:07 +0000 (21:28 +0000)]
[JITLink] Add debugging output to print resolved external atoms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359614
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 30 Apr 2019 21:27:56 +0000 (21:27 +0000)]
[ORC][JITLink] Name in-memory compiled objects after their source modules.
In-memory compiled object buffer identifiers will now be derived from the
identifiers of their source IR modules. This makes it easier to connect
in-memory objects with their source modules in debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359613
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 30 Apr 2019 21:19:12 +0000 (21:19 +0000)]
[llvm-profdata] Add overlap command to compute similarity b/w two profile files
Add overlap functionality to llvm-profdata tool to compute the similarity
between two profile files.
Differential Revision: https://reviews.llvm.org/D60977
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359612
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Tue, 30 Apr 2019 20:44:53 +0000 (20:44 +0000)]
[NFC][InlineCost] cleanup - comments, overflow handling.
Reviewed By: apilipenko
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60751
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359609
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 20:31:07 +0000 (20:31 +0000)]
[X86][SSE] Fold extract_subvector(extend(x)) -> extend_vector_inreg(x)
This adds any extend support - folding to zero_extend_vector_inreg (PMOVZX) for legality
Minor improvement for PR39709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359608
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 19:58:56 +0000 (19:58 +0000)]
[WebAssembly] Fix test after r359602
Update the expected output for this test now that the EXPLICIT_NAME
flag is being printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359605
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 19:43:35 +0000 (19:43 +0000)]
Fix stack-use-after free after r359580
`Candidate` was a StringRef refering to a temporary string.
Instead, create a local variable for the string and use
a StringRef referring to that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359604
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 19:30:24 +0000 (19:30 +0000)]
[WebAssembly] Support EXPLICIT_NAME symbols in llvm-readobj
Teach llvm-readobj about WASM_SYMBOL_EXPLICIT_NAME.
Differential Revision: https://reviews.llvm.org/D61323
Reviewer: sbc100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359602
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Apr 2019 19:17:59 +0000 (19:17 +0000)]
[WebAssembly] Support f16 libcalls
Add support for f16 libcalls in WebAssembly. This entails adding signatures
for the remaining F16 libcalls, and renaming gnu_f2h_ieee/gnu_h2f_ieee to
truncsfhf2/extendhfsf2 for consistency between f32 and f64/f128 (compiler-rt
already supports this).
Differential Revision: https://reviews.llvm.org/D61287
Reviewer: dschuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359600
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 30 Apr 2019 19:02:15 +0000 (19:02 +0000)]
[X86] Remove if that's always true
It's been like this since it was added in a refactor of this code.
Fixes PR41659
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359597
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 30 Apr 2019 18:35:38 +0000 (18:35 +0000)]
[SimplifyLibCalls] Clean up code (NFC)
Fix pointer check after dereferencing (PR41665).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359595
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Apr 2019 18:15:18 +0000 (18:15 +0000)]
[AArch64] add more tests for constant folding failures; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359592
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 30 Apr 2019 17:56:47 +0000 (17:56 +0000)]
[X86] If PreprocessISelDAG reorders a load before a call, make sure we remove dead nodes from the graph
The reordering can leave at least a dead TokenFactor in the graph. This cause the linearize scheduler to fail with something like the assert seen in PR22614. This is only one of many ways we can break the linearize scheduler today so I can't say for sure that any of the other failures in that bug were caused by this issue.
This takes the heavy hammer approach of just running RemoveDeadNodes unconditionally at the end of the PreprocessISelDAG. If this turns out to be a compile time hit, we can try to refine it.
Differential Revision: https://reviews.llvm.org/D61164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359582
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 30 Apr 2019 17:56:28 +0000 (17:56 +0000)]
[X86] Initial cleanups on the FixupLEAs pass. Separate Atom LEA creation from other LEA optimizations.
This removes some of the class variables. Merge basic block processing into
runOnMachineFunction to keep the flags local.
Pass MachineBasicBlock around instead of an iterator. We can get the iterator in
the few places that need it. Allows a range-based outer for loop.
Separate the Atom optimization from the rest of the optimizations. This allows
fixupIncDec to create INC/DEC and still allow Atom to turn it back into LEA
when profitable by its heuristics.
I'd like to improve fixupIncDec to turn LEAs into ADD any time the base or index
register is equal to the destination register. This is profitable regardless of
the various slow flags. But again we would want Atom to be able to undo that.
Differential Revision: https://reviews.llvm.org/D60993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359581
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 17:46:00 +0000 (17:46 +0000)]
Re-reland "[Option] Fix PR37006 prefix choice in findNearest"
This was first reviewed in https://reviews.llvm.org/D46776 and
landed in r332299, but got reverted because it broke the PS4
bots.
https://reviews.llvm.org/D50410 fixed this, and then this
change was re-reviewed at https://reviews.llvm.org/D50515 and
relanded in r341329. It got reverted due to causing MSan issues.
However, nobody wrote down the error message and the bot link
is dead, so I'm relanding this to capture the MSan error.
I'll then either fix it, or copy it somewhere and revert if
fixing looks difficult.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359580
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 15:36:02 +0000 (15:36 +0000)]
gn build: Add check-clangd target after r3359424
r359527 already merged some of that to the GN build,
but it was missing some bits as well.
The check-clangd target works (at least for now) differently than all
the other check-foo targets, see https://reviews.llvm.org/D61187
For that reason, there's no gni file and the generated lit configs are
not (yet?) added to llvm-lit/BUILD.gn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359570
91177308-0d34-0410-b5e6-
96231b3b80d8
Russell Gallop [Tue, 30 Apr 2019 15:35:16 +0000 (15:35 +0000)]
Add llvm-profdata to LLVM_TOOLCHAIN_TOOLS
This is required for using PGO on Windows but isn't in the Windows
release packages. Windows packages are built with
LLVM_INSTALL_TOOLCHAIN_ONLY so only includes llvm "tools" listed here.
Differential Revision: https://reviews.llvm.org/D61317
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359569
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Tue, 30 Apr 2019 15:21:36 +0000 (15:21 +0000)]
[llvm-objcopy] Add RISC-V support for -B/-O
Reviewers: jorgbrown, espindola, alexshap, jhenderson
Subscribers: emaste, arichardson, fedor.sergeev, jakehehrlich, kito-cheng, shiva0217, MaskRay, rogfer01, rkruppe, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61272
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359568
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Apr 2019 14:37:15 +0000 (14:37 +0000)]
[SelectionDAG] remove div-by-zero constant folding restriction
We don't have this restriction in IR, so it should not be here
either simply out of consistency. Code that wants to handle FP
exceptions is expected to use the 'strict' variants of these
nodes.
We don't get the frem case because frem by 0.0 produces NaN (invalid),
and that's the remaining check here (so the removed check for frem
was dead code AFAIK).
This is the only place in SDAG that uses "HasFPExceptions", so I
think we should remove that entirely as a follow-up patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359566
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Tue, 30 Apr 2019 13:51:48 +0000 (13:51 +0000)]
[llvm-nm] Add --special-syms no-op flag
Differential revision: https://reviews.llvm.org/D60502
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359563
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Apr 2019 13:45:16 +0000 (13:45 +0000)]
gn build: Merge r359455
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359562
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Apr 2019 13:43:17 +0000 (13:43 +0000)]
[AArch64] add tests for fdiv/frem constant folding (PR41668); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359561
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 13:09:55 +0000 (13:09 +0000)]
[TableGen] Fix null pointer dereferencing in token parser.
Reported in https://www.viva64.com/en/b/0629/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359559
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Apr 2019 12:41:33 +0000 (12:41 +0000)]
vs integration: vs2019 support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359557
91177308-0d34-0410-b5e6-
96231b3b80d8
Russell Gallop [Tue, 30 Apr 2019 12:37:10 +0000 (12:37 +0000)]
[cmake] Fix error message on simulated VS version check
For clang-cl self hosts in VS2015 environment this was reporting: "Host
Clang must have at least -fms-compatibility-version=19.00.24213.1, your
version is 9.0.0".
This check fires as CMake detects the simulated environment as _MSC_VER
1900, which is truncated. This makes it less than the required
19.00.24213.1.
Differential revision: https://reviews.llvm.org/D61188
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359556
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 12:34:21 +0000 (12:34 +0000)]
Revert rL359519 : [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.
Summary:
MemorySSA keeps internal pointers of AA and DT.
If these get invalidated, so should MemorySSA.
Reviewers: george.burgess.iv, chandlerc
Subscribers: jlebar, Prazek, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61043
........
This was causing windows build bot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359555
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 11:03:09 +0000 (11:03 +0000)]
[SLP] Lit test that cannot get vectorized due to lack of look-ahead operand reordering heuristic.
The code in this test is not vectorized by SLP because its operand reordering cannot look beyond the immediate predecessors.
This will get fixed in a follow-up patch that introduces the look-ahead operand reordering heuristic.
Committed on behalf of @vporpo (Vasileios Porpodas)
Differential Revision: https://reviews.llvm.org/D61283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359553
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 30 Apr 2019 11:02:09 +0000 (11:02 +0000)]
[llvm-objcopy] - Check dynamic relocation sections for broken references.
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41371.
Currently, it is possible to break the sh_link field of the dynamic relocation section
by removing the section it refers to. The patch fixes an issue and adds 2 test cases.
One of them shows that it does not seem possible to break the sh_info field.
I added an assert to verify this.
Differential revision: https://reviews.llvm.org/D60825
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359552
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeremy Morse [Tue, 30 Apr 2019 10:56:33 +0000 (10:56 +0000)]
Update checks in an instcombine test, NFC
This reduces the delta in some incoming work that changes this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359549
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 30 Apr 2019 10:28:50 +0000 (10:28 +0000)]
[ARM] Implement TTI::getMemcpyCost
This implements TargetTransformInfo method getMemcpyCost, which estimates the
number of instructions to which a memcpy instruction expands to.
Differential Revision: https://reviews.llvm.org/D59787
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359547
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 30 Apr 2019 10:18:25 +0000 (10:18 +0000)]
Fix for bug 41512: lower INSERT_VECTOR_ELT(ZeroVec, 0, Elt) to SCALAR_TO_VECTOR(Elt) for all SSE flavors
Current LLVM uses pxor+pinsrb on SSE4+ for INSERT_VECTOR_ELT(ZeroVec, 0, Elt) insead of much simpler movd.
INSERT_VECTOR_ELT(ZeroVec, 0, Elt) is idiomatic construct which is used e.g. for _mm_cvtsi32_si128(Elt) and for lowest element initialization in _mm_set_epi32.
So such inefficient lowering leads to significant performance digradations in ceratin cases switching from SSSE3 to SSE4.
https://bugs.llvm.org/show_bug.cgi?id=41512
Here INSERT_VECTOR_ELT(ZeroVec, 0, Elt) is simply converted to SCALAR_TO_VECTOR(Elt) when applicable since latter is closer match to desired behavior and always efficiently lowered to movd and alike.
Committed on behalf of @Serge_Preis (Serge Preis)
Differential Revision: https://reviews.llvm.org/D60852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359545
91177308-0d34-0410-b5e6-
96231b3b80d8
David Bolvansky [Tue, 30 Apr 2019 10:09:28 +0000 (10:09 +0000)]
Revert r359520
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359544
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 30 Apr 2019 10:09:15 +0000 (10:09 +0000)]
[TargetLowering] findOptimalMemOpLowering. NFCI.
This was a local static funtion in SelectionDAG, which I've promoted to
TargetLowering so that I can reuse it to estimate the cost of a memory
operation in D59787.
Differential Revision: https://reviews.llvm.org/D59766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359543
91177308-0d34-0410-b5e6-
96231b3b80d8