142850 Commits

Author SHA1 Message Date
Craig Topper
89464296cc [AVX-512] Add support for detecting 512-bit shuffles that contain a 128-bit subvector insertion from the lowest subvector of one of the sources.
These are best handled with a vinsert32x4 or vinsert64x2 instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290946 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 07:32:03 +00:00
Craig Topper
b059941e41 [AVX-512] Add more test cases for shuffles that should be handled with subvector insert instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 07:31:59 +00:00
Craig Topper
c5d7d75e0b [AVX-512] Fix a typo in a couple case names to match their behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 07:31:57 +00:00
Craig Topper
617aba4245 [AVX-512] Add avx512dq to the vector-shuffle-512-v16.ll test command lines in preparation for a future change that needs these features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 07:31:54 +00:00
Craig Topper
b8deefbcb2 [AVX-512] Simplify code for creating 512-bit SHUF128 operations.
We don't need two loops and we can safely assume assume and hardcode the size of the widened mask.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 07:31:51 +00:00
Peter Collingbourne
308b6dabdf Support: Add YAML I/O support for custom mappings.
This will be used to YAMLify parts of the module summary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 03:51:36 +00:00
Eric Christopher
fdd19a37e7 On a 64-bit system, the DWARFDebugLine::Row struct is 32 bytes. Each field has the following byte offsets:
0-7: Address
8-11: Line
12-13: Column
14-15: File
16-19: Isa
20-23: Discriminator
24+: bit fields

The packing is fine until the "Isa" field, which is an 8-bit int that occupies 4 bytes. We can instead move Discriminator into the 16-19 slot, and pack Isa into the 20-23 range along with the bit fields:

0-7: Address
8-11: Line
12-13: Column
14-15: File
16-19: Discriminator
20-23: Isa + bit fields

This layout is only 24 bytes. This 25% reduction in size may seem small but a large binary can have line tables with thousands of rows stored in a vector.

Patch by Simon Que!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290931 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 02:34:29 +00:00
David Majnemer
cc80c5c073 [InstCombine] Add a test for r290733
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 02:21:37 +00:00
David Majnemer
7f769abef4 [InstCombine] Move casts around shift operations
It is possible to perform a left shift before zero extending if the
shift would only shift out zeros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 02:21:34 +00:00
David Majnemer
7a2e65f6d7 [InstCombine] Combine adds across a zext
We can perform the following:
(add (zext (add nuw X, C1)), C2) -> (zext (add nuw X, C1+C2))

