141336 Commits

Author SHA1 Message Date
Craig Topper
670c05a5b2 [DAGCombine] Teach DAG combine that if both inputs of a vselect are the same, then the condition doesn't matter and the vselect can be removed.
Selects with scalar condition already handle this correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 21:48:52 +00:00
Craig Topper
55853da130 [X86] Modify two tests that passed undef to both sides of a vselect to instead pass unique values.
I'd like to teach DAG combine to remove vselects where both sides are identical and these tests were in the way of that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 21:48:50 +00:00
Serge Rogatch
ef5c24c358 Test commit access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287898 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 18:51:47 +00:00
Craig Topper
7a525e09ac [AVX-512] Add tests demonstrating failure to generated masked instructions for VSHUFF32x4 and VSHUFI32x4 due to shuffle lowering widening elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 18:24:46 +00:00
Abhilash Bhandari
c3bdfe57eb Test Commit, removing a blank line in CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 15:40:19 +00:00
Simon Pilgrim
a1807de6bc Fix unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287889 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 15:24:47 +00:00
Benjamin Kramer
452417f3fd [X86] Don't round trip a unique_ptr through a raw pointer for assignment.
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 15:17:39 +00:00
Simon Pilgrim
911bcb3c53 [X86][SSE] Improve UINT_TO_FP v2i32 -> v2f64
Vectorize UINT_TO_FP v2i32 -> v2f64 instead of scalarization (albeit still on the SIMD unit).

The codegen matches that generated by legalization (and is in fact used by AVX for UINT_TO_FP v4i32 -> v4f64), but has to be done in the x86 backend to account for legalization via 4i32.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 15:12:56 +00:00
Simon Pilgrim
5d31f856ab [X86][AVX512] Add support for v2i64 fptosi/fptoui/sitofp/uitofp on AVX512DQ-only targets
Use 512-bit instructions with subvector insertion/extraction like we do in a number of similar circumstances

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 14:46:55 +00:00
Simon Pilgrim
1a88fd21d5 [X86][AVX512DQVL] Add awareness of vcvtqq2ps and vcvtuqq2ps implicit zeroing of upper 64-bits of xmm result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 14:02:30 +00:00
Simon Pilgrim
ac42cfa241 [X86][AVX512DQVL] Add support for v2i64 -> v2f32 SINT_TO_FP/UINT_TO_FP lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 13:38:59 +00:00
Simon Pilgrim
3609773141 [X86][AVX512DQVL] Add v2i64 -> v2f32 + zero codegen tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 13:26:51 +00:00
Nikolai Bozhenov
242e374435 [x86] Fixing PR28755 by precomputing the address used in CMPXCHG8B
The bug arises during register allocation on i686 for
CMPXCHG8B instruction when base pointer is needed. CMPXCHG8B
needs 4 implicit registers (EAX, EBX, ECX, EDX) and a memory address,
plus ESI is reserved as the base pointer. With such constraints the only
way register allocator would do its job successfully is when the addressing
mode of the instruction requires only one register. If that is not the case
- we are emitting additional LEA instruction to compute the address.

It fixes PR28755.

Patch by Alexander Ivchenko <alexander.ivchenko@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 13:23:35 +00:00
Nikolai Bozhenov
8ac75a18fc [x86] Minor refactoring of X86TargetLowering::EmitInstrWithCustomInserter
Move the definitions of three variables out of the switch.

Patch by Alexander Ivchenko <alexander.ivchenko@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 13:15:49 +00:00
Nikolai Bozhenov
5f72eeb850 [x86] Rewrite getAddressFromInstr helper function
- It does not modify the input instruction
- Second operand of any address is always an Index Register,
  make sure we actually check for that, instead of a check for
  an immediate value

Patch by Alexander Ivchenko <alexander.ivchenko@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287873 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 13:05:43 +00:00
Dylan McKay
eef324fa60 [AVR] Mark the 'select-must-add-unconditional-jump' test as 'XFAIL'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287871 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 12:38:54 +00:00
Simon Pilgrim
846003aeb4 [X86] Generalize CVTTPD2DQ/CVTTPD2UDQ and CVTDQ2PD/CVTUDQ2PD opcodes. NFCI
Replace the CVTTPD2DQ/CVTTPD2UDQ and CVTDQ2PD/CVTUDQ2PD opcodes with general versions.

This is an initial step towards similar FP_TO_SINT/FP_TO_UINT and SINT_TO_FP/UINT_TO_FP lowering to AVX512 CVTTPS2QQ/CVTTPS2UQQ and CVTQQ2PS/CVTUQQ2PS with illegal types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 12:13:46 +00:00
Malcolm Parsons
3cd5f5be43 [CommandLine] Remove redundant initializers for StringRef members
Summary: The default constructor for a StringRef stores an empty string.

