154311 Commits

Author SHA1 Message Date
Eli Friedman
d3822e422b [llvm-cov] Allow hiding instantiation/region coverage from summary tables
Region coverage is difficult to explain without going deep into how
coverage is implemented. Instantiation coverage is easier to explain,
but probably not useful in most cases (templates don't exist in C, and
most C++ code contains relatively few templates).

This patch adds the options "-show-region-summary" and
"-show-instantiation-summary" to allow hiding those columns.
"-show-instantiation-summary" is turned off by default.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312969 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 22:56:20 +00:00
Peter Collingbourne
1a8b825606 LowerTypeTests: Add import/export support for targets without absolute symbol constants.
The rationale is the same as for r312967.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312968 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 22:49:10 +00:00
Peter Collingbourne
37911b93a0 WholeProgramDevirt: Add import/export support for targets without absolute symbol constants.
Not all targets support the use of absolute symbols to export
constants. In particular, ARM has a wide variety of constant encodings
that cannot currently be relocated by linkers. So instead of exporting
the constants using symbols, export them directly in the summary.
The values of the constants are left as zeroes on targets that support
symbolic exports.

This may result in more cache misses when targeting those architectures
as a result of arbitrary changes in constant values, but this seems
somewhat unavoidable for now.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312967 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 22:34:42 +00:00
Vedant Kumar
d03e3c146e [llvm-cov] Don't attach exec counts to lines which start a skipped region
These lines by definition don't have an execution count.

This is the final part of the fix for:
https://bugs.llvm.org/show_bug.cgi?id=34166

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312955 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 21:31:32 +00:00
Sanjay Patel
7d56a780c0 [InstSimplify] fix some test names; NFC
Too much division...the quotient is the answer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 20:38:31 +00:00
Sanjay Patel
c18e8bc0df [InstSimplify] add tests for possible sdiv/srem simplifications; NFC
As noted in PR34517, the handling of signed div/rem is not on par with
unsigned div/rem. Signed is harder to reason about, but it should be
possible to handle at least some of these using the same technique that
we use for unsigned: use icmp logic to see if there's a relationship
between the quotient and divisor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 19:42:41 +00:00
Matt Arsenault
e4e1eed1d7 AMDGPU: Allow coldcc calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 18:54:20 +00:00
Petar Jovanovic
1f93574a10 [mips][microMIPS] add lapc instruction
Implement LAPC instruction for mips32r6, mips64r6 and micromips32r6.

Patch by Milos Stojanovic.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312934 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 18:34:04 +00:00
Hiroshi Yamauchi
b6b25740b7 Unmerge GEPs to reduce register pressure on IndirectBr edges.
Summary:
GEP merging can sometimes increase the number of live values and register
pressure across control edges and cause performance problems particularly if the
increased register pressure results in spills.

This change implements GEP unmerging around an IndirectBr in certain cases to
mitigate the issue. This is in the CodeGenPrepare pass (after all the GEP
merging has happened.)

With this patch, the Python interpreter loop runs faster by ~5%.

Reviewers: sanjoy, hfinkel

Reviewed By: hfinkel

Subscribers: eastig, junbuml, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312930 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 17:52:08 +00:00
Stanislav Mekhanoshin
46582be974 [AMDGPU] Produce madak and madmk from the two-address pass
These two instructions are normally selected, but when the
two address pass converts mac into mad we end up with the
mad where we could have one of these.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 17:13:57 +00:00
Craig Topper
ba57a4895d [X86] Remove portions of r275950 that are no longer needed with i1 not being a legal type
Summary:
r275950 added support for turning (trunc (X >> N) to i1) into BT(X, N). But that's no longer necessary now that i1 isn't legal.

This patch removes the support for that, but preserves some of the refactorings done in that commit.

Reviewers: guyblank, RKSimon, spatel, zvi

Reviewed By: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 16:16:48 +00:00
Craig Topper
6b4918d145 [SelectionDAG] Remove a check for type being a vector type after calling getShiftAmountTy. NFCI
getShiftAmountTy already returns the vector type when called for vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312924 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 16:15:39 +00:00
Zvi Rackover
9fe7bd2f47 X86 Tests: More AVX512 conversions tests. NFC
Adding more tests for AVX512 fp<->int conversions that were missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312921 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 15:54:38 +00:00
Marcello Maggioni
022ffdf29f [ScalarEvolution] Refactor forgetLoop() to improve performance
forgetLoop() has pretty bad performance because it goes over
the same instructions over and over again in particular when
nested loop are involved.
The refactoring changes the function to a not-recursive function
and reusing the allocation for data-structures and the Visited
set.

