OSDN Git Service

android-x86/external-llvm.git
7 years ago[X86][SSE] Add zero lower 32-bits test case for PR30845
Simon Pilgrim [Sun, 13 Nov 2016 15:32:11 +0000 (15:32 +0000)]
[X86][SSE] Add zero lower 32-bits test case for PR30845

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

7 years ago[X86][AVX512] Add masked VPMOZX test case for PR26762
Simon Pilgrim [Sun, 13 Nov 2016 15:16:43 +0000 (15:16 +0000)]
[X86][AVX512] Add masked VPMOZX test case for PR26762

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

7 years ago[X86][SSE] Add additional test case for PR30845
Simon Pilgrim [Sun, 13 Nov 2016 14:57:52 +0000 (14:57 +0000)]
[X86][SSE] Add additional test case for PR30845

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

7 years ago[X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.
Ayman Musa [Sun, 13 Nov 2016 14:51:25 +0000 (14:51 +0000)]
[X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.

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

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

7 years ago[X86][AVX512] Add patterns for all variants of VMOVSS/VMOVSD instructions.
Ayman Musa [Sun, 13 Nov 2016 14:29:32 +0000 (14:29 +0000)]
[X86][AVX512] Add patterns for all variants of VMOVSS/VMOVSD instructions.

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

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

7 years ago[InstCombine][AVX-512] Teach InstCombineCalls to handle the new unmasked AVX-512...
Craig Topper [Sun, 13 Nov 2016 07:26:19 +0000 (07:26 +0000)]
[InstCombine][AVX-512] Teach InstCombineCalls to handle the new unmasked AVX-512 variable shift intrinsics.

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

7 years ago[AVX-512] Add unmasked intrinsics for variable shifts of dwords and qwords.
Craig Topper [Sun, 13 Nov 2016 07:26:15 +0000 (07:26 +0000)]
[AVX-512] Add unmasked intrinsics for variable shifts of dwords and qwords.

These will be used to replace the masked intrinsics so that InstCombineCalls can optimize the AVX-512 variable shifts the same way it does for AVX2.

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

7 years ago[AMDGPU] Add f16 support (VI+)
Konstantin Zhuravlyov [Sun, 13 Nov 2016 07:01:11 +0000 (07:01 +0000)]
[AMDGPU] Add f16 support (VI+)

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

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

7 years agoBitcode: Change module reader functions to return an llvm::Expected.
Peter Collingbourne [Sun, 13 Nov 2016 07:00:17 +0000 (07:00 +0000)]
Bitcode: Change module reader functions to return an llvm::Expected.

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

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

7 years agoAnalysis: Simplify the ScalarEvolution::getGEPExpr() interface. NFCI.
Peter Collingbourne [Sun, 13 Nov 2016 06:59:50 +0000 (06:59 +0000)]
Analysis: Simplify the ScalarEvolution::getGEPExpr() interface. NFCI.

All existing callers were manually extracting information out of an existing
GEP instruction and passing it to getGEPExpr(). Simplify the interface by
changing it to take a GEPOperator instead.

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

7 years agoBitcode: More precise casting. NFCI.
Peter Collingbourne [Sun, 13 Nov 2016 06:59:28 +0000 (06:59 +0000)]
Bitcode: More precise casting. NFCI.

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

7 years agoIR: Change the Type::get{Array,Vector,Pointer}ElementType() functions to perform...
Peter Collingbourne [Sun, 13 Nov 2016 06:58:45 +0000 (06:58 +0000)]
IR: Change the Type::get{Array,Vector,Pointer}ElementType() functions to perform the correct type assertion.

Previously we were only asserting that the type was a sequential type.

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

7 years ago[AVX-512] Move masked shift intrinsics tests to the autoupgrade test file. These...
Craig Topper [Sun, 13 Nov 2016 03:42:27 +0000 (03:42 +0000)]
[AVX-512] Move masked shift intrinsics tests to the autoupgrade test file. These missed being moved in r286725.

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

7 years ago[InstCombine][AVX-512] Expand vector shift handling to work on the AVX-512 shift...
Craig Topper [Sun, 13 Nov 2016 01:51:55 +0000 (01:51 +0000)]
[InstCombine][AVX-512] Expand vector shift handling to work on the AVX-512 shift by immediate and shift by single value.

This does not include support for the AVX-512 variable shifts. That will be coming in a future patch.

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

7 years ago[x86] add smin/smax with zero tests
Sanjay Patel [Sun, 13 Nov 2016 00:32:39 +0000 (00:32 +0000)]
[x86] add smin/smax with zero tests

These are vector tests corresponding to the discussion at:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html

Apart from the lack of min/max matching, the and/andn difference
shows a lack of DAG-level canonicalization.

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

7 years ago[X86][SSE] Add test case for PR30845
Simon Pilgrim [Sat, 12 Nov 2016 23:44:58 +0000 (23:44 +0000)]
[X86][SSE] Add test case for PR30845

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

7 years ago[ORC] Remove the 'const' qualifier from the member function wrapper, make the
Lang Hames [Sat, 12 Nov 2016 23:12:41 +0000 (23:12 +0000)]
[ORC] Remove the 'const' qualifier from the member function wrapper, make the
lambda in wrapHandler mutable to allow it to pass the handler through as a
non-const value.

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

7 years agotest: explicitly use gnu format
Saleem Abdulrasool [Sat, 12 Nov 2016 19:03:08 +0000 (19:03 +0000)]
test: explicitly use gnu format

This should fix the Darwin buildbots.

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

7 years agollvm-strings: trivialise logic until we support more options
Saleem Abdulrasool [Sat, 12 Nov 2016 18:37:04 +0000 (18:37 +0000)]
llvm-strings: trivialise logic until we support more options

Until we have handling for ignoring unloaded sections, simplify the logic to
the point of triviality.  This fixes the scanning of archives, particularly when
embedded in archives.

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

7 years ago[AVX-512] Remove the remaining masked shift by immediate or by single value. Autoupgr...
Craig Topper [Sat, 12 Nov 2016 18:04:46 +0000 (18:04 +0000)]
[AVX-512] Remove the remaining masked shift by immediate or by single value. Autoupgrade them to recently introduced unmasked versions and a select.

After this I'll add the unmasked intrinsics to InstCombineCalls to finish making our handling of these types of shuffles consistent between AVX-512 and the legacy intrinsics.

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

7 years ago[Support] Add StringRef::find_lower and contains_lower.
Zachary Turner [Sat, 12 Nov 2016 17:17:12 +0000 (17:17 +0000)]
[Support] Add StringRef::find_lower and contains_lower.

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

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

7 years ago[OCaml] Clear cross-target test deps when building out-of-tree
Michal Gorny [Sat, 12 Nov 2016 14:58:30 +0000 (14:58 +0000)]
[OCaml] Clear cross-target test deps when building out-of-tree

Clear cross-target test dependencies when using LLVM_OCAML_OUT_OF_TREE,
in order to make it possible to run check-llvm-bindings-ocaml without
rebuilding the whole LLVM.

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

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

7 years agoAs we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8
Sylvestre Ledru [Sat, 12 Nov 2016 10:39:09 +0000 (10:39 +0000)]
As we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8

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

7 years ago[AVX-512] Add unmasked version of shift by immediate and shift by single element...
Craig Topper [Sat, 12 Nov 2016 05:28:24 +0000 (05:28 +0000)]
[AVX-512] Add unmasked version of shift by immediate and shift by single element in XMM.

Summary:
This is the first step towards being able to add the avx512 shift by immediate intrinsics to InstCombineCalls where we aleady support the sse2 and avx2 intrinsics. We need to the unmasked versions so we can avoid having to teach InstCombineCalls that it would need to insert selects sometimes. Instead we'll just add the selects around the new instrinsics in the frontend.

This change should also enable the shift by i32 intrinsics to take a non-constant shift value just like the avx2 and sse intrinsics. This will enable us to fix PR30691 once we update clang.

Next I'll switch clang to use the new builtins. Then we'll come back to the backend and remove/autoupgrade the old intrinsics. Then I'll work on the same series for variable shifts.

Reviewers: RKSimon, zvi, delena

Subscribers: llvm-commits

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

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

7 years agoCODE_OWNERS: Take ownership of the X86 backend.
Craig Topper [Sat, 12 Nov 2016 05:16:06 +0000 (05:16 +0000)]
CODE_OWNERS: Take ownership of the X86 backend.

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

7 years ago[AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ
Craig Topper [Sat, 12 Nov 2016 05:05:27 +0000 (05:05 +0000)]
[AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ

Summary: VALIGND and VALIGNQ are similar to PALIGNR but instead of working on a 128-bit lane they work on the entire vector register. This change leverages the shuffle rotate detection code used for PALIGNR to detect these cases.

Reviewers: delena, RKSimon

Subscribers: Farhana, llvm-commits

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

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

7 years agobuild: add a dependency on llvm-strings
Saleem Abdulrasool [Sat, 12 Nov 2016 03:45:21 +0000 (03:45 +0000)]
build: add a dependency on llvm-strings

Since we now have tests for llvm-strings, add a dependency on the tool.

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

7 years agollvm-strings: ensure that the last string is correctly printed
Saleem Abdulrasool [Sat, 12 Nov 2016 03:39:21 +0000 (03:39 +0000)]
llvm-strings: ensure that the last string is correctly printed

We would ignore the last string that appeared if the file ended with a printable
character.  Ensure that we get the last string.

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

7 years ago[OCaml] Adapt to the new attribute C API.
whitequark [Sat, 12 Nov 2016 03:38:30 +0000 (03:38 +0000)]
[OCaml] Adapt to the new attribute C API.

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

7 years ago[C API] Fix several null pointer dereferences.
whitequark [Sat, 12 Nov 2016 03:38:23 +0000 (03:38 +0000)]
[C API] Fix several null pointer dereferences.

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

7 years ago[libFuzzer] one more trophy
Kostya Serebryany [Sat, 12 Nov 2016 02:55:45 +0000 (02:55 +0000)]
[libFuzzer] one more trophy

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

7 years ago[libFuzzer] use a valid ASCII string for a dummy seed corpus
Kostya Serebryany [Sat, 12 Nov 2016 02:27:21 +0000 (02:27 +0000)]
[libFuzzer] use a valid ASCII string for a dummy seed corpus

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

7 years ago[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
Lang Hames [Sat, 12 Nov 2016 02:19:31 +0000 (02:19 +0000)]
[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
return types.

This class allows user provided handlers to return either error-wrapped types
or plain types. In the latter case, the plain type is wrapped with a success
value of Error or Expected<T> type to fit it into the rest of the serialization
machinery.

This patch allows us to remove the RPC unit-test workaround added in r286646.

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

7 years agoImprove `git llvm push` to suggest `git pull` when applying patch fails
Mehdi Amini [Sat, 12 Nov 2016 01:17:59 +0000 (01:17 +0000)]
Improve `git llvm push` to suggest `git pull` when applying patch fails

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

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

7 years agoOne more set of changes to fix formatv() on linux.
Zachary Turner [Sat, 12 Nov 2016 00:35:58 +0000 (00:35 +0000)]
One more set of changes to fix formatv() on linux.

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

7 years agoAdd missing #include.
Zachary Turner [Sat, 12 Nov 2016 00:30:37 +0000 (00:30 +0000)]
Add missing #include.

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

7 years agoFix another problem with formatv().
Zachary Turner [Sat, 12 Nov 2016 00:28:10 +0000 (00:28 +0000)]
Fix another problem with formatv().

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

7 years ago[libFuzzer] use less stack
Kostya Serebryany [Sat, 12 Nov 2016 00:24:35 +0000 (00:24 +0000)]
[libFuzzer] use less stack

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

7 years agoRemove extra semicolon.
Rui Ueyama [Sat, 12 Nov 2016 00:23:32 +0000 (00:23 +0000)]
Remove extra semicolon.

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

7 years agoAMDGPU/SI: Promote i16 = fp_[us]int f32 for VI
Tom Stellard [Sat, 12 Nov 2016 00:19:11 +0000 (00:19 +0000)]
AMDGPU/SI: Promote i16 = fp_[us]int f32 for VI

Summary: This fixes a regression caused by r286464.

Reviewers: arsenm

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

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

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

7 years agoTry to fix build after llvm::formatv() patch.
Zachary Turner [Sat, 12 Nov 2016 00:18:42 +0000 (00:18 +0000)]
Try to fix build after llvm::formatv() patch.

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

7 years agoFix -Werror build with clang-cl.
Zachary Turner [Fri, 11 Nov 2016 23:58:11 +0000 (23:58 +0000)]
Fix -Werror build with clang-cl.

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

7 years ago[Support] Introduce llvm::formatv() function.
Zachary Turner [Fri, 11 Nov 2016 23:57:40 +0000 (23:57 +0000)]
[Support] Introduce llvm::formatv() function.

This introduces a new type-safe general purpose formatting
library.  It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.

This patch additionally adds documentation for the API to the
LLVM programmer's manual.

Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html

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

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

7 years agoDefine DbiStreamBuilder::addSectionContribs.
Rui Ueyama [Fri, 11 Nov 2016 23:41:13 +0000 (23:41 +0000)]
Define DbiStreamBuilder::addSectionContribs.

This patch defines a new function to add a SectionContribs stream
to a PDB file. Unlike SectionMap, SectionContribs contains a list
of input sections as opposed to output sections.

Note that this patch needs improving because currently we do not
set Module field in SectionContribs entries. In a follow-up patch,
I'll add Modules and then fix it after that.

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

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

7 years agoAMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies
Tom Stellard [Fri, 11 Nov 2016 23:35:42 +0000 (23:35 +0000)]
AMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies

Summary:
This pass was assuming that when a PHI instruction defined a register
used by another PHI instruction that the defining insstruction would
be legalized before the using instruction.

This assumption was causing the pass to not legalize some PHI nodes
within divergent flow-control.

This fixes a bug that was uncovered by r285762.

Reviewers: nhaehnle, arsenm

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

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

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

7 years agoPrint correct directory in merge script.
Richard Trieu [Fri, 11 Nov 2016 23:26:28 +0000 (23:26 +0000)]
Print correct directory in merge script.

When providing the project directory to the merge script, print it out in the
commit instructions instead of the default project directory.

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

7 years ago[InstCombine] use dyn_cast rather isa+cast; NFC
Sanjay Patel [Fri, 11 Nov 2016 23:20:01 +0000 (23:20 +0000)]
[InstCombine] use dyn_cast rather isa+cast; NFC

Follow-up to r286664 cleanup as suggested by Eli. Thanks!

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

7 years ago[InstCombine] update test to use FileCheck; NFC
Sanjay Patel [Fri, 11 Nov 2016 23:12:46 +0000 (23:12 +0000)]
[InstCombine] update test to use FileCheck; NFC

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

7 years ago[libFuzzer] do not initialize parts of TracePC -- let them be initialized by the...
Kostya Serebryany [Fri, 11 Nov 2016 23:06:53 +0000 (23:06 +0000)]
[libFuzzer] do not initialize parts of TracePC -- let them be initialized by the linker. Add no-msan attribute to the memcmp hook.

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

7 years ago[InstCombine] clean up foldSelectOpOp(); NFC
Sanjay Patel [Fri, 11 Nov 2016 23:01:20 +0000 (23:01 +0000)]
[InstCombine] clean up foldSelectOpOp(); NFC

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

7 years ago[tsan][llvm] Implement the function attribute to disable TSan checking at run time
Anna Zaks [Fri, 11 Nov 2016 23:01:02 +0000 (23:01 +0000)]
[tsan][llvm] Implement the function attribute to disable TSan checking at run time

This implements a function annotation that disables TSan checking for the
function at run time. The benefit over attribute((no_sanitize("thread")))
is that the accesses within the callees will also be suppressed.

The motivation for this attribute is a guarantee given by the objective C
language that the calls to the reference count decrement and object
deallocation will be synchronized. To model this properly, we would need
to intercept all ref count decrement calls (which are very common in ObjC
due to use of ARC) and also every single message send. Instead, we propose
to just ignore all accesses made from within dealloc at run time. The main
downside is that this still does not introduce any synchronization, which
means we might still report false positives if the code that relies on this
synchronization is not executed from within dealloc. However, we have not seen
this in practice so far and think these cases will be very rare.

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

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

7 years ago[LV] Stop saying "use -Rpass-analysis=loop-vectorize"
Adam Nemet [Fri, 11 Nov 2016 22:51:46 +0000 (22:51 +0000)]
[LV] Stop saying "use -Rpass-analysis=loop-vectorize"

This is PR28376.

Unfortunately given the current structure of optimization diagnostics we
lack the capability to tell whether the user has
passed -Rpass-analysis=loop-vectorize since this is local to the
front-end (BackendConsumer::OptimizationRemarkHandler).

So rather than printing this even if the user has already
passed -Rpass-analysis, this patch just punts and stops recommending
this option.  I don't think that getting this right is worth the
complexity.

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

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

7 years ago[RPC] Add const qualifier to MemberFnWrapper to make buildbots happy.
Lang Hames [Fri, 11 Nov 2016 22:50:16 +0000 (22:50 +0000)]
[RPC] Add const qualifier to MemberFnWrapper to make buildbots happy.

This is a temporary fix: The right solution is to make sure addHandler can
support mutable lambdas. I'll add that in a follow-up patch.

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

7 years agoFix typo in comment.
Rui Ueyama [Fri, 11 Nov 2016 22:41:47 +0000 (22:41 +0000)]
Fix typo in comment.

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

7 years agoRevert "(origin/master, origin/HEAD) MachineScheduler/ScheduleDAG: Add support to...
Matthias Braun [Fri, 11 Nov 2016 22:39:50 +0000 (22:39 +0000)]
Revert "(origin/master, origin/HEAD) MachineScheduler/ScheduleDAG: Add support to skipping a node."

Revert accidentally committed change.

This reverts commit r286655.

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

7 years agoMachineScheduler/ScheduleDAG: Add support to skipping a node.
Matthias Braun [Fri, 11 Nov 2016 22:37:34 +0000 (22:37 +0000)]
MachineScheduler/ScheduleDAG: Add support to skipping a node.

The DAG mutators in the scheduler cannot really remove DAG nodes as
additional anlysis information such as ScheduleDAGToplogicalSort are
already computed at this point and rely on a fixed number of DAG nodes.

Alleviate the missing removal with a new flag: Setting the new skip
flag on a node ignores it during scheduling.

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

7 years agoScheduleDAGInstrs: Move VRegUses to ScheduleDAGMILive; NFCI
Matthias Braun [Fri, 11 Nov 2016 22:37:31 +0000 (22:37 +0000)]
ScheduleDAGInstrs: Move VRegUses to ScheduleDAGMILive; NFCI

Push VRegUses/collectVRegUses() down the class hierarchy towards its
only user ScheduleDAGMILive.

NFCI: The initialization of the map happens at a later point but that
should not matter.

This is in preparation to allow DAG mutators to merge nodes, which
relies on this map getting computed later.

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

7 years agoMachineScheduler: Dump EntrySU/ExitSU if possible
Matthias Braun [Fri, 11 Nov 2016 22:37:28 +0000 (22:37 +0000)]
MachineScheduler: Dump EntrySU/ExitSU if possible

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

7 years agoScheduleDAG: Identify EntrySU/ExitSU when dumping node ids
Matthias Braun [Fri, 11 Nov 2016 22:37:26 +0000 (22:37 +0000)]
ScheduleDAG: Identify EntrySU/ExitSU when dumping node ids

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

7 years agoFunctionComparator: don't rely on argument evaluation order.
Erik Eckstein [Fri, 11 Nov 2016 22:21:39 +0000 (22:21 +0000)]
FunctionComparator: don't rely on argument evaluation order.

This is a follow-up on the recent refactoring of the FunctionMerge pass.
It should fix a fail of the new FunctionComparator unittest whe compiling with MSVC.

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

7 years agoFix static initialization order fiasco in MCTests
Mehdi Amini [Fri, 11 Nov 2016 22:18:42 +0000 (22:18 +0000)]
Fix static initialization order fiasco in MCTests

Reported by Kostya on llvm-dev, uncovered by an ASAN bot

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

7 years ago[ORC] Temporarily fix the RPCUtils unit test by explicitly specifying a handler
Lang Hames [Fri, 11 Nov 2016 22:16:10 +0000 (22:16 +0000)]
[ORC] Temporarily fix the RPCUtils unit test by explicitly specifying a handler
return type.

This should be fixed permanently by having the RPCUtils header recognize the
ErrorSuccess type. I'll commit that in a follow up patch.

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

7 years agoNFC ProgrammersManual fix
Piotr Padlewski [Fri, 11 Nov 2016 22:12:15 +0000 (22:12 +0000)]
NFC ProgrammersManual fix

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

7 years agoSimplify code and address review comments (NFC)
Adrian Prantl [Fri, 11 Nov 2016 22:09:25 +0000 (22:09 +0000)]
Simplify code and address review comments (NFC)

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

7 years ago[Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
Lang Hames [Fri, 11 Nov 2016 21:55:25 +0000 (21:55 +0000)]
[Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.

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

7 years agoFix a reference-to-temporary introduced in r286607.
Adrian Prantl [Fri, 11 Nov 2016 21:48:09 +0000 (21:48 +0000)]
Fix a reference-to-temporary introduced in r286607.

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

7 years ago[ORC] Re-apply 286620 with fixes for the ErrorSuccess class.
Lang Hames [Fri, 11 Nov 2016 21:42:09 +0000 (21:42 +0000)]
[ORC] Re-apply 286620 with fixes for the ErrorSuccess class.

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

7 years ago[PowerPC] Add remaining vector permute builtins in altivec.h - LLVM portion
Nemanja Ivanovic [Fri, 11 Nov 2016 21:42:01 +0000 (21:42 +0000)]
[PowerPC] Add remaining vector permute builtins in altivec.h - LLVM portion

This patch corresponds to review:
https://reviews.llvm.org/D26480

Adds all the intrinsics used for various permute builtins that will
be added to altivec.h.

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

7 years ago[cfi] Fix weak functions handling.
Evgeniy Stepanov [Fri, 11 Nov 2016 21:39:26 +0000 (21:39 +0000)]
[cfi] Fix weak functions handling.

When a function pointer is replaced with a jumptable pointer, special
case is needed to preserve the semantics of extern_weak functions.
Since a jumptable entry can not be extern_weak, we emulate that
behaviour by replacing all references to F (the extern_weak function)
with the following expression: F != nullptr ? JumpTablePtr : nullptr.

Extra special care is needed for global initializers, since most (or
probably all) backends can not lower an initializer that includes
this kind of constant expression. Initializers like that are replaced
with a global constructor (i.e. a runtime initializer).

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

7 years agoMake the FunctionComparator of the MergeFunctions pass a stand-alone utility.
Erik Eckstein [Fri, 11 Nov 2016 21:15:13 +0000 (21:15 +0000)]
Make the FunctionComparator of the MergeFunctions pass a stand-alone utility.

This is pure refactoring. NFC.

This change moves the FunctionComparator (together with the GlobalNumberState
utility) in to a separate file so that it can be used by other passes.
For example, the SwiftMergeFunctions pass in the Swift compiler:
https://github.com/apple/swift/blob/master/lib/LLVMPasses/LLVMMergeFunctions.cpp

Details of the change:

*) The big part is just moving code out of MergeFunctions.cpp into FunctionComparator.h/cpp
*) Make FunctionComparator member functions protected (instead of private)
   so that a derived comparator class can use them.

Following refactoring helps to share code between the base FunctionComparator
class and a derived class:

*) Add a beginCompare() function
*) Move some basic function property comparisons into a separate function compareSignature()
*) Do the GEP comparison inside cmpOperations() which now has a new
   needToCmpOperands reference parameter

https://reviews.llvm.org/D25385

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

7 years agoFix -Wpessimizing-move warning.
Rui Ueyama [Fri, 11 Nov 2016 20:39:02 +0000 (20:39 +0000)]
Fix -Wpessimizing-move warning.

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

7 years agoFixed the lost FastMathFlags for FCmp operations in SLPVectorizer.
Vyacheslav Klochkov [Fri, 11 Nov 2016 19:55:29 +0000 (19:55 +0000)]
Fixed the lost FastMathFlags for FCmp operations in SLPVectorizer.
Reviewer: Michael Zolotukhin.
Differential Revision: https://reviews.llvm.org/D26543

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

7 years ago[AArch64] Update a FIXME comment to reflect current state. NFC.
Chad Rosier [Fri, 11 Nov 2016 19:52:45 +0000 (19:52 +0000)]
[AArch64] Update a FIXME comment to reflect current state. NFC.

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

7 years agoBitcode: Change getModuleSummaryIndex() to return an llvm::Expected.
Peter Collingbourne [Fri, 11 Nov 2016 19:50:39 +0000 (19:50 +0000)]
Bitcode: Change getModuleSummaryIndex() to return an llvm::Expected.

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

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

7 years agoBitcode: Clean up error handling for certain bitcode query functions.
Peter Collingbourne [Fri, 11 Nov 2016 19:50:24 +0000 (19:50 +0000)]
Bitcode: Clean up error handling for certain bitcode query functions.

The functions getBitcodeTargetTriple(), isBitcodeContainingObjCCategory(),
getBitcodeProducerString() and hasGlobalValueSummary() now return errors
via their return value rather than via the diagnostic handler.

To make this work, re-implement these functions using non-member functions
so that they can be used without the LLVMContext required by BitcodeReader.

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

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

7 years agoBitcode: Prepare to move bitcode readers to free functions.
Peter Collingbourne [Fri, 11 Nov 2016 19:50:10 +0000 (19:50 +0000)]
Bitcode: Prepare to move bitcode readers to free functions.

Make initStream() a free function, and change BitcodeReaderBase ctor to take
a BitstreamCursor.

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

7 years ago[ORC] Revert r286620 while I investigate a bot failure.
Lang Hames [Fri, 11 Nov 2016 19:46:46 +0000 (19:46 +0000)]
[ORC] Revert r286620 while I investigate a bot failure.

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

7 years ago[ORC] Refactor the ORC RPC utilities to add some new features.
Lang Hames [Fri, 11 Nov 2016 19:42:44 +0000 (19:42 +0000)]
[ORC] Refactor the ORC RPC utilities to add some new features.

(1) Add support for function key negotiation.

The previous version of the RPC required both sides to maintain the same
enumeration for functions in the API. This means that any version skew between
the client and server would result in communication failure.

With this version of the patch functions (and serializable types) are defined
with string names, and the derived function signature strings are used to
negotiate the actual function keys (which are used for efficient call
serialization). This allows clients to connect to any server that supports a
superset of the API (based on the function signatures it supports).

(2) Add a callAsync primitive.

The callAsync primitive can be used to install a return value handler that will
run as soon as the RPC function's return value is sent back from the remote.

(3) Launch policies for RPC function handlers.

The new addHandler method, which installs handlers for RPC functions, takes two
arguments: (1) the handler itself, and (2) an optional "launch policy". When the
RPC function is called, the launch policy (if present) is invoked to actually
launch the handler. This allows the handler to be spawned on a background
thread, or added to a work list. If no launch policy is used, the handler is run
on the server thread itself. This should only be used for short-running
handlers, or entirely synchronous RPC APIs.

(4) Zero cost cross type serialization.

You can now define serialization from any type to a different "wire" type. For
example, this allows you to call an RPC function that's defined to take a
std::string while passing a StringRef argument. If a serializer from StringRef
to std::string has been defined for the channel type this will be used to
serialize the argument without having to construct a std::string instance.

This allows buffer reference types to be used as arguments to RPC calls without
requiring a copy of the buffer to be made.

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

7 years ago[InstCombine] add tests to show size-increasing select transforms
Sanjay Patel [Fri, 11 Nov 2016 19:37:54 +0000 (19:37 +0000)]
[InstCombine] add tests to show size-increasing select transforms

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

7 years ago[AArch64] Add test to show narrow zero store merging is disabled with strict align...
Chad Rosier [Fri, 11 Nov 2016 19:25:48 +0000 (19:25 +0000)]
[AArch64] Add test to show narrow zero store merging is disabled with strict align. NFC.

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

7 years ago[AArch64] Fix bugs in isel lowering replaceSplatVectorStore.
Geoff Berry [Fri, 11 Nov 2016 19:25:20 +0000 (19:25 +0000)]
[AArch64] Fix bugs in isel lowering replaceSplatVectorStore.

Summary:
Fix off-by-one indexing error in loop checking that inserted value was a
splat vector.

Add code to check that INSERT_VECTOR_ELT nodes constructing the splat
vector have the expected constant index values.

Reviewers: t.p.northover, jmolloy, mcrosier

Subscribers: aemerson, llvm-commits, rengolin

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

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

7 years ago[sancov] Don't instrument MSVC CRT stdio config helpers
Reid Kleckner [Fri, 11 Nov 2016 19:18:45 +0000 (19:18 +0000)]
[sancov] Don't instrument MSVC CRT stdio config helpers

They get called before initialization, which is a problem for winasan.

Test coming in compiler-rt.

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

7 years ago[cfi] Implement cfi-icall using inline assembly.
Evgeniy Stepanov [Fri, 11 Nov 2016 18:49:09 +0000 (18:49 +0000)]
[cfi] Implement cfi-icall using inline assembly.

The current implementation is emitting a global constant that happens
to evaluate to the same bytes + relocation as a jump instruction on
X86. This does not work for PIE executables and shared libraries
though, because we end up with a wrong relocation type. And it has no
chance of working on ARM/AArch64 which use different relocation types
for jump instructions (R_ARM_JUMP24) that is never generated for
data.

This change replaces the constant with module-level inline assembly
followed by a hidden declaration of the jump table. Works fine for
ARM/AArch64, but has some drawbacks.
* Extra symbols are added to the static symbol table, which inflate
the size of the unstripped binary a little. Stripped binaries are not
affected. This happens because jump table declarations must be
external (because their body is in the inline asm).
* Original functions that were anonymous are now named
<original name>.cfi, and it affects symbolization sometimes. This is
necessary because the only user of these functions is the (inline
asm) jump table, so they had to be added to @llvm.used, which does
not allow unnamed functions.

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

7 years agoFix comments according to the LLVM coding guidelines.
Adrian Prantl [Fri, 11 Nov 2016 18:22:51 +0000 (18:22 +0000)]
Fix comments according to the LLVM coding guidelines.

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

7 years agoRevert "Use private linkage for MergedGlobals variables" on Darwin.
Adrian Prantl [Fri, 11 Nov 2016 17:50:09 +0000 (17:50 +0000)]
Revert "Use private linkage for MergedGlobals variables" on Darwin.

This is a partial revert of r244615 (http://reviews.llvm.org/D11942),
which caused a major regression in debug info quality.

Turning the artificial __MergedGlobal symbols into private symbols
(l__MergedGlobal) means that the linker will not include them in the
symbol table of the final executable. Without a symbol table entry
dsymutil is not be able to process the debug info for any of the
merged globals and thus drops the debug info for all of them.

This patch is enabling the old behavior for all MachO targets while
leaving all other targets unaffected.

rdar://problem/29160481
https://reviews.llvm.org/D26531

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

7 years ago[AArch64] Remove lots of redundant code. NFC.
Chad Rosier [Fri, 11 Nov 2016 17:49:34 +0000 (17:49 +0000)]
[AArch64] Remove lots of redundant code. NFC.

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

7 years ago[InstCombine] fix formatting of FoldOpIntoSelect(); NFCI
Sanjay Patel [Fri, 11 Nov 2016 17:42:16 +0000 (17:42 +0000)]
[InstCombine] fix formatting of FoldOpIntoSelect(); NFCI

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

7 years agoFixed issues found by Paul Robinson with my patch for:
Greg Clayton [Fri, 11 Nov 2016 17:38:14 +0000 (17:38 +0000)]
Fixed issues found by Paul Robinson with my patch for:

https://reviews.llvm.org/D26526

- Fixed DW_FORM_strp to be correctly sized and extracted for DWARF64
- Added some missing strp variants as well
- Fixed comment typo

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

7 years ago[AArch64] Early return and minor renaming/refactoring to ease code review. NFC.
Chad Rosier [Fri, 11 Nov 2016 17:07:37 +0000 (17:07 +0000)]
[AArch64] Early return and minor renaming/refactoring to ease code review. NFC.

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

7 years agoFix windows buildbot where warnings are errors. We had a switch statement where all...
Greg Clayton [Fri, 11 Nov 2016 16:55:31 +0000 (16:55 +0000)]
Fix windows buildbot where warnings are errors. We had a switch statement where all enumerations were handled, but some compilers don't recognize this. Simplify the logic so that all compilers will know a return value is returned in all cases.

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

7 years agoClean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue:...
Greg Clayton [Fri, 11 Nov 2016 16:21:37 +0000 (16:21 +0000)]
Clean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue::getFixedFormSizes()

In preparation for a follow on patch that improves DWARF parsing speed, clean up DWARFFormValue so that we have can get the fixed byte size of a form value given a DWARFUnit or given the version, address byte size and dwarf32/64.

This patch cleans up code so that everyone is using one of the new DWARFFormValue functions:

static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, const DWARFUnit *U = nullptr);
static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, uint16_t Version, uint8_t AddrSize, bool Dwarf32);

This patch changes DWARFFormValue::skipValue() to rely on the output of DWARFFormValue::getFixedByteSize(...) instead of duplicating the code in each function. This will reduce the number of changes we need to make to DWARF to fewer places in DWARFFormValue when we add support for new form.

This patch also starts to support DWARF64 so that we can get correct byte sizes for forms that vary according the DWARF 32/64.

To reduce the code duplication a new FormSizeHelper pure virtual class was created that can be created as a FormSizeHelperDWARFUnit when you have a DWARFUnit, or FormSizeHelperManual where you manually specify the DWARF version, address byte size and DWARF32/DWARF64. There is now a single implementation of a function that gets the fixed byte size (instead of two where one took a DWARFUnit and one took the DWARF version, address byte size and DWARFFormat enum) and one function to skip the form values.

https://reviews.llvm.org/D26526

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

7 years ago[PowerPC] Add vector conversion builtins to altivec.h - LLVM portion
Nemanja Ivanovic [Fri, 11 Nov 2016 14:41:19 +0000 (14:41 +0000)]
[PowerPC] Add vector conversion builtins to altivec.h - LLVM portion

This patch corresponds to review:
https://reviews.llvm.org/D26307

Adds all the intrinsics used for various conversion builtins that will
be added to altivec.h. These are type conversions between various types of
vectors.

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

7 years agollvm-strings: Fix r286556 to add required libraries.
NAKAMURA Takumi [Fri, 11 Nov 2016 14:17:37 +0000 (14:17 +0000)]
llvm-strings: Fix r286556 to add required libraries.

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

7 years agoFix test/tools/gold/X86/thinlto_funcimport.ll on non-X86 hosts
John Brawn [Fri, 11 Nov 2016 14:12:15 +0000 (14:12 +0000)]
Fix test/tools/gold/X86/thinlto_funcimport.ll on non-X86 hosts

Pass -m elf_x86_64 to gold, as is done in other tests.

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

7 years ago[AArch64] Enable merging of adjacent zero stores for all subtargets.
Chad Rosier [Fri, 11 Nov 2016 14:10:12 +0000 (14:10 +0000)]
[AArch64] Enable merging of adjacent zero stores for all subtargets.

This optimization merges adjacent zero stores into a wider store.

e.g.,

strh wzr, [x0]
strh wzr, [x0, #2]
; becomes
str wzr, [x0]

e.g.,

str wzr, [x0]
str wzr, [x0, #4]
; becomes
str xzr, [x0]

Previously, this was only enabled for Kryo and Cortex-A57.

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

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

7 years ago[AMDGPU] TargetStreamer: Fix .note section name
Sam Kolton [Fri, 11 Nov 2016 13:41:52 +0000 (13:41 +0000)]
[AMDGPU] TargetStreamer: Fix .note section name

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

7 years ago[SystemZ] Support CL(G)T instructions
Ulrich Weigand [Fri, 11 Nov 2016 12:48:26 +0000 (12:48 +0000)]
[SystemZ] Support CL(G)T instructions

This adds support for the compare logical and trap (memory)
instructions that were added as part of the miscellaneous
instruction extensions feature with zEC12.

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

7 years ago[SystemZ] Support load-and-zero-rightmost-byte facility
Ulrich Weigand [Fri, 11 Nov 2016 12:46:28 +0000 (12:46 +0000)]
[SystemZ] Support load-and-zero-rightmost-byte facility

This adds support for the LZRF/LZRG/LLZRGF instructions that were
added on z13, and uses them for code generation were appropriate.

SystemZDAGToDAGISel::tryRISBGZero is updated again to prefer LLZRGF
over RISBG where both would be possible.

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

7 years ago[SystemZ] Use LLGT(R) instructions
Ulrich Weigand [Fri, 11 Nov 2016 12:43:51 +0000 (12:43 +0000)]
[SystemZ] Use LLGT(R) instructions

This adds support for the 31-to-64-bit zero extension instructions
LLGT and LLGTR and uses them for code generation where appropriate.

Since this operation can also be performed via RISBG, we have to
update SystemZDAGToDAGISel::tryRISBGZero so that we prefer LLGT
over RISBG in case both are possible.  The patch includes some
simplification to the tryRISBGZero code; this is not intended
to cause any (further) functional change in codegen.

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

7 years ago[SelectionDAG] Add support for vector demandedelts in BSWAP opcodes
Simon Pilgrim [Fri, 11 Nov 2016 11:51:29 +0000 (11:51 +0000)]
[SelectionDAG] Add support for vector demandedelts in BSWAP opcodes

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