134565 Commits

Author SHA1 Message Date
Simon Pilgrim
260d596443 [X86][AVX512] Add support for VPALIGNR/PSHUFD/PSHUFHW/PSHUFLW masked shuffle comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 15:00:51 +00:00
Sanjay Patel
a9403e9f0e [InstCombine] enable vector select of bools -> logic folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 14:34:39 +00:00
Simon Pilgrim
b7dea04f9b [X86][AVX512] Add support for UNPCK masked shuffle comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274464 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 14:26:21 +00:00
Sanjay Patel
d9a17d1f93 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 14:08:19 +00:00
Simon Pilgrim
2f0ee9010f [X86][AVX512] Add support for VPERM/VSHUF masked shuffle comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 13:55:41 +00:00
Simon Pilgrim
a145cca4d9 [X86][AVX512] Add support for PMOVZX masked shuffle comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 13:33:28 +00:00
Sanjay Patel
b4d7428f8a add vector bool select tests and regenerate checks for scalar bool select tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274460 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 13:26:02 +00:00
Simon Pilgrim
50f3e3a607 [X86][AVX512] Add support for masked shuffle comments
This patch adds support for including the avx512 mask register information in the mask/maskz versions of shuffle instruction comments.

This initial version just adds support for MOVDDUP/MOVSHDUP/MOVSLDUP to reduce the mass of test regenerations, other shuffle instructions can be added in due course.

Differential Revision: http://reviews.llvm.org/D21953

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 13:08:29 +00:00
Simon Pilgrim
66251d4075 [X86][AVX512] Add support for lowering shuffles to VPERMILPS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 12:47:21 +00:00
Sean Silva
9cbcb75a8a PR28400: Partly undo r274440 to bring test-suite back to life with the new PM
PR28400 seems to be not an isolated issue, but a general problem related
to caching analyses. We will need to discuss on llvm-dev.

A test case is in the PR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274457 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 03:35:06 +00:00
Sean Silva
ad5ea26278 [PM] Some preparatory refactoring to minimize the diff of D21921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-03 03:35:03 +00:00
Sean Silva
e82e4ddb87 Remove dead TLI arg of isKnownNonNull and propagate deadness. NFC.
This actually uncovered a surprisingly large chain of ultimately unused
TLI args.
From what I can gather, this argument is a remnant of when
isKnownNonNull would look at the TLI directly.
The current approach seems to be that InferFunctionAttrs runs early in
the pipeline and uses TLI to annotate the TLI-dependent non-null
information as return attributes.

This also removes the dependence of functionattrs on TLI altogether.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 23:47:27 +00:00
Xinliang David Li
6f6a939a2e Fix wrong comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274453 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 21:25:12 +00:00
Xinliang David Li
10b22c8894 [PM] Port LoopAccessInfo analysis to new PM
It is implemented as a LoopAnalysis pass as 
discussed and agreed upon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 21:18:40 +00:00
Simon Pilgrim
bbe7316521 Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 20:21:39 +00:00
Simon Pilgrim
c032badeb4 [X86][AVX512] Add support for lowering shuffles to VPERMILPD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 20:20:12 +00:00
Sylvestre Ledru
e0f2f6011e fix some various typos in the doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 19:28:40 +00:00
Simon Pilgrim
3e60eeae91 [X86][AVX512VL] Add fast-isel MOVDDUP/MOVSLDUP/MOVSHDUP shuffle tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274448 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 19:22:46 +00:00
Sean Silva
2cea4e67ba [PM] Some preparatory refactoring to minimize the diff of D21921
The main change here is just moving stuff to static functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274446 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 19:12:56 +00:00
Sean Silva
197a7516a3 [PM] Preparatory cleanups to ArgumentPromotion.
This pulls some obvious changes out of http://reviews.llvm.org/D21921 to
minimize the diff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274445 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 18:59:51 +00:00
Simon Pilgrim
91a1df2c0b [X86][AVX512] Add support for 512-bit PSHUFB lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 18:14:31 +00:00
Simon Pilgrim
1dcb078502 [X86][AVX512] Converted the MOVDDUP/MOVSLDUP/MOVSHDUP masked intrinsics to generic IR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274443 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 17:16:41 +00:00
Wilfred Hughes
f9c643b6e0 New Kaleidoscope chapter: Creating object files
This new chapter describes compiling LLVM IR to object files.

The new chaper is chapter 8, so later chapters have been renumbered.
Since this brings us to 10 chapters total, I've also needed to rename
the other chapters to use two digit numbering.

Differential Revision: http://reviews.llvm.org/D18070



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274441 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 17:01:59 +00:00
Sean Silva
ea9886a590 [PM] Fix a small typo from when I ported JumpThreading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 16:16:44 +00:00
Simon Pilgrim
c964a30adf [X86][AVX512] Autoupgrade the MOVDDUP/MOVSLDUP/MOVSHDUP intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 14:42:35 +00:00
Benjamin Kramer
cced733fa5 [DIBuilder] Remove dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 13:18:38 +00:00
Benjamin Kramer
b4e53350f9 [Hexagon] Create global std::map lazily.
This could of course be a simple binary search with no global state
involved at all if someone cares enough. Just don't make everyone
linking the hexagon backend pay for it on process startup and shutdown.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 13:05:12 +00:00
Simon Pilgrim
2e1720f455 [X86][AVX512] Add support for lowering shuffles to MOVDDUP/MOVSLDUP/MOVSHDUP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 12:45:03 +00:00
Simon Pilgrim
6c48317f16 [X86][AVX512] Add test cases that should lower to MOVSLDUP/MOVSHDUP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 12:20:35 +00:00
Simon Pilgrim
63ed024764 [X86][AVX512] Add fast-isel shuffle tests
Its not worth trying to write out tests for all the avx512f builtins yet, just adding tests for lowering of generic IR as we transition to it (shuffles mainly right now).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 12:13:29 +00:00
Benjamin Kramer
5c691e2cce Use arrays or initializer lists to feed ArrayRefs instead of SmallVector where possible.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 11:41:39 +00:00
Qin Zhao
bafbf2b643 [esan|cfrag] Add counters for struct array accesses
Summary:
Adds one counter to the struct counter array for counting struct
array accesses.

