141116 Commits

Author SHA1 Message Date
Chris Bieneman
fae8230562 [CMake] verify-uselistorder depends on intrinsics_gen
verify-uselistorder.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means verify-uselistorder needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:30:58 +00:00
Chris Bieneman
4ed355301c [CMake] sanstats depends on intrinsics_gen
sanstats.cpp has the following include chain:

llvm/Transforms/Utils/SanitizerStats.h
llvm/IR/IRBuilder.h
llvm/IR/ConstantFolder.h
llvm/IR/InstrTypes.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means sanstats needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:30:39 +00:00
Kuba Mracek
f3fc2834ab [lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path.
This will make sure that we find an actual path in case you have Command Line Tools installed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287403 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:25:57 +00:00
Chris Bieneman
7ee6adde1b [CMake] bugpoint depends on intrinsics_gen
CrashDebugger.cpp has the following include chain:

llvm/Analysis/TargetTransformInfo.h
llvm/IR/IntrinsicInst.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means bugpoint needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:25:30 +00:00
Sanjay Patel
c4506a3311 [InstCombine] add tests to show likely unwanted select widening; NFC
This is a prerequisite patch for D26556:
https://reviews.llvm.org/D26556

...because there was no direct coverage for these folds (which in some cases are adding instructions).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287400 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:22:00 +00:00
Chris Bieneman
b7195e783b [CMake] llvm-split depends on intrinsics_gen
llvm-split.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-split needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:20:38 +00:00
Chris Bieneman
456e0ea237 [CMake] llvm-lto depends on intrinsics_gen
llvm-lto.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-lto needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:20:35 +00:00
Chris Bieneman
dafc355edd [CMake] llvm-ar depends on intrinsics_gen
llvm-ar.cpp has the following include chain:

llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-ar needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:04:27 +00:00
Chris Bieneman
435a2cfb4e [CMake] llvm-profdata depends on intrinsics_gen
llvm-profdata.cpp has the following include chain:

llvm/ProfileData/SampleProfReader.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-profdata needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:04:15 +00:00
Chris Bieneman
7fd026bab4 [CMake] LTO depends on intrinsics_gen
lto.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means LTO needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:03:51 +00:00
Konstantin Zhuravlyov
5527d64b74 [AMDGPU] Change frexp.exp intrinsic to return i16 for f16 input
Differential Revision: https://reviews.llvm.org/D26862


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 22:31:08 +00:00
Simon Pilgrim
3000aab2fb [SelectionDAG] Add knowbits support for CONCAT_VECTOR opcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 22:21:22 +00:00
Simon Pilgrim
d4e6a9ba02 [X86] Add knownbits concat_vector test
Support coming in a future patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287385 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 21:59:38 +00:00
Eugene Zelenko
38ccacb5ed [Examples] Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D26433


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 21:57:58 +00:00
Michael Zolotukhin
3a7f010bf7 [LoopSimplify] Preserve LCSSA when removing edges from unreachable blocks.
This fixes PR30454.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 21:01:12 +00:00
Geoff Berry
24feb85418 [MIRPrinter] XFAIL test for powerpc
This test introduced in r287368 is failing on powerpc for reasons
unrelated to branch probabilities.  See PR31062.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 20:08:05 +00:00
Mehdi Amini
c0aec7f2f5 Revert "Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch"
This reverts commit r287352, LLDB CI is broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 20:02:34 +00:00
Matthias Braun
9df5d1c65c Statistic/Timer: Include timers in PrintStatisticsJSON().
Differential Revision: https://reviews.llvm.org/D25588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:43:24 +00:00
Matthias Braun
9262f00f1a Timer: Track name and description.
The previously used "names" are rather descriptions (they use multiple
words and contain spaces), use short programming language identifier
like strings for the "names" which should be used when exporting to
machine parseable formats.

Also removed a unused TimerGroup from Hexxagon.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287369 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:43:18 +00:00
Geoff Berry
181c24a90c [MIRPrinter] Print raw branch probabilities as expected by MIRParser
Fixes PR28751.

Reviewers: MatzeB, qcolombet

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287368 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 19:37:24 +00:00
Matt Arsenault
13892fc867 AMDGPU: Fix unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 18:33:36 +00:00
Hans Wennborg
bd831c75eb Fix test from r287353: don't use /dev/null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 18:27:31 +00:00
Adam Nemet
8fb7aa0930 [LTO] Add option to generate optimization records
It is used to drive this from the clang driver via -mllvm.

Same option name is used as in opt.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287356 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 18:06:28 +00:00
Eugene Zelenko
fc3b3807b1 [DebugInfo] 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@287355 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 18:00:19 +00:00
Hans Wennborg
3e367e61a7 IRMover: Avoid accidentally mapping types from the destination module (PR30799)
During Module linking, it's possible for SrcM->getIdentifiedStructTypes();
to return types that are actually defined in the destination module
(DstM). Depending on how the bitcode file was read,
getIdentifiedStructTypes() might do a walk over all values, including
metadata nodes, looking for types. In my case, a debug info metadata
node was shared between the two modules, and it referred to a type
defined in the destination module (see test case).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 17:33:05 +00:00
Mehdi Amini
ed72617844 Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch
Summary:
LLVM will define a symbol, either EnableABIBreakingChecks or
DisableABIBreakingChecks depending on the configuration setting for
LLVM_ABI_BREAKING_CHECKS.

The llvm-config.h header will add weak references to these symbols in
every clients that includes this header. This should ensure that
a mismatch triggers a link failure (or a load time failure for DSO).

On MSVC, the pragma "detect_mismatch" is used instead.

Reviewers: rnk, jroelofs

Subscribers: llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 17:28:10 +00:00
Ehsan Amiri
37f2389c9d [PPC] limit line width to 80 characters
NFC. Forgot to fix this in the original commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 16:24:27 +00:00
Simon Dardis
a60ff0d03c [mips][msa] Implement f16 support
The MIPS MSA ASE provides instructions to convert to and from half precision
floating point. This patch teaches the MIPS backend to treat f16 as a legal
type and how to promote such values to f32 for the usual set of operations.

As a result of this, the fexup[lr].w intrinsics no longer crash LLVM during
type legalization.

Reviewers: zoran.jovanvoic, vkalintiris

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 16:17:44 +00:00
Simon Pilgrim
0f37c5c43a [X86][AVX512] Split AVX512F/AVX512VL tests to demonstrate missed int2fp opportunities without AVX512VL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 15:31:36 +00:00
Tom Stellard
eb3384582f GlobalISel: Fix unconditional fallback with global isel abort is disabled
Reviewers: t.p.northover, ab, qcolombet

Subscribers: mehdi_amini, vkalintiris, wdng, dberris, llvm-commits, rovka

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 14:14:35 +00:00
Tom Stellard
a006842d47 AMDGPU/SI: Remove zero_extend patterns for i16 ops selected to 32-bit insts
Summary:
The 32-bit instructions don't zero the high 16-bits like the 16-bit
instructions do.

Reviewers: arsenm

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287342 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 13:53:34 +00:00
Florian Hahn
8a56643640 [simplifycfg][loop-simplify] Preserve loop metadata in 2 transformations.
insertUniqueBackedgeBlock in lib/Transforms/Utils/LoopSimplify.cpp now
propagates existing llvm.loop metadata to newly the added backedge.

llvm::TryToSimplifyUncondBranchFromEmptyBlock in lib/Transforms/Utils/Local.cpp
now propagates existing llvm.loop metadata to the branch instructions in the
predecessor blocks of the empty block that is removed.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 13:12:07 +00:00
Simon Pilgrim
f482b59d3c Cleanup function with clang-format. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 12:16:18 +00:00
Nicolai Haehnle
1e27a618c6 AMDGPU: Fix legalization of MUBUF instructions in shaders
Summary:
The addr64-based legalization is incorrect for MUBUF instructions with idxen
set as well as for BUFFER_LOAD/STORE_FORMAT_* instructions.  This affects
e.g.  shaders that access buffer textures.

Since we never actually need the addr64-legalization in shaders, this patch
takes the easy route and keys off the calling convention.  If this ever
affects (non-OpenGL) compute, the type of legalization needs to be chosen
based on some TSFlag.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98664

Reviewers: arsenm, tstellarAMD

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:55:52 +00:00
Simon Pilgrim
546b063ba5 Fix spelling mistakes in MIPS target comments. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:53:36 +00:00
Ehsan Amiri
3d73fcad55 [Power9] Add patterns for vnegd, vnegw
Exploit new instructions by adding patterns to .td file.
https://reviews.llvm.org/D26551



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:05:55 +00:00
Simon Pilgrim
9f23214cb5 Fix spelling mistakes in AMDGPU target comments. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:04:02 +00:00
Simon Pilgrim
f04d638332 [X86][AVX2] Add v8i32->v8i64 mul test (PR30845)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287332 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 11:00:36 +00:00
Simon Pilgrim
178e833710 Fix typo in comment. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287331 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 10:52:12 +00:00
Ehsan Amiri
072e86da0c [PPC][DAGCombine] Convert SETCC to subtract when the result is zero extended
When we see a SETCC whose only users are zero extend operations, we can replace
it with a subtraction. This results in doing all calculations in GPRs and
avoids CR use.

Currently we do this only for ULT, ULE, UGT and UGE condition codes. There are
ways that this can be extended. For example for signed condition codes. In that
case we will be introducing additional sign extend instructions, so more careful
profitability analysis may be required.

Another direction to extend this is for equal, not equal conditions. Also when
users of SETCC are any_ext or sign_ext, we might be able to do something 
similar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 10:41:44 +00:00
Amaury Sechet
d1894a13cc Fix go binding to adapt the new attribute API
https://reviews.llvm.org/D26339

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 10:11:02 +00:00
Craig Topper
35b775d13a [InstCombine][AVX-512] Teach InstCombineCalls how to handle the intrinsics for variable shift with 16-bit elements.
This is a straightforward extension of the existing support for 32/64-bit element types. Just needed to add the additional instrinsics to the switches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 06:04:33 +00:00
Craig Topper
e5e77e4a92 [AVX-512] Replace masked 16-bit element variable shift intrinsics with new unmasked versions and selects.
The same thing was done to 32-bit and 64-bit element sizes previously.

This will allow us to support these shuffls in InstCombineCalls along with the other variable shift intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 05:04:44 +00:00
Matt Arsenault
94dac3bd7b AMDGPU: Move redundant setting of inst properties
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287311 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 04:42:59 +00:00
Matt Arsenault
cbafc5829d AMDGPU: Fix crash on illegal type for inlineasm
There are still crashes on non-MVT types in other
places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287310 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 04:42:57 +00:00
Peter Collingbourne
fde9b8bfc2 Object: Simplify; remove unnecessary use of unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 03:20:36 +00:00
Matthias Braun
3962c3afbc MachineOperand: Add dump() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 02:40:40 +00:00
Alexei Starovoitov
bc5bb8c0ae convert bpf assembler to look like kernel verifier output
since bpf instruction set was introduced people learned to
read and understand kernel verifier output whereas llvm asm
output stayed obscure and unknown. Convert llvm to emit
assembler text similar to kernel to avoid this discrepancy

Signed-off-by: Alexei Starovoitov <ast@kernel.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 02:32:35 +00:00
Craig Topper
3d85988107 [Docs][TableGen] Remove reference to tablegen supporting octal integers. It doesn't and hasn't for at least 9 years.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 02:28:50 +00:00
Craig Topper
fdec4f508b [AVX-512] Support FCOPYSIGN for v16f32 and v8f64
Summary:
This extends FCOPYSIGN support to 512-bit vectors.

I've also added tests to show what the 128-bit and 256-bit cases look like with broadcast loads.

Reviewers: delena, zvi, RKSimon, spatel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 02:25:34 +00:00