Reviewers: beanz, zturner

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 08:54:05 +00:00
Jacob Baungard Hansen
e6ee79fbc5 TableGen: Allow signed immediates for instruction aliases
Patch by Daniel Cederman.

Reviewers: stoklund, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287856 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 08:53:28 +00:00
Craig Topper
538c8c00db [AVX-512] Fix some mask shuffle tests to actually test the case they were supposed to test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287854 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 05:36:50 +00:00
Craig Topper
5b3baa1aad [AVX-512] Move a 16 x float shuffle test to the v16 test file and add an integer variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287853 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 05:36:47 +00:00
Peter Collingbourne
045ffc4b32 Object: Add IRObjectFile::getTargetTriple().
This lets us remove a use of IRObjectFile::getModule() in llvm-nm.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 01:13:09 +00:00
Peter Collingbourne
4384b55c02 Object: Simplify the IRObjectFile symbol iterator implementation.
Change the IRObjectFile symbol iterator to be a pointer into a vector of
PointerUnions representing either IR symbols or asm symbols.

This change is in preparation for a future change for supporting multiple
modules in an IRObjectFile. Although it causes an increase in memory
consumption, we can deal with that issue separately by introducing a bitcode
symbol table.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 00:41:05 +00:00
Matt Arsenault
a5a179ffd9 AMDGPU: Preserve m0 value when spilling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 00:26:50 +00:00
Matt Arsenault
1cb6ce6960 TRI: Add hook to pass scavenger during frame elimination
The scavenger was not passed if requiresFrameIndexScavenging was
enabled. I need to be able to test for the availability of an
unallocatable register here, so I can't create a virtual register for
it.

It might be better to just always use the scavenger and stop
creating virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 00:26:47 +00:00
Matt Arsenault
f18de36554 AMDGPU: Remove m0 spilling code
Since m0 isn't allocatable it should never be spilled anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 00:26:44 +00:00
Matt Arsenault
124ad83dae AMDGPU: Make m0 unallocatable
m0 may need to be written for spill code, so
we don't want general code uses relying on the
value stored in it.

This introduces a few code quality regressions where copies
from m0 are not coalesced into copies of a copy of m0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287841 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 00:26:40 +00:00
Davide Italiano
6c4098223f [lib/LTO] Rename few instances of Lto to LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 00:23:09 +00:00
Greg Clayton
56037652a8 Rely on a single DWARF version instead of having two copies
This patch makes AsmPrinter less reliant on DwarfDebug by relying on the DWARF version in the AsmPrinter's MCStreamer's MCContext. This allows us to remove the redundant DWARF version from DwarfDebug. It also lets us change code that used to access the AsmPrinter's DwarfDebug just to get to the DWARF version by changing the DWARF version accessor on AsmPrinter so that it grabs the version from its MCStreamer's MCContext.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 23:30:37 +00:00
Eugene Zelenko
a9f7e82841 [DebugInfo] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287838 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 23:16:32 +00:00
Simon Pilgrim
89e45d5649 [X86][SSE] Add awareness of (v)cvtpd2dq and vcvtpd2udq implicit zeroing of upper 64-bits of xmm result
We've already added the equivalent for (v)cvttpd2dq (rL284459) and vcvttpd2udq

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:35:06 +00:00
Eugene Zelenko
38d2f633f1 [IR] Fix some Clang-tidy modernize-use-default, modernize-use-equal-delete and Include What You Use warnings; other minor fixes (NFC).
Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287834 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:25:16 +00:00
Nicolai Haehnle
da8f0a5694 [SelectionDAG] Early-out in TargetLowering::expandMUL (NFC)
Summary: Reduce indentation level; preparation for D24956.

Reviewers: efriedma

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:14:20 +00:00
Simon Pilgrim
cfae859e0c [X86][AVX512VL] Add v2f64 -> v2i32/v2f32 + zero codegen tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287821 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 22:01:50 +00:00
Matt Arsenault
6939475a93 AMDGPU: Cleanup immediate folding code
Move code down to use, reorder to avoid hard to follow
immediate folding logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:51:07 +00:00
Matt Arsenault
ef97727654 AMDGPU: Fix debug printing
The uint8_t was printed as a char which didn't really work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287817 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:51:05 +00:00
Simon Pilgrim
06a2bf816b [X86][SSE] Add v2i64 -> v2i32 + zero codegen test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:19:57 +00:00
Matt Arsenault
057bbbe4ae AMDGPU: Fix not setting kill flag on temp reg when spilling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:00:12 +00:00
Matt Arsenault
e834ce5976 AMDGPU: Fix adding extra implicit def of register
In the scalar case, there's no reason to add an additional
def of the same register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287807 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:00:10 +00:00
Matt Arsenault
79d4f8b8b1 AMDGPU: Fix MMO when splitting spill
The size and offset were wrong. The size of the object was
being used for the size of the access, when here it is really
being split into 4-byte accesses. The underlying object size
is set in the MachinePointerInfo, which also didn't have the
offset set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:52:53 +00:00
Vedant Kumar
6e1a44693e Revert "[lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path."
This reverts commit r287403. It breaks an internal asan bot. According
to Kuba, a fix is up for review here: https://reviews.llvm.org/D26929

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:51:09 +00:00
Meador Inge
882017a7cb llvm-nm: Print correct symbol types for init and fini sections
This patch fixes a small bug where symbols defined in the INIT
and FINI sections were incorrectly getting a type of 'n'.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287803 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:17:20 +00:00
Meador Inge
54801d6fa5 llvm-nm: Don't print value or size for undefined or weak symbols
Undefined and weak symbols don't have a meaningful size or value.
As such, nothing should be printed for those attributes (this is
already done for the address with 'U') with the BSD format.  This
matches what GNU nm does.

