139605 Commits

Author SHA1 Message Date
Peter Collingbourne
d735fd7ffe Revert r283690, "MC: Remove unused entities."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283814 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 22:49:37 +00:00
Sanjay Patel
8e372b2022 [x86] auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283812 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 22:04:12 +00:00
Sanjay Patel
1a78cfa49c [x86] auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 22:01:42 +00:00
Tim Northover
b725b3cddf GlobalISel: select G_GLOBAL_VALUE uses on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:50:00 +00:00
Tim Northover
138850bfa1 GlobalISel: allow G_GLOBAL_VALUEs in AArch64 legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:49:53 +00:00
Tim Northover
f3542eee12 GlobalISel: support selecting G_GEP instructions.
They're basically just an alias for G_ADD on AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283807 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:49:49 +00:00
Tim Northover
4344a2817f GlobalISel: support selecting constants on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:49:42 +00:00
Dehao Chen
d9a6f657d8 Rename isHotFunction/isColdFunction to isFunctionEntryHot/isFunctionEntryCold. (NFC)
This is in preparation for https://reviews.llvm.org/D25048


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283805 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:47:28 +00:00
Zachary Turner
b260e3ad99 Revert "Disallow ArrayRef assignment from temporaries."
This reverts commit r283798, as it causes static asserts on
MSVC 2015 with the following errors:

ArrayRefTest.cpp(38): error C2338: Assigning from single prvalue element
ArrayRefTest.cpp(41): error C2338: Assigning from single xvalue element
ArrayRefTest.cpp(47): error C2338: Assigning from an initializer list

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283803 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:36:23 +00:00
Zachary Turner
1793ab4506 Rename llvm::apply -> llvm::apply_tuple.
llvm::cl already has a function called llvm::apply() so this is
causing an ODR violation.  The STLExtras version should win the
vote on which one gets to be called apply() since it is named
after the equivalent STL function, but since renaiming the cl
version is more difficult, let's do this for now to get the
bots green.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283800 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 21:24:34 +00:00
Jordan Rose
31b90a7187 Disallow ArrayRef assignment from temporaries.
Without this, the following statements will create ArrayRefs that
refer to temporary storage that goes out of scope by the end of the
line:

  someArrayRef = getSingleElement();
  someArrayRef = {elem1, elem2};

Note that the constructor still has this problem:

  ArrayRef<Element> someArrayRef = getSingleElement();
  ArrayRef<Element> someArrayRef = {elem1, elem2};

but that's a little harder to get rid of because we want to be able to
use this in calls:

  takesArrayRef(getSingleElement());
  takesArrayRef({elem1, elem2});