Adds instrumentation to insert counter update for struct array
accesses.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

Differential Revision: http://reviews.llvm.org/D21594

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274420 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 03:25:37 +00:00
Marcin Koscielnicki
6cbcb9eec3 [SystemZ] Move misplaced SystemZ::TDC to non-memory opcode range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 02:20:40 +00:00
Pirama Arumuga Nainar
0e9b65e2a1 Add RenderScript ArchType
Summary:
Add renderscript32 and renderscript64 ArchTypes.  This is to configure
the ABI requirement on 32-bit RenderScript that 'long' types have 64-bit
size and alignment.  64-bit RenderScript is the same as AArch64, but is
added here for completeness.

Reviewers: echristo, rsmith

Subscribers: aemerson, jfb, rampitec, dschuff, mehdi_amini, llvm-commits, srhines

Differential Revision: http://reviews.llvm.org/D21333

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 00:23:09 +00:00
Michael Kuperstein
3fae04db50 [PM] Port ConstantHoisting to the new Pass Manager
Differential Revision: http://reviews.llvm.org/D21945


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274411 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 00:16:47 +00:00
Reid Kleckner
5efb713f63 [codeview] Set the Nested and Scoped ClassOptions based on the scope chain
These are set on both the declaration record and the definition record.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-02 00:11:07 +00:00
Matt Arsenault
c1be1f5883 LoadStoreVectorizer: Fix warning about extra semicolon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274406 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 23:26:54 +00:00
Matt Arsenault
4a37139fe5 TII: Fix inlineasm size counting comments as insts
The main problem was counting comments on their own
line as instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 23:26:50 +00:00
Matt Arsenault
db64d82b74 PeepholeOptimizer: Relax assert
Allow implicit defs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 23:15:06 +00:00
David Majnemer
7239fbb65b [CodeView] Include the offset of nested members
Given something like:
  struct S {
    int a;
    struct { int b; };
  };

We would fail to give 'b' offset 4.  Instead, we would give it the
offset it has inside of it's struct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274400 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 23:12:48 +00:00
David Majnemer
0c69559ee3 [CodeView] Pretty print anonymous scopes
A namespace without a name should be written out as `anonymous
namespace' while a tag type without a name should be written out as
<unnamed-tag>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 23:12:45 +00:00
Matt Arsenault
6e4fd1497d AMDGPU: Add feature for unaligned access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 23:03:44 +00:00
Matt Arsenault
d4452f8fcf AMDGPU: Expand unaligned accesses early
Due to visit order problems, in the case of an unaligned copy
the legalized DAG fails to eliminate extra instructions introduced
by the expansion of both unaligned parts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 22:55:55 +00:00
Evgeniy Stepanov
dcfa1b5241 [msan] Fix __msan_maybe_ for non-standard type sizes.
Fix incorrect calculation of the type size for __msan_maybe_warning_N
call that resulted in an invalid (narrowing) zext instruction and
"Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed."

Only happens in very large functions (with more than 3500 MSan
checks) operating on integer types that are not power-of-two.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 22:49:59 +00:00
Matt Arsenault
df587174eb AMDGPU: Improve load/store of illegal types.
There was a combine before to handle the simple copy case.
Split this into handling loads and stores separately.

We might want to change how this handles some of the vector
extloads, since this can result in large code size increases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 22:47:50 +00:00
Reid Kleckner
613f199109 [codeview] Don't record UDTs for anonymous structs
MSVC makes up names for these anonymous structs, but we don't (yet).
Eventually Clang should use getTypedefNameForAnonDecl() to put some name
in the debug info, and we can update the test case when that happens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 22:24:51 +00:00
Justin Bogner
f0a4c11604 IR: Set TargetPrefix for some X86 and AArch64 intrinsics where it was missing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 22:07:11 +00:00
Alina Sbirlea
1e53a5fcec Address two correctness issues in LoadStoreVectorizer
Summary:
GetBoundryInstruction returns the last instruction as the instruction which follows or end(). Otherwise the last instruction in the boundry set is not being tested by isVectorizable().
Partially solve reordering of instructions. More extensive solution to follow.

Reviewers: tstellarAMD, llvm-commits, jlebar

Subscribers: escha, arsenm, mzolotukhin

Differential Revision: http://reviews.llvm.org/D21934

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 21:44:12 +00:00
Krzysztof Parzyszek
364f2492a3 [Hexagon] Revert r274381: that was actually wrong
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 20:45:19 +00:00
Krzysztof Parzyszek
7993722a44 [Hexagon] Use MachineOperand::readsReg instead of isUse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 20:28:30 +00:00