NFCI

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312920 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 15:44:20 +00:00
Matt Arsenault
9fb31c8ca3 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312919 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 15:23:22 +00:00
Simon Pilgrim
fa3963dcbd [X86][SSE] Add support for X86ISD::PACKSS to ComputeNumSignBitsForTargetNode
Helps improve combineLogicBlendIntoPBLENDV support by allowing us to peek into through PACKSS truncations of vector comparison results.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312916 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 14:03:47 +00:00
Tim Renouf
2c5cb5f335 [AMDGPU] exp should not be in WQM mode
A mrt exp with vm=1 must be in exact (non-WQM) mode, as it also exports
the exec mask as the valid mask to determine which pixels to render.

This commit marks any exp as needing to be in exact mode.

Actually, if there are multiple mrt exps, only one needs to have vm=1,
and only that one needs to be in exact mode. But that is an optimization
for another day.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312915 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 13:55:39 +00:00
Francis Ricci
48c5bd3c0d [TableGen] Ensure that __lsan_is_turned_off isn't removed by DCE in llvm-tblgen
Summary:
Since asan is linked dynamically on Darwin, the weak interface symbol
is removed by -Wl,-dead_strip.

Reviewers: kcc, compnerd, aaron.ballman

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312914 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 13:50:39 +00:00
Sanjay Patel
92ba92dfe4 [InstSimplify] reorder methods; NFC
I'm trying to refactor some shared code for integer div/rem,
but I keep having to scroll through fdiv. The FP ops have
nothing in common with the integer ops, so I'm moving FP
below everything else. 

While here, improve a couple of comments and fix some formatting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312913 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 13:34:27 +00:00
Simon Pilgrim
2a06de490f [X86][SSE] Add further test cases showing failure to compute sign bits through PACKSS
Suggested in D37680

Note: had to drop AVX512VL tests as there is an infinite loop in the new tests that needs further investigation (not relevant to D37680).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312910 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 12:18:43 +00:00
Gadi Haber
396198076d [X86][SKX][KNL] Updating several CodeGen tests to use the attr flag instead of mcpu flag
NFC.
 Updated 3 Codegen regression tests to use the -mattr flag instead of the -mcpu flags as follows:
 Instead of -mcpu=skx use -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq
 Instead of -mcpu=knl use -mattr=+avx512f

Reviewers: delena
Revision: https://reviews.llvm.org/D37674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312909 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 11:26:20 +00:00
Andre Vieira
8bb02cf4a4 [ARM] Enable the use of SVC anywhere in an IT block
Differential Revision: https://reviews.llvm.org/D37374


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312908 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 11:11:17 +00:00
Michael Zuckerman
9942f5143c [Interleved][Stride 3]Adding test for case the VF=64 target with AVX512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312907 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 10:57:15 +00:00
Simon Pilgrim
7a1158ac82 [X86][SSE] Add test showing failure to compute sign bits through PACKSS
Prevents combineLogicBlendIntoPBLENDV from merging to PBLENDV

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312906 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 10:50:03 +00:00
Dylan McKay
fe79297f6f [AVR] Enable the '__do_copy_data' function
Also enables '__do_clear_bss'.

These functions are automaticalled called by the CRT if they are
declared.

We need these to be called otherwise RAM will start completely
uninitialised, even though we need to copy RAM variables from progmem to
RAM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 10:32:51 +00:00
Igor Breger
5b272fa455 [GlobalISel][X86] G_ANYEXT support.
Summary: G_ANYEXT support

Reviewers: zvi, delena

Reviewed By: delena

Subscribers: rovka, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312903 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 09:41:13 +00:00
Ilya Biryukov
b7e5530c08 Fixed a typo in llvm-cov/deferred-region.cpp test.
Input redirection was using `2&>1` instead of `2>&1`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312902 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 09:22:44 +00:00
Tim Renouf
8b9e95cb87 AMDGPU: trivial comment change
... to check commit access for new committer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312900 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 08:31:32 +00:00
Roger Ferrer Ibanez
ceaa3f6434 [ARM] Use ADDCARRY / SUBCARRY
This is a preparatory step for D34515 and also is being recommitted as its
first version caused PR34045.

