OSDN Git Service

android-x86/external-llvm.git
7 years ago[ARM] Fix invalid VLDM/VSTM access when targeting Big Endian with NEON
Alexandros Lamprineas [Mon, 10 Oct 2016 16:01:54 +0000 (16:01 +0000)]
[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

7 years agoAdd return type for checkForValidSection parsing function. NFC Intended.
Nirav Dave [Mon, 10 Oct 2016 15:24:54 +0000 (15:24 +0000)]
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

7 years ago[X86] Prefer rotate by 1 over rotate by imm
Zvi Rackover [Mon, 10 Oct 2016 14:43:55 +0000 (14:43 +0000)]
[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

7 years ago[SLPVectorizer][X86] Add 512-bit sitofp/uitofp tests
Simon Pilgrim [Mon, 10 Oct 2016 14:28:06 +0000 (14:28 +0000)]
[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

7 years ago[SLPVectorizer][X86] Add avx512 sitofp/uitofp tests
Simon Pilgrim [Mon, 10 Oct 2016 14:14:31 +0000 (14:14 +0000)]
[SLPVectorizer][X86] Add avx512 sitofp/uitofp tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283751 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SLPVectorizer][X86] Fixed alignments of scalar loads in sitofp/uitofp tests
Simon Pilgrim [Mon, 10 Oct 2016 14:10:41 +0000 (14:10 +0000)]
[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

7 years agoFixed windows stdout/stderr redirection in inline asm constraint tests
Simon Pilgrim [Mon, 10 Oct 2016 11:11:27 +0000 (11:11 +0000)]
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

7 years ago[Object/ELF] - Do not crash on invalid Header->e_shoff value.
George Rimar [Mon, 10 Oct 2016 10:51:38 +0000 (10:51 +0000)]
[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

7 years agoThis pass, fixing an erratum in some LEON 2 processors ensures that the SDIV instruct...
Chris Dewhurst [Mon, 10 Oct 2016 08:53:06 +0000 (08:53 +0000)]
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

7 years agoFix WebAssembly build after r283702.
Daniel Jasper [Mon, 10 Oct 2016 06:49:55 +0000 (06:49 +0000)]
Fix WebAssembly build after r283702.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283723 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add missing pattern sext or zext from bytes to quad words with a 128-bit...
Craig Topper [Mon, 10 Oct 2016 06:25:48 +0000 (06:25 +0000)]
[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

7 years ago[AVX-512] Add test cases for AVX512 sign/zero extend instructions derived from the...
Craig Topper [Mon, 10 Oct 2016 06:25:45 +0000 (06:25 +0000)]
[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

7 years ago[AVX-512] Add an AVX512VL/BW command line to sse41-pmovxrm.ll and avx2-pmovxrm.ll...
Craig Topper [Mon, 10 Oct 2016 06:25:42 +0000 (06:25 +0000)]
[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

7 years ago[x86][inline-asm][llvm] accept 'v' constraint
Michael Zuckerman [Mon, 10 Oct 2016 05:48:56 +0000 (05:48 +0000)]
[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

7 years ago[AVR] Enable generation of the TableGen assembly writer tables
Dylan McKay [Mon, 10 Oct 2016 01:28:45 +0000 (01:28 +0000)]
[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

7 years ago[lit] Remove (or allow specific) unused imports
Brian Gesiak [Mon, 10 Oct 2016 01:22:06 +0000 (01:22 +0000)]
[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

7 years ago[lit] Remove unused TestingProgressDisplay attr
Brian Gesiak [Mon, 10 Oct 2016 01:20:43 +0000 (01:20 +0000)]
[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

7 years ago[lit] Fix undefined symbol ArgumentError
Brian Gesiak [Mon, 10 Oct 2016 01:19:27 +0000 (01:19 +0000)]
[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

7 years ago[lit] Remove semicolons in Python code
Brian Gesiak [Mon, 10 Oct 2016 01:18:14 +0000 (01:18 +0000)]
[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

7 years ago[lit] Remove unused variable in googletest format
Brian Gesiak [Mon, 10 Oct 2016 01:15:33 +0000 (01:15 +0000)]
[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

7 years ago[lit] Remove Python 2.6 and below exec workaround
Brian Gesiak [Mon, 10 Oct 2016 01:11:52 +0000 (01:11 +0000)]
[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

7 years ago[AVX-512] Port 128 and 256-bit memory->register sign/zero extend patterns from SSE...
Craig Topper [Sun, 9 Oct 2016 23:08:39 +0000 (23:08 +0000)]
[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

7 years ago[X86] Remove redundant patterns. The same pattern appears a few lines up.
Craig Topper [Sun, 9 Oct 2016 23:08:33 +0000 (23:08 +0000)]
[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

7 years agoMove the global variables representing each Target behind accessor function
Mehdi Amini [Sun, 9 Oct 2016 23:00:34 +0000 (23:00 +0000)]
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

7 years ago[CMake] Correct configuration order of the sub-projects based on ther dependancies
Eric Fiselier [Sun, 9 Oct 2016 20:38:29 +0000 (20:38 +0000)]
[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

7 years ago[llvm-link] Fix description of -disable-lazy-loading option
Davide Italiano [Sun, 9 Oct 2016 17:15:04 +0000 (17:15 +0000)]
[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

7 years ago[X86] Adding the 'nounwind' attribute to test functions for cleaner generated code
Zvi Rackover [Sun, 9 Oct 2016 13:33:51 +0000 (13:33 +0000)]
[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

7 years ago[X86] Improve the rotate ISel test
Zvi Rackover [Sun, 9 Oct 2016 13:07:25 +0000 (13:07 +0000)]
[X86] Improve the rotate ISel test

Summary:
- Added 64-bit target testing.
- Added 64-bit operand test cases.
- Added cases that demonstrate pr30644

Reviewers: RKSimon, craig.topper, igorb

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283695 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoDAG: Setting Masked-Expand-Load as a variant of Masked-Load node
Elena Demikhovsky [Sun, 9 Oct 2016 10:48:52 +0000 (10:48 +0000)]
DAG: Setting Masked-Expand-Load as a variant of Masked-Load node

Masked-expand-load node represents load operation that loads a variable amount of elements from memory according to amount of "true" bits in the mask and expands the loaded elements according to their position in the mask vector.
Right now, the node is used in intrinsics for VEXPAND* instructions.
The work is done towards implementation of masked.expandload and masked.compressstore intrinsics.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283694 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Fix execution domain for EVEX encoded VINSERTPS.
Craig Topper [Sun, 9 Oct 2016 06:41:47 +0000 (06:41 +0000)]
[AVX-512] Fix execution domain for EVEX encoded VINSERTPS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283692 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMC: Remove unused entities.
Peter Collingbourne [Sun, 9 Oct 2016 04:39:13 +0000 (04:39 +0000)]
MC: Remove unused entities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283691 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTarget: Remove unused entities.
Peter Collingbourne [Sun, 9 Oct 2016 04:38:57 +0000 (04:38 +0000)]
Target: Remove unused entities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283690 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add subvector insert and extract to load/store folding tables.
Craig Topper [Sun, 9 Oct 2016 03:54:13 +0000 (03:54 +0000)]
[AVX-512] Add subvector insert and extract to load/store folding tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283689 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add avx512dq to the fp stack folding test.
Craig Topper [Sun, 9 Oct 2016 03:54:09 +0000 (03:54 +0000)]
[AVX-512] Add avx512dq to the fp stack folding test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283688 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add the vector down convert instructions to the store folding tables.
Craig Topper [Sun, 9 Oct 2016 03:54:05 +0000 (03:54 +0000)]
[AVX-512] Add the vector down convert instructions to the store folding tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283687 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] make a test less flaky
Kostya Serebryany [Sun, 9 Oct 2016 03:45:38 +0000 (03:45 +0000)]
[libFuzzer] make a test less flaky

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283686 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] when shrinking the corpus, delete evicted files previously created by...
Kostya Serebryany [Sat, 8 Oct 2016 23:24:45 +0000 (23:24 +0000)]
[libFuzzer] when shrinking the corpus, delete evicted files previously created by the current process

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283682 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThinLTO: Fix Gold test after caching fix in r283655
Mehdi Amini [Sat, 8 Oct 2016 22:49:28 +0000 (22:49 +0000)]
ThinLTO: Fix Gold test after caching fix in r283655

(I don't have Gold available, so this is speculative)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283681 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] control the reload interval by a flag, make it 10 seconds by default
Kostya Serebryany [Sat, 8 Oct 2016 22:12:14 +0000 (22:12 +0000)]
[libFuzzer] control the reload interval by a flag, make it 10 seconds by default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283676 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix use-after-free in libFuzzer found by ... fuzzing.
Kostya Serebryany [Sat, 8 Oct 2016 21:57:48 +0000 (21:57 +0000)]
[libFuzzer] fix use-after-free in libFuzzer found by ... fuzzing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283675 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Regenerate select tests
Simon Pilgrim [Sat, 8 Oct 2016 21:17:44 +0000 (21:17 +0000)]
[X86][SSE] Regenerate select tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283674 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[X86] Apply the Update LLC Test Checks tool on the rotate tests."
Zvi Rackover [Sat, 8 Oct 2016 20:54:20 +0000 (20:54 +0000)]
Revert "[X86] Apply the Update LLC Test Checks tool on the rotate tests."

This reverts commit 283667.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283673 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Regenerate and add 32-bit tests to widening tests
Simon Pilgrim [Sat, 8 Oct 2016 19:54:28 +0000 (19:54 +0000)]
[X86][SSE] Regenerate and add 32-bit tests to widening tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283672 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTurn cl::values() (for enum) from a vararg function to using C++ variadic template
Mehdi Amini [Sat, 8 Oct 2016 19:41:06 +0000 (19:41 +0000)]
Turn cl::values() (for enum) from a vararg function to using C++ variadic template

The core of the change is supposed to be NFC, however it also fixes
what I believe was an undefined behavior when calling:

 va_start(ValueArgs, Desc);

with Desc being a StringRef.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283671 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix comment typos - full update script path in assertions note
Simon Pilgrim [Sat, 8 Oct 2016 18:51:55 +0000 (18:51 +0000)]
Fix comment typos - full update script path in assertions note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283670 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Add test case for PR30430 that I should have added in r281959.
Craig Topper [Sat, 8 Oct 2016 18:50:00 +0000 (18:50 +0000)]
[AVX-512] Add test case for PR30430 that I should have added in r281959.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283669 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVX-512] Fix a bug in getLargestLegalSuperClass where we inflated to VR128X/VR256X...
Craig Topper [Sat, 8 Oct 2016 18:49:57 +0000 (18:49 +0000)]
[AVX-512] Fix a bug in getLargestLegalSuperClass where we inflated to VR128X/VR256X even when VLX isn't supported.

This seems to have been responsible for the XMM16-31 spills observed in PR29112. With this fixed the test case has been modified to no longer have a spill of XMM16.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283668 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Apply the Update LLC Test Checks tool on the rotate tests.
Zvi Rackover [Sat, 8 Oct 2016 18:44:47 +0000 (18:44 +0000)]
[X86] Apply the Update LLC Test Checks tool on the rotate tests.

Also added cases demonstrating pr30644.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283667 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX2] Regenerate and add 32-bit tests to core tests
Simon Pilgrim [Sat, 8 Oct 2016 18:36:57 +0000 (18:36 +0000)]
[X86][AVX2] Regenerate and add 32-bit tests to core tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283666 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Adding change of flow max 1 (cofMax1) TS flag for marking this restriction...
Colin LeMahieu [Sat, 8 Oct 2016 17:18:51 +0000 (17:18 +0000)]
[Hexagon] Adding change of flow max 1 (cofMax1) TS flag for marking this restriction rather than implying it from TypeJR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283665 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ThinLTO] Record calls to aliases
Teresa Johnson [Sat, 8 Oct 2016 16:11:42 +0000 (16:11 +0000)]
[ThinLTO] Record calls to aliases

Summary:
When there is a call to an alias in the same module, we were not
adding a call edge. So we could incorrectly think that the alias
was dead if it was inlined in that function, despite having a
reference imported elsewhere. This resulted in unsats at link time.

Add a call edge when the call is to an alias.

Reviewers: davide, mehdi_amini

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283664 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Avoid generating indexed vector instructions for Exynos
Sebastian Pop [Sat, 8 Oct 2016 12:30:07 +0000 (12:30 +0000)]
[AArch64] Avoid generating indexed vector instructions for Exynos

Avoid generating indexed vector instructions for Exynos. This is needed for
fmla/fmls/fmul/fmulx. For example, the instruction

  fmla v0.4s, v1.4s, v2.s[1]

is less efficient than the instructions

  dup v2.4s, v2.s[1]
  fmla v0.4s, v1.4s, v2.4s

Patch written by Abderrazek Zaafrani.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283663 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[OptRemarks] Remove non-printable chars from function name
Adam Nemet [Sat, 8 Oct 2016 04:47:20 +0000 (04:47 +0000)]
[OptRemarks] Remove non-printable chars from function name

Value names may be prefixed with a binary '1' to indicate that the
backend should not modify the symbols due to any platform naming
convention.

This should not show up in the YAML opt record file because it breaks
the YAML parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283656 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThinLTO: don't perform incremental LTO on module without a hash
Mehdi Amini [Sat, 8 Oct 2016 04:44:23 +0000 (04:44 +0000)]
ThinLTO: don't perform incremental LTO on module without a hash

Clang always emit a hash for ThinLTO, but as other frontend are
starting to use ThinLTO, this could be a serious bug.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283655 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThinLTO: handles modules with empty summaries
Mehdi Amini [Sat, 8 Oct 2016 04:44:18 +0000 (04:44 +0000)]
ThinLTO: handles modules with empty summaries

We need to add an entry in the combined-index for modules that have
a hash but otherwise empty summary, this is needed so that we can
get the hash for the module.

Also, if no entry is present in the combined index for a module, we
need to skip it when trying to compute a cache entry.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283654 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRequires the AVR backend for running test/CodeGen/AVR
Mehdi Amini [Sat, 8 Oct 2016 04:39:34 +0000 (04:39 +0000)]
Requires the AVR backend for running test/CodeGen/AVR

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283653 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "Codegen: Tail-duplicate during placement."
Kyle Butt [Sat, 8 Oct 2016 01:47:05 +0000 (01:47 +0000)]
Revert "Codegen: Tail-duplicate during placement."

This reverts commit 71c312652c10f1855b28d06697c08d47e7a243e4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283647 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add backend dependencies to MCTargetDesc/LLVMBuild.txt
Dylan McKay [Sat, 8 Oct 2016 01:14:23 +0000 (01:14 +0000)]
[AVR] Add backend dependencies to MCTargetDesc/LLVMBuild.txt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283642 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[pdb] Dump Module Symbols to Yaml.
Zachary Turner [Sat, 8 Oct 2016 01:12:01 +0000 (01:12 +0000)]
[pdb] Dump Module Symbols to Yaml.

This is the first step towards round-tripping symbol information,
and thusly being able to write symbol information to a PDB.

This patch writes the symbol information for each compiland to
the Yaml when running in pdb2yaml mode.  There's still some loose
ends, such as what to do about relocations (necessary in order to
print linkage names), how to print enums with friendly names, and
how to give the dumper access to the StringTable, but this is a
good first start.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283641 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix incorrect assertion in AVRFrameLowering.cpp
Dylan McKay [Sat, 8 Oct 2016 01:10:36 +0000 (01:10 +0000)]
Fix incorrect assertion in AVRFrameLowering.cpp

This wasn't looking at the right instruction, and would always fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283640 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Don't worry about call frame size when initializing frame pointer
Dylan McKay [Sat, 8 Oct 2016 01:10:31 +0000 (01:10 +0000)]
[AVR] Don't worry about call frame size when initializing frame pointer

We previously only used the frame pointer if the frame pointer was too
big. This was to work around a bug (described in this old commit)

https://sourceforge.net/p/avr-llvm/code/204/tree//llvm/trunk/AVR/AVRFrameLowering.cpp?diff=50d64d912718465cb887d17a:203

I mistakenly invered the condition assuming it was a typo. I am now
removing it because it doesn't seem to be a problem anymore (plus it's a
dirty hack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283639 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Don't shadow container while iterating in range-based loop
Dylan McKay [Sat, 8 Oct 2016 01:09:06 +0000 (01:09 +0000)]
[AVR] Don't shadow container while iterating in range-based loop

This works on clang, but fails on GCC 4.6

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283638 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Use references rather than pointers in AVRISelLowering
Dylan McKay [Sat, 8 Oct 2016 01:06:21 +0000 (01:06 +0000)]
[AVR] Use references rather than pointers in AVRISelLowering

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283636 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAllow a maximum of 64 bits to be returned in registers
Dylan McKay [Sat, 8 Oct 2016 01:05:09 +0000 (01:05 +0000)]
Allow a maximum of 64 bits to be returned in registers

The rest spills to the stack

Authored by Jake Goulding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283635 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Expand MULHS for all types
Dylan McKay [Sat, 8 Oct 2016 01:01:49 +0000 (01:01 +0000)]
[AVR] Expand MULHS for all types

Once MULHS was expanded, this exposed an issue where the condition
register was thought to be 16-bit. This caused an attempt to copy a
16-bit register to an 8-bit register.

Authored by Jake Goulding

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283634 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the 'SoftFail' field to all instruction formats
Dylan McKay [Sat, 8 Oct 2016 00:55:46 +0000 (00:55 +0000)]
[AVR] Add the 'SoftFail' field to all instruction formats

This will be used in the future for disassembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283630 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Set up the instruction printer and the assembly backend
Dylan McKay [Sat, 8 Oct 2016 00:50:11 +0000 (00:50 +0000)]
[AVR] Set up the instruction printer and the assembly backend

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283629 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add dependencies to AVR libraries in AVRCodeGen
Dylan McKay [Sat, 8 Oct 2016 00:45:24 +0000 (00:45 +0000)]
[AVR] Add dependencies to AVR libraries in AVRCodeGen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283628 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add missing subdirectories to LLVMBuild
Dylan McKay [Sat, 8 Oct 2016 00:42:58 +0000 (00:42 +0000)]
[AVR] Add missing subdirectories to LLVMBuild

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283627 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-opt-report] Don't leave space for opts that never happen
Hal Finkel [Sat, 8 Oct 2016 00:26:54 +0000 (00:26 +0000)]
[llvm-opt-report] Don't leave space for opts that never happen

Because screen space is precious, if an optimization (vectorization, for
example) never happens, don't leave empty space for the associated markers on
every line of the output. This makes the output much more compact, and allows
for the later inclusion of markers for more (although perhaps rare)
optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283626 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[coroutines] Store an address of destroy OR cleanup part in the coroutine frame.
Gor Nishanov [Sat, 8 Oct 2016 00:22:50 +0000 (00:22 +0000)]
[coroutines] Store an address of destroy OR cleanup part in the coroutine frame.

Summary:
If heap allocation of a coroutine is elided, we need to make sure that we will update an address stored in the coroutine frame from f.destroy to f.cleanup.
Before this change, CoroSplit synthesized these stores after coro.begin:

```
    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr
    store void (%f.Frame*)* @f.destroy, void (%f.Frame*)** %destroy.addr

```

In those cases where we did heap elision, but were not able to devirtualize all indirect calls, destroy call will attempt to "free" the coroutine frame stored on the stack. Oops.

Now we use select to put an appropriate coroutine subfunction in the destroy slot. As bellow:

```
    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr
    %0 = select i1 %need.alloc, void (%f.Frame*)* @f.destroy, void (%f.Frame*)* @f.cleanup
    store void (%f.Frame*)* %0, void (%f.Frame*)** %destroy.addr
```

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283625 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[docs] Fix indentation bug in LangRef.
Lang Hames [Sat, 8 Oct 2016 00:20:42 +0000 (00:20 +0000)]
[docs] Fix indentation bug in LangRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283624 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AVR] Add the assembly printer
Dylan McKay [Sat, 8 Oct 2016 00:02:36 +0000 (00:02 +0000)]
[AVR] Add the assembly printer

Summary: This adds the AVRAsmPrinter class.

Reviewers: arsenm, kparzysz

Subscribers: llvm-commits, wdng, beanz, japaric, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283623 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU/SI: Handle div_fmas hazard in GCNHazardRecognizer
Tom Stellard [Fri, 7 Oct 2016 23:42:48 +0000 (23:42 +0000)]
AMDGPU/SI: Handle div_fmas hazard in GCNHazardRecognizer

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283622 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCodegen: Tail-duplicate during placement.
Kyle Butt [Fri, 7 Oct 2016 22:33:20 +0000 (22:33 +0000)]
Codegen: Tail-duplicate during placement.

The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.

In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.

This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.

Issue from previous rollback fixed, and a new test was added for that
case as well. Issue was worklist/scheduling/taildup issue in layout.

Issue from 2nd rollback fixed, with 2 additional tests. Issue was
tail merging/loop info/tail-duplication causing issue with loops that share
a header block.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283619 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoswifterror: Don't compute swifterror vregs during instruction selection
Arnold Schwaighofer [Fri, 7 Oct 2016 22:06:55 +0000 (22:06 +0000)]
swifterror: Don't compute swifterror vregs during instruction selection

The code used llvm basic block predecessors to decided where to insert phi
nodes. Instruction selection can and will liberally insert new machine basic
block predecessors. There is not a guaranteed one-to-one mapping from pred.
llvm basic blocks and machine basic blocks.

Therefore the current approach does not work as it assumes we can mark
predecessor machine basic block as needing a copy, and needs to know the set of
all predecessor machine basic blocks to decide when to insert phis.

Instead of computing the swifterror vregs as we select instructions, propagate
them at the end of instruction selection when the MBB CFG is complete.

When an instruction needs a swifterror vreg and we don't know the value yet,
generate a new vreg and remember this "upward exposed" use, and reconcile this
at the end of instruction selection.

This will only happen if the target supports promoting swifterror parameters to
registers and the swifterror attribute is used.

rdar://28300923

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283617 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAG] clean up foldSelectOfConstants(); NFCI
Sanjay Patel [Fri, 7 Oct 2016 21:55:42 +0000 (21:55 +0000)]
[DAG] clean up foldSelectOfConstants(); NFCI

Rename variables, simplify logic.
Not clear yet why we don't handle a target with ZeroOrNegativeOneBooleanContent too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283613 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Don't unpack arrays that are too large (part 2).
Davide Italiano [Fri, 7 Oct 2016 21:53:09 +0000 (21:53 +0000)]
[InstCombine] Don't unpack arrays that are too large (part 2).

This is similar to r283599, but for store instructions.
Thanks to David for pointing out!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283612 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd missing include.
Zachary Turner [Fri, 7 Oct 2016 21:40:06 +0000 (21:40 +0000)]
Add missing include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283610 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRefactor Symbol visitor code.
Zachary Turner [Fri, 7 Oct 2016 21:34:46 +0000 (21:34 +0000)]
Refactor Symbol visitor code.

Type visitor code had already been refactored previously to
decouple the visitor and the visitor callback interface.  This
was necessary for having the flexibility to visit in different
ways (for example, dumping to yaml, reading from yaml, dumping
to ScopedPrinter, etc).

This patch merely implements the same visitation pattern for
symbol records that has already been implemented for type records.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283609 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[cmake] Treat polly as "in tree" if LLVM_EXTERNAL_POLLY_SOURCE_DIR is provided
Hongbin Zheng [Fri, 7 Oct 2016 21:32:47 +0000 (21:32 +0000)]
[cmake] Treat polly as "in tree" if LLVM_EXTERNAL_POLLY_SOURCE_DIR is provided

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283608 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Don't unpack arrays that are too large
Davide Italiano [Fri, 7 Oct 2016 20:57:42 +0000 (20:57 +0000)]
[InstCombine] Don't unpack arrays that are too large

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283599 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAG] move fold (select C, 0, 1 -> xor C, 1) to a helper function; NFC
Sanjay Patel [Fri, 7 Oct 2016 20:47:51 +0000 (20:47 +0000)]
[DAG] move fold (select C, 0, 1 -> xor C, 1) to a helper function; NFC

We're missing at least 3 other similar folds based on what we have in InstCombine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283596 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU/SI: Add support for 8-byte relocations
Tom Stellard [Fri, 7 Oct 2016 20:36:58 +0000 (20:36 +0000)]
AMDGPU/SI: Add support for 8-byte relocations

Reviewers: arsenm, kzhuravl

Subscribers: wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283593 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RS4GC] Strengthen coverage: add more tests
Anna Thomas [Fri, 7 Oct 2016 20:34:00 +0000 (20:34 +0000)]
[RS4GC] Strengthen coverage: add more tests

Summary: Add tests for cases where we have zero coverage in RS4GC.

Reviewers: sanjoy, reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283591 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon][NFC] Using documented instruction type name V4LDST instead of MEMOP.
Colin LeMahieu [Fri, 7 Oct 2016 19:11:28 +0000 (19:11 +0000)]
[Hexagon][NFC] Using documented instruction type name V4LDST instead of MEMOP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283582 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRecommit "Use StringRef in LTOModule implementation (NFC)""
Mehdi Amini [Fri, 7 Oct 2016 19:05:14 +0000 (19:05 +0000)]
Recommit "Use StringRef in LTOModule implementation (NFC)""

This reverts commit r283456 and reapply r282997, with explicitly
zeroing the struct member to workaround a bug in MSVC2013 with
zero-initialization: https://connect.microsoft.com/VisualStudio/feedback/details/802160

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283581 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LoopIdiomRecognize] Merge two if conditions into one. NFCI.
Davide Italiano [Fri, 7 Oct 2016 18:39:43 +0000 (18:39 +0000)]
[LoopIdiomRecognize] Merge two if conditions into one. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283579 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] fold select X, (ext X), C
Sanjay Patel [Fri, 7 Oct 2016 17:53:07 +0000 (17:53 +0000)]
[InstCombine] fold select X, (ext X), C

If we're going to canonicalize IR towards select of constants, try harder to create those.
Also, don't lose the metadata.

This is actually 4 related transforms in one patch:
      // select X, (sext X), C --> select X, -1, C
      // select X, (zext X), C --> select X,  1, C
      // select X, C, (sext X) --> select X, C, 0
      // select X, C, (zext X) --> select X, C, 0

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283575 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNew utility to visualize optimization records
Adam Nemet [Fri, 7 Oct 2016 17:06:34 +0000 (17:06 +0000)]
New utility to visualize optimization records

This is a new tool built on top of the new YAML ouput generated from
optimization remarks.  It produces HTML for easy navigation and
visualization.

The tool assumes that hotness information for the remarks is available
(the YAML file was produced with PGO).  It uses hotness to list the
remarks prioritized by the hotness on the index page.  Clicking the
source location of the remark in the list takes you the source where the
remarks are rendedered inline in the source.

For now, the tool is meant as prototype.

It's written in Python.  It uses PyYAML to parse the input.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283571 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU/SI: Emit fixups for long branches
Tom Stellard [Fri, 7 Oct 2016 16:01:18 +0000 (16:01 +0000)]
AMDGPU/SI: Emit fixups for long branches

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283570 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Reapplied: Add vector fcopysign combine tests
Simon Pilgrim [Fri, 7 Oct 2016 16:00:59 +0000 (16:00 +0000)]
[X86][SSE] Reapplied: Add vector fcopysign combine tests

Now with better lowering and fix for PR30443

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283569 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU][mc] Add support for buffer_load_dwordx3, buffer_store_dwordx3.
Artem Tamazov [Fri, 7 Oct 2016 15:53:16 +0000 (15:53 +0000)]
[AMDGPU][mc] Add support for buffer_load_dwordx3, buffer_store_dwordx3.

Partially fixes Bug 28232.
Lit tests added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283567 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoInvoke add-discriminator at -g0 -fsample-profile
Dehao Chen [Fri, 7 Oct 2016 15:21:31 +0000 (15:21 +0000)]
Invoke add-discriminator at -g0 -fsample-profile

Summary: -fsample-profile needs discriminator, which will not be added if built with -g0. This patch makes sure the discriminator is added for sample-profile at -g0. A followup patch will be send out to update clang tests.

Reviewers: davidxl, dblaikie, echristo, dnovillo

Subscribers: mehdi_amini, probinson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283565 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Don't mark multi-use branch conditions uniform
Matthew Simpson [Fri, 7 Oct 2016 15:20:13 +0000 (15:20 +0000)]
[LV] Don't mark multi-use branch conditions uniform

Previously, we marked the branch conditions of latch blocks uniform after
vectorization if they were instructions contained in the loop. However, if a
condition instruction has users other than the branch, it may not remain
uniform. This patch ensures the conditions we mark uniform are only used by the
branch. This should fix PR30627.

Reference: https://llvm.org/bugs/show_bug.cgi?id=30627

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283563 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoOnly track physical registers in LivePhysRegs
Krzysztof Parzyszek [Fri, 7 Oct 2016 14:50:49 +0000 (14:50 +0000)]
Only track physical registers in LivePhysRegs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283561 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Assembler: support v_mac_f32 DPP and SDWA. Move getNamedOperandIdx to AMDGPU...
Sam Kolton [Fri, 7 Oct 2016 14:46:06 +0000 (14:46 +0000)]
[AMDGPU] Assembler: support v_mac_f32 DPP and SDWA. Move getNamedOperandIdx to AMDGPUBaseInfo.h

Reviewers: artem.tamazov, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283560 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Tidied up tests - use standard check prefixes
Simon Pilgrim [Fri, 7 Oct 2016 14:42:22 +0000 (14:42 +0000)]
[X86][SSE] Tidied up tests - use standard check prefixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283559 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] AMDGPUCodeGenPrepare: remove extra ';'
Konstantin Zhuravlyov [Fri, 7 Oct 2016 14:39:53 +0000 (14:39 +0000)]
[AMDGPU] AMDGPUCodeGenPrepare: remove extra ';'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283558 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()
Tom Stellard [Fri, 7 Oct 2016 14:23:29 +0000 (14:23 +0000)]
[ValueTracking] Fix crash in GetPointerBaseWithConstantOffset()

Summary:
While walking defs of pointer operands we were assuming that the pointer
size would remain constant.  This is not true, because addresspacecast
instructions may cast the pointer to an address space with a different
pointer width.

This partial reverts r282612, which was a more conservative solution
to this problem.

Reviewers: reames, sanjoy, apilipenko

Subscribers: wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283557 91177308-0d34-0410-b5e6-96231b3b80d8