Commit Graph

143410 Commits

Author SHA1 Message Date
Xin Tong
60c55505db Empty line. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292081 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 23:32:11 +00:00
Xin Tong
fcc56edb5f Use getLoopLatch in place of isLoopSimplifyForm
Summary:
Use getLoopLatch in place of isLoopSimplifyForm. we do not need
to know whether the loop has a preheader nor dedicated exits.

Reviewers: hfinkel, sanjoy, atrick, mkuper

Subscribers: mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292078 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 21:17:52 +00:00
Simon Pilgrim
0016b62b09 [CostModel][X86] Fix AVX512BW vector shift costs for vXi16 types
We already have patterns in place to support 128/256-bit shifts without AVX512VL

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 20:44:00 +00:00
Simon Pilgrim
3a60120921 [CostModel][X86] Drop separate AVX512VL checks - they match existing AVX512 costs
Keep the tests though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292076 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 20:19:28 +00:00
Simon Pilgrim
43b72e4d01 [CostModel][X86] Update vector shift tests to correctly check by non-constant uniform values.
Use shuffle( scslar_to_vector, zeroinitializer) pattern instead of shuffle( vec, zeroinitializer)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292075 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 20:10:28 +00:00
Xin Tong
fc76059402 Delete a dead argument. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 19:53:59 +00:00
Sanjay Patel
50a13b4047 [InstCombine] fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292073 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 17:55:35 +00:00
Simon Pilgrim
4354d8859a [InstCombine][SSE] Tests showing missed opportunities to pass demanded elts through a pshufb shuffle mask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292072 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 17:49:04 +00:00
Justin Lebar
f4556e7ece [NVPTX] Add fptosi tests to convert-fp.ll.
These seem to have been left off by accident.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292071 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:55:54 +00:00
Justin Lebar
164f3ff43b [NVPTX] Add codegen tests for llvm.fma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292070 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:55:37 +00:00
Justin Lebar
be5157f530 [NVPTX] Modernize intrinics.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292069 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:54:57 +00:00
Justin Lebar
352f7fdadc [NVPTX] Let there be One True Way to set NVVMReflect params.
Summary:
Previously there were three ways to inform the NVVMReflect pass whether
you wanted to flush denormals to zero:

  * An LLVM command-line option
  * Parameters to the NVVMReflect constructor
  * Metadata on the module itself.

This change removes the first two, leaving only the third.

The motivation for this change, aside from simplifying things, is that
we want LLVM to be aware of whether it's operating in FTZ mode, so other
passes can use this information.  Ideally we'd have a target-generic
piece of metadata on the module.  This change moves us in that
direction.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292068 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:54:35 +00:00
Michael Zuckerman
50520f329a Fix blend mask by switch the side of the operand since Blend node uses opposite mask then Select NODE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292066 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:43:14 +00:00
Daniel Jasper
8b122d0496 Fix un-initialized error introduced by r291959.
This is uncovered when running tools/dsymutil/X86/empty_range.s.test
with ASAN. Haven't investigate yet, whether that means there is an ODR
violation in that test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:42:36 +00:00
Sanjay Patel
f6be6abb81 [InstCombine] use m_APInt to allow ashr folds for vectors with splat constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292064 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:38:19 +00:00
Sanjay Patel
b41dc00dd6 [InstCombine] add explanatory comments to tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:22:26 +00:00
Serge Pavlov
69a1a20613 Reverted: Track validity of pass results
Commits r291882 and related r291887.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292062 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 10:23:18 +00:00
Daniel Jasper
a8933c2b2d Revert "[GlobalISel] track predecessor mapping during switch lowering."
This reverts commit r291973.

The test fails in a Release build with LLVM_BUILD_GLOBAL_ISEL enabled.
AFAICT, llc segfaults. I'll add a few more details to the original
commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 09:41:49 +00:00
Chandler Carruth
0e327f2e11 [PM] Clean up the testing for IVUsers, especially with the new PM.
First, I've moved a test of IVUsers from the LSR tree to a dedicated
IVUsers test directory. I've also simplified its RUN line now that the
new pass manager's loop PM is providing analyses on their own.