This change:
 - makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32
 - lowering is done by first converting the boolean value into the carry flag
   using (_, C) ← (ARMISD::ADDC R, -1) and converted back to an integer value
   using (R, _) ← (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two
   operations does the actual addition.
 - for subtraction, given that ISD::SUBCARRY second result is actually a
   borrow, we need to invert the value of the second operand and result before
   and after using ARMISD::SUBE. We need to invert the carry result of
   ARMISD::SUBE to preserve the semantics.
 - given that the generic combiner may lower ISD::ADDCARRY and
   ISD::SUBCARRYinto ISD::UADDO and ISD::USUBO we need to update their lowering
   as well otherwise i64 operations now would require branches. This implies
   updating the corresponding test for unsigned.
 - add new combiner to remove the redundant conversions from/to carry flags
   to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) → C
 - fixes PR34045

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312898 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 07:38:05 +00:00
Elena Demikhovsky
c1e17d7b87 Fixed a bug in splitting Scatter operation in the Type Legalizer.
After the split of the Scatter operation, the order of the new instructions is well defined - Lo goes before Hi. Otherwise the semantic of Scatter (from LSB to MSB) is broken.
I'm chaining 2 nodes to prevent reordering.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312894 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 06:18:15 +00:00
Lang Hames
038c6e0a2c [ORC] Kill off a dead typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312893 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11 01:09:46 +00:00
Simon Pilgrim
4c5a286d7b Use llvm_unreachable for unknown TargetCostKind.
TargetTransformInfo::getInstructionCost's switch covers all TargetCostKind cases so we shouldn't return for a default case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312888 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 18:42:23 +00:00
Simon Pilgrim
ae1a1a7f1b [X86][SSE] Tidyup + clang-format combineX86ShuffleChain call. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312887 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 18:18:45 +00:00
Simon Pilgrim
58716e880b [X86][SSE] Move combineTo call out of combineX86ShufflesConstants. NFCI.
Move towards making it possible to use the shuffle combines for cases where we don't want to call DCI.CombineTo() with the result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312886 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 18:10:49 +00:00
Sanjay Patel
44e68c6bb8 [InstSimplify] refactor udiv/urem code and add tests; NFCI
This removes some duplicated code and makes it easier to support signed div/rem
in a similar way if we want to do that. Note that the existing comments were not
accurate - we don't need a constant divisor to simplify; icmp simplification does
more than that. But as the added tests show, it could go even further.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312885 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 17:55:08 +00:00
Simon Pilgrim
45694861ec [X86][SSE] Move combineTo call out of combineX86ShuffleChain. NFCI.
First step towards making it possible to use the shuffle combines for cases where we don't want to call DCI.CombineTo() with the result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312884 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 14:06:41 +00:00
Elena Demikhovsky
e38879830d Added a test that demonstrates a ug in Scatter scheduling.
The bug is going to be fixed in an upcomming patch.
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312883 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 13:20:42 +00:00
Coby Tayree
3edcac7764 [X86][X86AsmParser] adding const on InlineAsmIdentifierInfo in CreateMemForInlineAsm. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312881 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 12:21:24 +00:00
Uriel Korach
73e68366a4 Revert "adding autoUpgrade support to broadcast[f|i]32x2 intrinsics"
This reverts commit r312879 - An accidental partial commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312880 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 09:07:21 +00:00
Uriel Korach
986634ba4e adding autoUpgrade support to broadcast[f|i]32x2 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312879 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 08:40:13 +00:00
Uriel Korach
7e99d39a08 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312878 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 08:31:22 +00:00
Sanjoy Das
2ff7d65548 [SCEV] Re-arrange public and private sections to be contiguous; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312876 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-10 03:54:22 +00:00
Simon Pilgrim
f9d4e1794d [X86] Add v2i4 store test case (PR20012)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312874 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 20:28:50 +00:00
Simon Pilgrim
5037d51d6d [X86] Add v2i2 test case (PR20011)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312873 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 20:22:35 +00:00
Simon Pilgrim
8b80450d25 [X86][FMA] Regenerate FMA tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312871 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 19:25:59 +00:00
Nuno Lopes
fe353a0cbf Merge isKnownNonNull into isKnownNonZero
It now knows the tricks of both functions.
Also, fix a bug that considered allocas of non-zero address space to be always non null

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312869 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 18:23:11 +00:00
Simon Pilgrim
a22f9f2405 [X86][SSE] i32 vector multiplications test cases from PR6399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312868 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 18:18:17 +00:00
Simon Pilgrim
ce6571eae6 [X86][MOVBE] Fix typo in MOVBE scheduling test names
Copy+paste is not your friend

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312867 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 17:52:44 +00:00
Craig Topper
9080ea8806 [X86] Don't disable slow INC/DEC if optimizing for size
Summary:
Just because INC/DEC is a little slow on some processors doesn't mean we shouldn't prefer it when optimizing for size.

This appears to match gcc behavior.

Reviewers: chandlerc, zvi, RKSimon, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312866 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 17:11:59 +00:00
MinSeong Kim
491dc19ec4 [CMake] Update GetSVN.cmake to handle repo
Summary:
When repo is used with git, 'clang --version' option does not display
the correct revision information (i.e. git hash on TOP) as the following:

clang version 6.0.0 --->
clang version 6.0.0 (clang version) (llvm version)

This is because repo also creates .git/svn folder as git-svn does and
this makes repo with git uses "git svn info" command, which is only for
git-svn, to retrieve its revision information, making null for the info.
To correctly distinguish between git-svn and repo with git, the folder
hierarchy to specify for git-svn should be .git/svn/refs as the "git svn
info" command depends on the revision data in .git/svn/refs. This patch
in turn makes repo with git passes through to the third macro,
get_source_info_git, in  get_source_info function, resulting in correctly
retrieving the revision information for repo with git using "git log ..."
command.

This patch is tested with git, svn, git-svn, and repo with git.

Reviewers: llvm-commits, probinson, rnk

Reviewed By: rnk

Subscribers: rnk, mehdi_amini, beanz, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09 14:17:52 +00:00