141187 Commits

Author SHA1 Message Date
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
Yichao Yu
dc5eb2165e Add an option to disable libedit
Summary: This should provide the function similar to `--disable-libedit` with the autotools build system, which seems to be missing from the commit (r200595) that adds this.

Reviewers: pcc, beanz

Subscribers: mgorny, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 01:25:49 +00:00
Justin Lebar
e65e5ddefe [CUDA] Update docs to indicate that MacOS is now supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 00:42:00 +00:00
Justin Lebar
46f85978dc [CUDA] Update docs; CUDA 8.0 is supported as of a while ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287289 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 00:41:40 +00:00
Davide Italiano
5ef12780dc [lli] Prefer exit(1) to return 1 for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 22:59:13 +00:00
Davide Italiano
9754b3ba85 [lli] Factor out error handling. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 22:58:13 +00:00
Dylan McKay
b28b8f21ef [ReleaseNotes] Mention the completion of the upstreaming of the AVR backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 22:26:09 +00:00
Petr Hosek
2545ab0251 [CMake] Error when LTO and lld are enabled on Darwin
lld on Darwin does not currently support LTO.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 20:22:49 +00:00
Simon Pilgrim
48bbdf7673 Fix spelling mistakes in Hexagon target comments. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 19:21:20 +00:00
Simon Pilgrim
cd5b3fa3e7 Fix spelling mistakes in X86 target comments. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287247 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 19:03:05 +00:00
Eugene Zelenko
9927ed3013 [CodeView] Fix some Clang-tidy modernize-use-default, modernize-use-override 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@287243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 18:11:21 +00:00
Kostya Serebryany
f6d63ccc90 [libFuzzer] better documentation for -fsanitize-coverage=trace-cmp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 17:31:54 +00:00
Anna Zaks
f29212fa7e [asan] Turn on Mach-O global metadata liveness tracking by default
This patch turns on the metadata liveness tracking since all known issues
have been resolved. The future has been implemented in
https://reviews.llvm.org/D16737 and enables support of dead code stripping
option on Mach-O platforms.

As part of enabling the feature, I also plan on reverting the following
patch to compiler-rt:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160704/369910.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 16:55:40 +00:00
Konstantin Zhuravlyov
1d609512ed Revert "AMDGPU: Enable ConstrainCopy DAG mutation"
This reverts commit r287146.

This breaks few conformance tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 16:41:49 +00:00
Daniil Fukalov
d5fb62aebe [SCEV] limit recursion depth of CompareSCEVComplexity
Summary:
CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled loop) and runs almost infinite time.

Added cache of "equal" SCEV pairs to earlier cutoff of further estimation. Recursion depth limit was also introduced as a parameter.

Reviewers: sanjoy

Subscribers: mzolotukhin, tstellarAMD, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 16:07:52 +00:00
Simon Pilgrim
ba41afe0a4 Wdocumentation fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287224 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 12:21:45 +00:00
Simon Pilgrim
c9799c0f2d [X86][SSE] Improve lowering of vXi64 multiply with known zero 32-bit halves
vXi64 multiplication is lowered into 3 calls of vpmuludq with the upper/lower 32-bit halves.

If any of these halves are zero then we can remove individual calls. Although there was isBuildVectorAllZeros code to do this I don't think it ever worked (maybe just for constant folded cases that don't seem to be tested for any longer).

This requires additional X86ISD support for computeKnownBitsForTargetNode, so far I've just added support for X86ISD::VZEXT (VPMOVZX* - helping the AVX2+ cases).

Partial fix for PR30845

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 12:14:49 +00:00
Simon Pilgrim
ace4c03e59 Fix spelling in comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 12:03:05 +00:00
Pavel Labath
b83576ebbd [cmake] Move LLVM_BUILD_STATIC check to an earlier point
Summary:
The motivation for this is to enable correct detection of dlopen() on Android.
Android does not provide a static version of libdl, so if we add the -static flag
after performing the check, it will succeed even though subsequent link steps
will fail. With this change we correctly detect the absence of libdl in a
LLVM_BUILD_STATIC build on Android.

The link itself still does not succeed because the code does not check the result
of this check properly, but I plan to fix that in a separate change.

Reviewers: beanz

Subscribers: danalbert, mgorny, srhines, tberghammer, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287220 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 11:22:23 +00:00
Pablo Barrio
189d9909bf [ARM] Relax restriction on variadic functions for tailcall optimization
Summary:
Variadic functions can be treated in the same way as normal functions
with respect to the number and types of parameters.

Reviewers: grosbach, olista01, t.p.northover, rengolin

Subscribers: javed.absar, aemerson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 10:56:58 +00:00
Oren Ben Simhon
92dbb1780d [X86] RegCall - Handling v64i1 in 32/64 bit target
Register Calling Convention defines a new behavior for v64i1 types.
This type should be saved in GPR.
However for 32 bit machine we need to split the value into 2 GPRs (because each is 32 bit).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 09:59:40 +00:00
Sanjoy Das
eaec8b3b2a Delete dead code and add asserts instead; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287214 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 07:29:43 +00:00
Sanjoy Das
74292e46d4 [ImplicitNullCheck] Fix an edge case where we were hoisting incorrectly
ImplicitNullCheck keeps track of one instruction that the memory
operation depends on that it also hoists with the memory operation.
When hoisting this dependency, it would sometimes clobber a live-in
value to the basic block we were hoisting the two things out of.  Fix
this by explicitly looking for such dependencies.

I also noticed two redundant checks on `MO.isDef()` in IsMIOperandSafe.
They're redundant since register MachineOperands are either Defs or Uses
-- there is no third kind.  I'll change the checks to asserts in a later
commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 07:29:40 +00:00
Craig Topper
03b8325e81 [X86] Fix formatting. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 05:59:55 +00:00
Craig Topper
20732e5b64 [X86] Add a test case where, due to a bug in selectScalarSSELoad, we fold the same load twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 05:37:39 +00:00
Dean Michael Berris
a685ab458d [XRay] Support AArch64 in LLVM
This patch adds XRay support in LLVM for AArch64 targets.
This patch is one of a series:

Clang: https://reviews.llvm.org/D26415
compiler-rt: https://reviews.llvm.org/D26413

Author: rSerge

Reviewers: rengolin, dberris

Subscribers: amehsan, aemerson, llvm-commits, iid_iunknown

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 05:15:37 +00:00
Chris Bieneman
fb21e4d6fc [CMake] [Darwin] Add support for debugging tablegen dependencies
This patch adds an option to the build system LLVM_DEPENDENCY_DEBUGGING. Over time I plan to extend this to do more complex verifications, but the initial patch causes compile errors wherever there is missing a dependency on intrinsics_gen.

Because intrinsics_gen is a compile-time dependency not a link-time dependency, everything that relies on the headers generated in intrinsics_gen needs an explicit dependency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 04:36:59 +00:00
Chris Bieneman
92cb3eecbd [CMake] NFC. Updating CMake dependency specifications
This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287206 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 04:36:50 +00:00
Konstantin Zhuravlyov
44a5962ac5 [AMDGPU] Add missing test for rL287203
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 04:33:20 +00:00
Konstantin Zhuravlyov
0c92298282 [AMDGPU] Custom lower f16 = fp_round f64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-17 04:28:37 +00:00