No functionality changed, but it makes subsequent changes cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 09:29:27 +00:00
Daniel Berlin
c110f9b676 NewGVN: Change a bunch of densemap find_or_creates to lookups, since they should not be creating new entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292059 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 09:18:41 +00:00
Chandler Carruth
d97514d79a [PM] Teach the optimization remarks emitter to handle invalidation
events.

This pass sometimes has a pointer to BlockFrequencyInfo so it needs
custom invalidation logic. It is also otherwise immutable so we can
reduce the number of invalidations that happen substantially.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292058 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 08:20:50 +00:00
Daniel Berlin
9aeadfb99d These two functions should be const. We often could detect it but this just makes it always true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292057 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 07:40:51 +00:00
Daniel Berlin
bd42d0623a Update update_test_checks so that . is a valid identifier character in addition to _
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292056 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 07:40:46 +00:00
Lang Hames
b1e2ecc0ae [Orc][RPC] Add an RPCFunctionNotSupported error type and return it from
negotiateFunction where appropriate.

Replacing the old ECError with a custom type allows us to attach the name of
the function that could not be negotiated, enabling better diagnostics for
negotiation failures.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292055 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 06:34:25 +00:00
Chandler Carruth
10dd00ced5 [PM] Introduce an analysis set used to preserve all analyses over
a function's CFG when that CFG is unchanged.

This allows transformation passes to simply claim they preserve the CFG
and analysis passes to check for the CFG being preserved to remove the
fanout of all analyses being listed in all passes.

I've gone through and removed or cleaned up as many of the comments
reminding us to do this as I could.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292054 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 06:32:49 +00:00
Craig Topper
af2151d394 [AVX-512] Remove unnecessary duplicate broadcast patterns. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292053 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 06:15:45 +00:00
Craig Topper
6a84b24687 [AVX-512] Replicate some broadcast patterns to VLX and disable the AVX2 patterns when VLX is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292051 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 05:47:45 +00:00
Craig Topper
ba330b6646 [X86] Remove untested MOVDDUP patterns.
These all involve bitcasts around the memory operands. This isn't
something we normally do for isel patterns. I suspect DAG combine should
convert the load type making this unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 05:21:29 +00:00
Mehdi Amini
a9134d2526 Add a LLVM_USE_LINKER that defines the linker to use when building LLVM
Summary:
This string parameter is passed to -fuse-ld when linking. It can be
an absolute path to your custom linker, otherwise clang will look for
`ld.{name}`.

Reviewers: davide, tejohnson, pcc

Subscribers: llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292047 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 03:21:30 +00:00
Eric Fiselier
29bdc2ffce Give comparator const call operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292043 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 02:06:44 +00:00
Rui Ueyama
4b8b0ba562 PDB: Add a class to create the /names stream contents.
This patch adds a new class NameHashTableBuilder which creates /names streams.
This patch contains a test to confirm that a stream created by
NameHashTableBuilder can be read by NameHashTable reader class.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292040 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 00:36:02 +00:00
Chandler Carruth
15050a4c1e [PM] The assumption cache is fundamentally designed to be self-updating,
mark it as never invalidated in the new PM.

The old PM already required this to work, and after a discussion with
Hal this seems to really be the only sensible answer. The cache
gracefully degrades as the IR is mutated, and most things which do this
should already be incrementally updating the cache.

This gets rid of a bunch of logic preserving and testing the
invalidation of this analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292039 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 00:26:18 +00:00
Chandler Carruth
340ad683c8 [PM] Fix instcombine's analysis preservation in the new pass manager to
cover domtree and alias analysis. These are the pretty clear analyses
that we would always want to survive this pass.

To make these survive, we also need to preserve the assumption cache.

Added a test that verifies the important bits of this preservation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292037 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 23:25:22 +00:00
Sanjay Patel
2061aabd6a [InstCombine] clean up visitAshr(); NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292036 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 23:13:50 +00:00
Sanjay Patel
1849414f3e [InstCombine] add test to show missed vector fold; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292035 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 23:12:29 +00:00
David Majnemer
fe78796b30 Adding const overloads of operator* and operator-> for DenseSet iterators
This fixes some problems when building ClangDiagnostics.cpp on Visual Studio 2017 RC. As far as I understand, there was a change in the implementation of the constructor for std::vector with two iterator parameters, which in our case causes an attempt to dereference const Iterator objects. Since there was no overload for a const Iterator, the compile would fail.