This is only possible if C2 is negative and C2 is greater than or equal to negative C1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290927 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 02:21:31 +00:00
Eugene Zelenko
8fa7bb4231 [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 02:02:05 +00:00
Greg Clayton
c8a8076d81 Correct the parent testing to avoid the special case where a DIE has a depth of 1
This test was testing that we could correctly find the parent of a DIE, but it was actually just testing the special case where a DIE's depth was 1. This corrects that error by adding an extra level into the the DWARF to ensure that we correctly get the parent by looking for the parent with a depth that is 1 less than the current depth.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290918 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 00:10:50 +00:00
Teresa Johnson
f7951f47fa [ThinLTO] Import type as decl only when non-null Identifier
As per post-commit review for r289993 (D27775), we can only safely
import a type as a decl if it has an Identifier, as the Name alone
is not enough to be unique across modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290915 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 23:19:29 +00:00
Zachary Turner
7d92286ad9 Fix the MSVC version check.
I'm not sure what determines the minor version, but it appears
that it's possible for a fully updated, release version of
VS2015 with Update 3 can go (at least) as low as 19.00.24213.1.
Updating the compiler version check to account for this so we
don't generate superfluous warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290914 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 23:12:36 +00:00
Matt Arsenault
d0222fed31 InstCombine: Fold fabs on select of constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290913 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 22:40:34 +00:00
Sanjay Patel
916822064c [InstCombine] use 'match' to reduce code bloat; NFCI
I wrote this patch before seeing the comment in:
https://reviews.llvm.org/D27114
...that suggests we should actually be canonicalizing the other way.

So just in case we decide this is the right way, we might as well
have a cleaner implementation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290912 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 22:25:31 +00:00
Ahmed Bougacha
d770fa9542 [CodeGen] Further simplify returned call operand logic. NFC.
As Pete points out in r290905, CallSite lets us avoid duplicating this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290909 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 21:42:43 +00:00
Lang Hames
b7c9e93afb [ExecutionEngine] Fix compile errors in OProfileJITEventListener.
Allows LLVM to build with LLVM_USE_OPROFILE=True.

Patch by Mark Dewing. Thanks Mark!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290908 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 21:39:43 +00:00
Ahmed Bougacha
26b44dde79 [CodeGen] Simplify logic that looks for returned call operands. NFC-ish.
Use getReturnedArgOperand() instead of rolling our own.  Note that it's
equivalent because there can only be one 'returned' operand.

The existing code was also incorrect: there already was awkward logic to
ignore callee/EH blocks, but operands can now also be operand bundles,
in which case we'll look for non-existent parameter attributes.

Unfortunately, this isn't observable in-tree, as it only crashes when
exercising the regular call lowering logic with operand bundles.
Still, this is a nice small cleanup anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 20:33:22 +00:00
Sanjay Patel
3b6c9c19a0 [InstCombine] tighten checks for tests of assume -> metadata transform; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290903 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 19:32:11 +00:00
Simon Pilgrim
0f01171f78 [X86][SSE] Add extra truncated arithmetic tests for D28219
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290902 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 19:18:07 +00:00
Adrian Prantl
639592de22 Add llvm-bcanalyzer support for new metadata node types.
Also sort the existing list by value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290901 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 19:17:49 +00:00
Xin Tong
efca1a3767 Enable disabled loopidiom test. Apparently we handle it now
Summary:
Enable disabled loopidiom test. Apparently we handle it now.
Maybe due to improvements to AA.

Reviewers: atrick, danielcdh, hfinkel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290900 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 19:08:05 +00:00
Kostya Serebryany
2aa90f609f [libFuzzer] disable -print_pcs by default (was enabled by mistake)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290899 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 18:51:28 +00:00
Michal Gorny
1b07ec5449 [ADT] APFloatBase: Prevent collapsing semPPCDoubleDouble and semBogus
Provide a distinct contents for semBogus and semPPCDoubleDouble in order
to prevent compilers from collapsing them to a single memory address,
while we heavily rely on every semantic having distinct address.

This happens if insecure optimization collapsing identical values is
enabled. As a result, APFloats of semBogus are indistinguishable from
semPPCDoubleDouble -- and whenever the move constructor is used, the old
value beings being incorrectly recognized as a semPPCDoubleDouble.

Since the values in semPPCDoubleDouble are not used anywhere,
we can easily solve this issue via altering the value of one of the
fields and therefore ensuring that the collapse can not occur.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290896 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 16:33:50 +00:00
Craig Topper
a3bfbbd5a2 [X86] Move 128-bit shuffle mask widening check into lowerV2X128VectorShuffle to reduce code duplication. Use the now available widened mask to simplify some code inside lowerV2X128VectorShuffle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290872 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 07:36:41 +00:00
Craig Topper
e89282e565 [AVX-512] Simplify the code added in r290870 to recognized 256-bit subvector inserts and avoid calling isShuffleEquivalent on a widened mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290871 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 07:36:39 +00:00
Craig Topper
556d6a5cf0 [AVX-512] Teach shuffle lowering to use vinsert instructions for shuffles corresponding to 256-bit subvector inserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290870 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 07:00:40 +00:00
Craig Topper
201727a609 [AVX-512] Teach EVEX to VEX conversion pass to handle VINSERT and VEXTRACT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290869 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:46:18 +00:00
Craig Topper
ddf520d8e6 [AVX-512] Re-generate tests that were updated for r290663 without using update_llc_test_checks.py so duplicate check lines weren't merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290868 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:46:10 +00:00
Craig Topper
6bb8971511 [X86] Remove trailing whitespace and an unnecessary line wrap. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290867 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:46:06 +00:00
Craig Topper
f53c0d3b52 [X86] Fix header comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290866 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:46:05 +00:00
Craig Topper
8fd6e6f017 [AVX-512] Add support for pushing bitcasts through INSERT_SUBVEC in order to select a masked operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290865 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:46:02 +00:00
Craig Topper
a3ed852d30 [AVX-512] Remove vinsert intrinsics and autoupgrade to native shufflevectors. There are some codegen problems here that I'll try to fix in future commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:45:57 +00:00
Craig Topper
be3e531ac2 [AVX-512] Remove vextract intrinsics and autoupgrade to native shufflevectors. This unfortunately generates some really terrible code without VLX support due to v2i1 and v4i1 not being legal.
Hopefully we can improve that in future patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 05:45:46 +00:00
Matt Arsenault
f61ad6ec11 InstCombine: Add fma with constant transforms
DAGCombine already does these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290860 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 04:32:35 +00:00
Matt Arsenault
ef6bacf05a InstCombine: Add fma + fabs/fneg transforms
fma (fneg x), (fneg y), z -> fma x, y, z
fma (fabs x), (fabs x), z -> fma x, x, z

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290859 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 04:32:31 +00:00
Dean Michael Berris
87ff4c129a [XRay] Merge instrumentation point table emission code into AsmPrinter.
Summary:
No need to have this per-architecture.  While there, unify 32-bit ARM's
behaviour with what changed elsewhere and start function names lowercase
as per the coding standards.  Individual entry emission code goes to the
entry's own class.

Fully tested on amd64, cross-builds on both ARMs and PowerPC.

Reviewers: dberris

Subscribers: aemerson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290858 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 04:30:21 +00:00
Sanjay Patel
0d837408ba [EarlyCSE] less else, more auto; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 00:16:24 +00:00
Sanjay Patel
aa2de25b71 [InstCombine] use combineMetadataForCSE instead of copying it; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290844 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 23:25:28 +00:00
Chris Bieneman
677ee43225 [CMake] Set HAVE_${runtime} before including any subdirectories
This should allow us to avoid most order dependence in the runtime library configurations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290834 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 20:33:33 +00:00
Xin Tong
059fad8157 Make sure total loop body weight is preserved in loop peeling
Summary:
Regardless how the loop body weight is distributed, we should preserve
total loop body weight. i.e. we should have same weight reaching the body of the loop
or its duplicates in peeled and unpeeled case.

Reviewers: mkuper, davidxl, anemet

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290833 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 20:27:23 +00:00
Michal Gorny
12ec8e1ce1 [cmake] Normalize LLVM_ENABLE_DIA_SDK to fix Windows tests
Attempts to fix Windows build breakage caused by r290818.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290832 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 20:22:45 +00:00
Daniel Berlin
03a167d742 NewGVN: Add a test case for equivalent phis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290830 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 19:55:13 +00:00
Daniel Berlin
4e6bfe2c74 NewGVN: Add forgotten testcase for PR 31483
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 19:49:20 +00:00
Daniel Berlin
34eb5e17b1 NewGVN: Clean up after removing possibility of null expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290828 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 19:49:17 +00:00
Sanjay Patel
0e0f143f17 fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290827 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 19:05:11 +00:00
Sanjay Patel
a7588d676e [ValueTracking] remove stale comments; NFC
The checks were improved with:
https://reviews.llvm.org/rL290194


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 19:04:07 +00:00
Davide Italiano
99835fb9ad [NewGVN] Fold single-use variable inside the assertion.
It placates some bots which complain because they compile the
assertion out and think the variable is unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290825 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 19:03:16 +00:00
Davide Italiano
ad8be6892b [NewGVN] Restore old code to placate buildbots.
Apparently my suggestion of using ternary doesn't really work
as clang complains about incompatible types on LHS and RHS. Some
GCC versions happen to accept the code but clang behaviour is
correct here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 18:41:34 +00:00