Part of rdar://problem/16375365. Reviewed by Duncan Exon Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283798 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 20:57:33 +00:00
Hal Finkel
779825d20e [SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal
Add integer expansion for FLT_ROUNDS_ for targets where i32 is not a legal
type.

Patch by Edward Jones, thanks!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283797 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 20:45:15 +00:00
Justin Lebar
5556ebb365 [ADT] Use () instead of {} in an attempt to work around MSVC 2012 ICEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283796 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 20:18:02 +00:00
Justin Lebar
58ae36f407 [ADT] Don't use make_pointee_iterator in IteratorTest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283794 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 19:56:52 +00:00
Mehdi Amini
15796d29d8 Use StringRef in TableGen generated Intrinsics.gen file (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 19:31:09 +00:00
Justin Lebar
ec2f01d444 [ADT] Remove make_pointe{e,r}_iterator, because it seems to crash MSVC 2015.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 19:29:37 +00:00
Adrian Prantl
4970f010ca Teach llvm::StripDebugInfo() about global variable !dbg attachments.
This is a regression introduced by the global variable ownership
reversal performed in r281284.

rdar://problem/28448075

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 17:53:33 +00:00
Justin Lebar
f52f4a488f [ADT] Attempt to fix MSVC 2015 ICE via judicious addition of std::decay to make_pointe{r,e}_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283783 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 17:18:45 +00:00
Mehdi Amini
c02fe89250 Update documentation after r283671 ("Turn cl::values() (for enum) from a vararg function to using C++ variadic template")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 17:13:14 +00:00
Zachary Turner
bd90bcccca Add llvm::apply to STLExtras.
This is equivalent to the C++14 std::apply().  Since we are not
using C++14 yet, this allows us to still make use of apply anyway.

Differential revision: https://reviews.llvm.org/D25100

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 16:44:09 +00:00
Justin Lebar
a2e3c5a457 Use unique_ptr in LLVMContextImpl's constant maps.
Reviewers: timshen

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 16:26:13 +00:00
Justin Lebar
a5afae3a31 [ADT] Add make_pointe{e,r}_iterator.
Reviewers: timshen

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 16:26:03 +00:00
Justin Lebar
f086ef8c8b [ADT] Let MapVector handle non-copyable values.
Summary: The keys must still be copyable, because we store two copies of them.

Reviewers: timshen

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 16:25:59 +00:00
Alexandros Lamprineas
e587b6cff8 [ARM] Fix invalid VLDM/VSTM access when targeting Big Endian with NEON
The instructions VLDM/VSTM can only access word-aligned memory
locations and produce alignment fault if the condition is not met.

The compiler currently generates VLDM/VSTM for v2f64 load/store
regardless the alignment of the memory access. Instead, if a v2f64
load/store is not word-aligned, the compiler should generate
VLD1/VST1. For each non double-word-aligned VLD1/VST1, a VREV
instruction should be generated when targeting Big Endian.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283763 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 16:01:54 +00:00
Nirav Dave
86a17fdcc1 Add return type for checkForValidSection parsing function. NFC Intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283761 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 15:24:54 +00:00
Zvi Rackover
bca70faf12 [X86] Prefer rotate by 1 over rotate by imm
Summary:
Rotate by 1 is translated to 1 micro-op, while rotate with imm8 is translated to 2 micro-ops.

Fixes pr30644.

Reviewers: delena, igorb, craig.topper, spatel, RKSimon

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 14:43:55 +00:00
Simon Pilgrim
5ba17d7d92 [SLPVectorizer][X86] Add 512-bit sitofp/uitofp tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283756 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 14:28:06 +00:00
Simon Pilgrim
be507f5389 [SLPVectorizer][X86] Add avx512 sitofp/uitofp tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283751 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 14:14:31 +00:00
Simon Pilgrim
155a6ef6c7 [SLPVectorizer][X86] Fixed alignments of scalar loads in sitofp/uitofp tests
Fixed copy+paste vector alignment to correct for per-element scalar loads

Increased to 512-bit data sizes in preparation of avx512 tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283748 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 14:10:41 +00:00
Simon Pilgrim
5d0ca9b5b0 Fixed windows stdout/stderr redirection in inline asm constraint tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 11:11:27 +00:00
George Rimar
a281f4e2f6 [Object/ELF] - Do not crash on invalid Header->e_shoff value.
sections_begin() may return unalignment pointer when Header->e_shoff isinvalid.
That may result in a crash in clients, for example we have one in LLD:

assert((PtrWord & ~PointerBitMask) == 0 &&
       "Pointer is not sufficiently aligned");
fails when trying to push_back Elf_Shdr* (unaligned) into TinyPtrVector.

Patch forces check for alignment of Header->e_shoff.

Differential revision: https://reviews.llvm.org/D25368

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 10:51:38 +00:00
Chris Dewhurst
2bf22e30a5 This pass, fixing an erratum in some LEON 2 processors ensures that the SDIV instruction is not issued, but replaced by SDIVcc instead, which does not exhibit the error. Unit test included.
Differential Review: https://reviews.llvm.org/D24660

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 08:53:06 +00:00
Daniel Jasper
a56b5b5487 Fix WebAssembly build after r283702.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 06:49:55 +00:00
Craig Topper
a9268c4935 [AVX-512] Add missing pattern sext or zext from bytes to quad words with a 128-bit load as input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283720 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 06:25:48 +00:00
Craig Topper
21c40c6e83 [AVX-512] Add test cases for AVX512 sign/zero extend instructions derived from the sse41 and avx2 test cases. Code will be improved in future commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 06:25:45 +00:00
Craig Topper
115e76c7e7 [AVX-512] Add an AVX512VL/BW command line to sse41-pmovxrm.ll and avx2-pmovxrm.ll. Also disable peephole so we really test pattern matching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283718 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 06:25:42 +00:00
Michael Zuckerman
a6c37a901a [x86][inline-asm][llvm] accept 'v' constraint
Commit in the name of:Coby Tayree
1.'v' constraint for (x86) non-avx arch imitates the already implemented 'x' constraint, i.e. allows XMM{0-15} & YMM{0-15} depending on the apparent arch & mode (32/64).
2.for the avx512 arch it allows [X,Y,Z]MM{0-31} (mode dependent)

This patch applies the needed changes to clang
 clang patch: https://reviews.llvm.org/D25004

Differential Revision: D25005
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283717 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 05:48:56 +00:00
Dylan McKay
82ef6d6733 [AVR] Enable generation of the TableGen assembly writer tables
This also changes the order of the statements in CMakeLists.txt to be
alphabetical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:28:45 +00:00
Brian Gesiak
56f40f8937 [lit] Remove (or allow specific) unused imports
Summary:
Using Python linter flake8 on the utils/lit reveals several linter
warnings designated "F401: Unused import". Fix or silence these
warnings.

Some of these unused imports are legitimate, while some are part of lit's API.
For example, users of lit expect to be able to access `lit.formats.ShTest` in
their `lit.cfg`, despite the module hierarchy for that symbol actually being
`lit.formats.shtest.ShTest`. To silence linter errors for these lines,
include a "noqa" directive.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:22:06 +00:00
Brian Gesiak
996fc5bb65 [lit] Remove unused TestingProgressDisplay attr
Summary:
`TestingProgressDisplay` initializes its `current` attribute to `None`, but
never reads or writes the value again. Remove it.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:20:43 +00:00
Brian Gesiak
cb351a4ca1 [lit] Fix undefined symbol ArgumentError
Summary:
`ArgumentError` is not defined by the Python standard library.
Executing this line of code would throw a exception, but not the
intended one. It would throw a `NameError` exception, since `ArgumentError`
is undefined.

Use `ValueError` instead, which is defined by the Python standard
library.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:19:27 +00:00
Brian Gesiak
4bf8ed1328 [lit] Remove semicolons in Python code
Summary:
Semicolons aren't necessary as statement terminators in Python, and
each of these uses are superfluous as they appear at the end of a line.
The convention is to not use semicolons where not needed, so remove them.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283707 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:18:14 +00:00
Brian Gesiak
ef541878bd [lit] Remove unused variable in googletest format
Summary: `prefix` is written to but never read.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:15:33 +00:00
Brian Gesiak
f475fa9394 [lit] Remove Python 2.6 and below exec workaround
Summary:
The minimum version of Python required to run LLVM's test suite is 2.7.
Remove a workaround for older Python versions.

Reviewers: echristo, delcypher, beanz, ddunbar

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-10 01:11:52 +00:00
Craig Topper
7cdcbfeac7 [AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE file. Also add a minimal set for 512-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283704 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 23:08:39 +00:00
Craig Topper
59e8dbd568 [X86] Remove redundant patterns. The same pattern appears a few lines up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 23:08:33 +00:00
Mehdi Amini
ae5f5d3d3c Move the global variables representing each Target behind accessor function
This avoids "static initialization order fiasco"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 23:00:34 +00:00
Eric Fiselier
dfd800898f [CMake] Correct configuration order of the sub-projects based on ther dependancies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 20:38:29 +00:00
Davide Italiano
373988f36a [llvm-link] Fix description of -disable-lazy-loading option
Patch by Will Dietz!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 17:15:04 +00:00
Zvi Rackover
3dbf19e936 [X86] Adding the 'nounwind' attribute to test functions for cleaner generated code
Thanks to RKSimon for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283696 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 13:33:51 +00:00