Note that for the POSIX.2 format [1] zero values are still
printed for the size and value.  This seems in spirit with
the format strings in that specification, but is debatable.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287802 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:17:15 +00:00
Alexey Bataev
82fd34805f [SLP] Add more tests for SLP Vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:10:32 +00:00
Haicheng Wu
ede1dc8ce8 [LoopUnroll] Move code to exit early. NFC.
Just to save some compilation time.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287800 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 19:39:26 +00:00
Daniel Berlin
c293e51672 Revert "[Triple] Add Facebook vendor"
This reverts commit r287684

Objections on the review thread had not been addressed to
prior to commit.  I asked the committer to revert, but i expect they
are gone for the US holiday or something.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287798 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 19:03:54 +00:00
Michael Kuperstein
4f54847874 [X86] Allow folding of stack reloads when loading a subreg of the spilled reg
We did not support subregs in InlineSpiller:foldMemoryOperand() because targets
may not deal with them correctly.

This adds a target hook to let the spiller know that a target can handle
subregs, and actually enables it for x86 for the case of stack slot reloads.
This fixes PR30832.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 18:33:49 +00:00
Hemant Kulkarni
fe8bde7e92 llvm-readobj: Use hash tables to print dynamic symbols.
-symbols prints both .symtab and .dynsym symbols for GNU style in ELF.
-dyn-symbols prints symbols looking up through hash tables. This helps validate hash tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 18:04:23 +00:00
Chandler Carruth
33d568124e [PM] Change the static object whose address is used to uniquely identify
analyses to have a common type which is enforced rather than using
a char object and a `void *` type when used as an identifier.

This has a number of advantages. First, it at least helps some of the
confusion raised in Justin Lebar's code review of why `void *` was being
used everywhere by having a stronger type that connects to documentation
about this.

However, perhaps more importantly, it addresses a serious issue where
the alignment of these pointer-like identifiers was unknown. This made
it hard to use them in pointer-like data structures. We were already
dodging this in dangerous ways to create the "all analyses" entry. In
a subsequent patch I attempted to use these with TinyPtrVector and
things fell apart in a very bad way.

And it isn't just a compile time or type system issue. Worse than that,
the actual alignment of these pointer-like opaque identifiers wasn't
guaranteed to be a useful alignment as they were just characters.

This change introduces a type to use as the "key" object whose address
forms the opaque identifier. This both forces the objects to have proper
alignment, and provides type checking that we get it right everywhere.
It also makes the types somewhat less mysterious than `void *`.

We could go one step further and introduce a truly opaque pointer-like
type to return from the `ID()` static function rather than returning
`AnalysisKey *`, but that didn't seem to be a clear win so this is just
the initial change to get to a reliably typed and aligned object serving
is a key for all the analyses.

Thanks to Richard Smith and Justin Lebar for helping pick plausible
names and avoid making this refactoring many times. =] And thanks to
Sean for the super fast review!

While here, I've tried to move away from the "PassID" nomenclature
entirely as it wasn't really helping and is overloaded with old pass
manager constructs. Now we have IDs for analyses, and key objects whose
address can be used as IDs. Where possible and clear I've shortened this
to just "ID". In a few places I kept "AnalysisID" to make it clear what
was being identified.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287783 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 17:53:26 +00:00
Alina Sbirlea
106bcf1838 [LoadStoreVectorizer] Enable vectorization of stores in the presence of an aliasing load
Summary:
The "getVectorizablePrefix" method would give up if it found an aliasing load for a store chain.
In practice, the aliasing load can be treated as a memory barrier and all stores that precede it
are a valid vectorizable prefix.
Issue found by volkan in D26962. Testcase is a pruned version of the one in the original patch.

Reviewers: jlebar, arsenm, tstellarAMD

Subscribers: mzolotukhin, wdng, nhaehnle, anna, volkan, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 17:43:15 +00:00