Patch by Hugo Puhlmann!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292034 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 21:54:58 +00:00
Davide Italiano
6fc369afea [NewGVN] Fix a warning from GCC.
Patch by Gonsolo.
Differential Revision:  https://reviews.llvm.org/D28731

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292031 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 20:44:08 +00:00
Davide Italiano
ef1d09ade3 [NewGVN] clang-format this file after recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292026 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 20:15:04 +00:00
Davide Italiano
a8cc948667 [NewGVN] Try to be consistent wit the style used in this file. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292025 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 20:13:18 +00:00
Davide Italiano
3bd353386a [TargetLowering] Simplfiy a bit. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292024 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 20:09:29 +00:00
Simon Pilgrim
75f614f4c2 [CostModel][X86] Updated vXi64 ASHR costs on AVX512 targets now that D28604 has landed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292023 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 19:24:23 +00:00
Simon Pilgrim
97658211eb [X86][XOP] Added support for VPMADCSWD 'extend+hadd' IFMA patterns
VPMADCSWD act as VPADDD( VPMADDWD( x, y ), z ) - multiply+extend+hadd and add to v4i32 accumulator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292021 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 18:52:13 +00:00
Simon Pilgrim
261f559da3 [X86][XOP] Added support for VPMACSDQH/VPMACSDQL 'extension' IFMA patterns
VPMACSDQH/VPMACSDQL act as VPADDQ( VPMULDQ( x, y ), z ) - multiply+extending either the odd/even 4i32 input elements and adding to v2i64 accumulator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292020 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 18:08:54 +00:00
Simon Pilgrim
08c5cbd394 [X86][XOP] Added support for VPMACSWW/VPMACSDD 'lossy' IFMA patterns
VPMACSWW/VPMACSDD act as add( mul( x, y ), z ) - ignoring any upper bits from both the multiply and add stages

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292019 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 17:13:52 +00:00
Simon Pilgrim
6dbd68e62b [X86][XOP] Add tests for integer fused multiply add
Tests showing missed opportunities to use XOP's integer fma instructions

Some of these are pretty awkward to match as they often have implicit sext/trunc stages but many just ignore overflow bits which makes things pretty straightforward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292017 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 13:07:22 +00:00
Sylvestre Ledru
1d6becb423 fix some typos in the doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292014 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 11:37:01 +00:00
Nikolai Bozhenov
d4a4367ac0 [utils] Improve extraction of check prefixes from RUN lines
Correct handling of the following FileCheck options is implemented in
update_llc_test_checks.py and update_test_checks.py scripts:

1) -check-prefix (with a single dash)
2) -check-prefixes (with multiple prefixes)

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292008 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 09:39:35 +00:00
Craig Topper
7b47370e8e [AVX-512] Teach two address instruction pass to replace masked move instructions with blendm instructions when its beneficial.
Isel now selects masked move instructions for vselect instead of blendm. But sometimes it beneficial to register allocation to remove the tied register constraint by using blendm instructions.

This also picks up cases where the masked move was created due to a masked load intrinsic.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292005 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 07:50:52 +00:00
Craig Topper
49a15c1e8e [AVX-512] Replace V_SET0 in AVX-512 patterns with AVX512_128_SET0. Enhance AVX512_128_SET0 expansion to make this possible.
We'll now expand AVX512_128_SET0 to an EVEX VXORD if VLX available. Or if its not, but register allocation has selected a non-extended register we will use VEX VXORPS. And if its an extended register without VLX we'll use a 512-bit XOR. Do the same for AVX512_FsFLD0SS/SD.

This makes it possible for the register allocator to have all 32 registers available to work with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292004 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 07:29:24 +00:00
Marcello Maggioni
99dc11c166 Removing potentially error-prone fallthrough. NFC
This fallthrough if other cases are added between fabs and default
could cause fabs to fall to the next case resulting in a bug.
Better getting rid of it immediately just to be sure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292003 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-14 07:28:47 +00:00