]> granicus.if.org Git - llvm/log
llvm
7 years agoMake test target-specific
Matthew Simpson [Tue, 16 May 2017 15:33:22 +0000 (15:33 +0000)]
Make test target-specific

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303178 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix test case to unbreak bots
Matthew Simpson [Tue, 16 May 2017 15:20:27 +0000 (15:20 +0000)]
Fix test case to unbreak bots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303176 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Avoid potentential division by zero when selecting IC
Matthew Simpson [Tue, 16 May 2017 14:43:55 +0000 (14:43 +0000)]
[LV] Avoid potentential division by zero when selecting IC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303174 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[coroutines] Handle unwind edge splitting
Gor Nishanov [Tue, 16 May 2017 14:11:39 +0000 (14:11 +0000)]
[coroutines] Handle unwind edge splitting

Summary:
RewritePHIs algorithm used in building of CoroFrame inserts a placeholder
```
%placeholder = phi [%val]
```
on every edge leading to a block starting with PHI node with multiple incoming edges,
so that if one of the incoming values was spilled and need to be reloaded, we have a
place to insert a reload. We use SplitEdge helper function to split the incoming edge.

SplitEdge function does not deal with unwind edges comping into a block with an EHPad.

This patch adds an ehAwareSplitEdge function that can correctly split the unwind edge.

For landing pads, we clone the landing pad into every edge block and replace the original
landing pad with a PHI collection the values from all incoming landing pads.

For WinEH pads, we keep the original EHPad in place and insert cleanuppad/cleapret in the
edge blocks.

Reviewers: majnemer, rnk

Reviewed By: majnemer

Subscribers: EricWF, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303172 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DWARF] - Add RelocAddrEntry for cleanup. NFCi.
George Rimar [Tue, 16 May 2017 14:05:45 +0000 (14:05 +0000)]
[DWARF] - Add RelocAddrEntry for cleanup. NFCi.

Was mentioned as possible cleanup during review of D33184.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303171 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[GlobalISel][X86] Split memop test file. NFC
Igor Breger [Tue, 16 May 2017 13:37:31 +0000 (13:37 +0000)]
[GlobalISel][X86] Split memop test file. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303169 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix an improperly placed curly bracket. NFC.
Chad Rosier [Tue, 16 May 2017 12:43:23 +0000 (12:43 +0000)]
Fix an improperly placed curly bracket. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303165 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRange...
George Rimar [Tue, 16 May 2017 12:30:59 +0000 (12:30 +0000)]
[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector.

Recommit of r303159 "[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector"
All places were shitched to use DWARFAddressRange now.

Suggested during review of D33184.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303163 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r303159 "[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for...
George Rimar [Tue, 16 May 2017 12:05:03 +0000 (12:05 +0000)]
Revert r303159 "[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector."

Something went wrong, it broke BB.
http://green.lab.llvm.org/green//job/clang-stage1-cmake-RA-incremental_build/38477/consoleFull#-200034420049ba4694-19c4-4d7e-bec5-911270d8a58c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303162 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRange...
George Rimar [Tue, 16 May 2017 11:54:19 +0000 (11:54 +0000)]
[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector.

Suggested during review of D33184.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303159 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LTO] Print time-passes information at conclusion of LTO codegen
James Henderson [Tue, 16 May 2017 09:43:21 +0000 (09:43 +0000)]
[LTO] Print time-passes information at conclusion of LTO codegen

The information collected when requested by -time-passes is only printed when
llvm_shutdown is called at the moment. This means that when linking against the LTO
library dynamically and using the C interface, it is not possible to see the timing
information, because llvm_shutdown cannot be called. This change modifies the LTO
code generation functions for both regular LTO and thin LTO to explicitly print and
reset the timing information.

I have tested that this works with our proprietary linker. However, as this relies
on a specific method of building and linking against the LTO library, I'm not sure
how or if this can be tested in the LLVM testsuite.

Reviewed by: mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303152 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SCEV] Fix sorting order for AddRecExprs
Max Kazantsev [Tue, 16 May 2017 07:27:06 +0000 (07:27 +0000)]
[SCEV] Fix sorting order for AddRecExprs

The existing sorting order in defined CompareSCEVComplexity sorts AddRecExprs
by loop depth, but does not pay attention to dominance of loops. This can
lead us to the following buggy situation:

for (...) { // loop1
  op1 = {A,+,B}
}
for (...) { // loop2
  op2 = {A,+,B}
  S = add op1, op2
}

In this case there is no guarantee that in operand list of S the op2 comes
before op1 (loop depth is the same, so they will be sorted just
lexicographically), so we can incorrectly treat S as a recurrence of loop1,
which is wrong.

This patch changes the sorting logic so that it places the dominated recs
before the dominating recs. This ensures that when we pick the first recurrency
in the operands order, it will be the bottom-most in terms of domination tree.
The attached test set includes some tests that produce incorrect SCEV
estimations and crashes with oldlogic.

Reviewers: sanjoy, reames, apilipenko, anna

Reviewed By: sanjoy

Subscribers: llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303148 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[CorrelatedValuePropagation] Don't use -> to call a static method of ConstantRange...
Craig Topper [Tue, 16 May 2017 07:05:38 +0000 (07:05 +0000)]
[CorrelatedValuePropagation] Don't use -> to call a static method of ConstantRange. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303147 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNewGVN: Use StoreExpression StoredValue instead of looking it up again, since it...
Daniel Berlin [Tue, 16 May 2017 06:06:15 +0000 (06:06 +0000)]
NewGVN: Use StoreExpression StoredValue instead of looking it up again, since it was already looked up when it was created

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303144 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoNewGVN: Formatting fixes
Daniel Berlin [Tue, 16 May 2017 06:06:12 +0000 (06:06 +0000)]
NewGVN: Formatting fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303143 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "[NewGVN] Replace predicate info leftovers."
Davide Italiano [Tue, 16 May 2017 05:51:21 +0000 (05:51 +0000)]
Revert "[NewGVN] Replace predicate info leftovers."

It's breaking the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303142 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[NewGVN] Replace predicate info leftovers.
Davide Italiano [Tue, 16 May 2017 05:23:23 +0000 (05:23 +0000)]
[NewGVN] Replace predicate info leftovers.

Fixes PR32945.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303141 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPUCodeGen: Fix warnings in r303111. [-Wunused-variable]
NAKAMURA Takumi [Tue, 16 May 2017 04:01:23 +0000 (04:01 +0000)]
AMDGPUCodeGen: Fix warnings in r303111. [-Wunused-variable]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303137 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoIR: Give function GlobalValue::getRealLinkageName() a less misleading name: dropLLVMM...
Peter Collingbourne [Tue, 16 May 2017 00:39:01 +0000 (00:39 +0000)]
IR: Give function GlobalValue::getRealLinkageName() a less misleading name: dropLLVMManglingEscape().

This function gives the wrong answer on some non-ELF platforms in some
cases. The function that does the right thing lives in Mangler.h. To try to
discourage people from using this function, give it a different name.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303134 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] add tests for PR32791; NFC
Sanjay Patel [Mon, 15 May 2017 23:59:28 +0000 (23:59 +0000)]
[InstCombine] add tests for PR32791; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303133 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ShrinkWrapping] Handle restores on no-return paths
Francis Visoiu Mistrih [Mon, 15 May 2017 23:13:35 +0000 (23:13 +0000)]
[ShrinkWrapping] Handle restores on no-return paths

Shrink-wrapping uses post-dominators to find a restore point that
post-dominates all the uses of CSR / stack.

The way dominator trees are modeled in LLVM today is that unreachable
blocks are not present in a generic dominator tree, so, an unreachable node is
dominated by anything: include/llvm/Support/GenericDomTree.h:467.

Since for post-dominators, a no-return block is considered
"unreachable", calling findNearestCommonDominator on an unreachable node
A and a non-unreachable node B, will return B, which can be false. If we
find such node, we bail out since there is no good restore point
available.

rdar://problem/30186931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303130 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix tests on Windows
Kostya Serebryany [Mon, 15 May 2017 22:55:00 +0000 (22:55 +0000)]
[libFuzzer] fix tests on Windows

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303128 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] add tests for unnecessary mask of shifted values; NFC
Sanjay Patel [Mon, 15 May 2017 22:54:37 +0000 (22:54 +0000)]
[InstSimplify] add tests for unnecessary mask of shifted values; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303127 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix memory leak
Xinliang David Li [Mon, 15 May 2017 22:43:52 +0000 (22:43 +0000)]
Fix memory leak

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303126 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] improve the afl driver and it's tests. Make it possible to run individual...
Kostya Serebryany [Mon, 15 May 2017 22:38:29 +0000 (22:38 +0000)]
[libFuzzer] improve the afl driver and it's tests. Make it possible to run individual inputs with afl driver

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303125 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix git command line in the Getting Started guide.
Rui Ueyama [Mon, 15 May 2017 22:32:34 +0000 (22:32 +0000)]
Fix git command line in the Getting Started guide.

By default, git creates "llvm-project-20170507" directory,
but we want to create "llvm-project" directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303124 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd "REQUIRES:" to the last few tests that use target specific intrinsics
Justin Bogner [Mon, 15 May 2017 22:15:22 +0000 (22:15 +0000)]
Add "REQUIRES:" to the last few tests that use target specific intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303123 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] Kill now unused phiInfoElementGetDebugLoc(). NFCI.
Davide Italiano [Mon, 15 May 2017 22:10:15 +0000 (22:10 +0000)]
[AMDGPU] Kill now unused phiInfoElementGetDebugLoc(). NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303122 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[APInt] Simplify a for loop initialization based on the fact that 'n' is known to...
Craig Topper [Mon, 15 May 2017 22:01:03 +0000 (22:01 +0000)]
[APInt] Simplify a for loop initialization based on the fact that 'n' is known to be 1 by an earlier 'if'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303120 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).
Eugene Zelenko [Mon, 15 May 2017 21:57:41 +0000 (21:57 +0000)]
[IR] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303119 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAArch64: use linker-private symbols for globals in MachO.
Tim Northover [Mon, 15 May 2017 21:51:38 +0000 (21:51 +0000)]
AArch64: use linker-private symbols for globals in MachO.

We don't use section-relative relocations on AArch64, so all symbols must be at
least visible to the linker (i.e. properly global or l_whatever, but not
L_whatever).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303118 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoPR32288: Describe a bool parameter's DWARF location with a simple register
David Blaikie [Mon, 15 May 2017 21:34:01 +0000 (21:34 +0000)]
PR32288: Describe a bool parameter's DWARF location with a simple register

There's no need (& a bit incorrect) to mask off the high bits of the
register reference when describing a simple bool value.

Reviewers: aprantl

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303117 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SLP] Enable 64-bit wide vectorization on AArch64
Adam Nemet [Mon, 15 May 2017 21:15:01 +0000 (21:15 +0000)]
[SLP] Enable 64-bit wide vectorization on AArch64

ARM Neon has native support for half-sized vector registers (64 bits).  This
is beneficial for example for 2D and 3D graphics.  This patch adds the option
to lower MinVecRegSize from 128 via a TTI in the SLP Vectorizer.

*** Performance Analysis

This change was motivated by some internal benchmarks but it is also
beneficial on SPEC and the LLVM testsuite.

The results are with -O3 and PGO.  A negative percentage is an improvement.
The testsuite was run with a sample size of 4.

** SPEC

* CFP2006/482.sphinx3  -3.34%

A pretty hot loop is SLP vectorized resulting in nice instruction reduction.
This used to be a +22% regression before rL299482.

* CFP2000/177.mesa     -3.34%
* CINT2000/256.bzip2   +6.97%

My current plan is to extend the fix in rL299482 to i16 which brings the
regression down to +2.5%.  There are also other problems with the codegen in
this loop so there is further room for improvement.

** LLVM testsuite

* SingleSource/Benchmarks/Misc/ReedSolomon               -10.75%

There are multiple small SLP vectorizations outside the hot code.  It's a bit
surprising that it adds up to 10%.  Some of this may be code-layout noise.

* MultiSource/Benchmarks/VersaBench/beamformer/beamformer -8.40%

The opt-viewer screenshot can be seen at F3218284.  We start at a colder store
but the tree leads us into the hottest loop.

* MultiSource/Applications/lambda-0.1.3/lambda            -2.68%
* MultiSource/Benchmarks/Bullet/bullet                    -2.18%

This is using 3D vectors.

* SingleSource/Benchmarks/Shootout-C++/Shootout-C++-lists +6.67%

Noise, binary is unchanged.

* MultiSource/Benchmarks/Ptrdist/anagram/anagram          +4.90%

There is an additional SLP in the cold code.  The test runs for ~1sec and
prints out over 2000 lines. This is most likely noise.

* MultiSource/Applications/aha/aha                        +1.63%
* MultiSource/Applications/JM/lencod/lencod               +1.41%
* SingleSource/Benchmarks/Misc/richards_benchmark         +1.15%

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303116 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r302678 "[AArch64] Enable use of reduction intrinsics."
Hans Wennborg [Mon, 15 May 2017 20:59:32 +0000 (20:59 +0000)]
Revert r302678 "[AArch64] Enable use of reduction intrinsics."

This caused PR33053.

Original commit message:

> The new experimental reduction intrinsics can now be used, so I'm enabling this
> for AArch64. We will need this for SVE anyway, so it makes sense to do this for
> NEON reductions as well.
>
> The existing code to match shufflevector patterns are replaced with a direct
> lowering of the reductions to AArch64-specific nodes. Tests updated with the
> new, simpler, representation.
>
> Differential Revision: https://reviews.llvm.org/D32247

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303115 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[asan] Better workaround for gold PR19002.
Evgeniy Stepanov [Mon, 15 May 2017 20:43:42 +0000 (20:43 +0000)]
[asan] Better workaround for gold PR19002.

See the comment for more details. Test in a follow-up CFE commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303113 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRe-submit AMDGPUMachineCFGStructurizer.
Jan Sjodin [Mon, 15 May 2017 20:18:37 +0000 (20:18 +0000)]
Re-submit AMDGPUMachineCFGStructurizer.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303111 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAArch64: diagnose unrecognized features in .cpu directive.
Tim Northover [Mon, 15 May 2017 19:42:15 +0000 (19:42 +0000)]
AArch64: diagnose unrecognized features in .cpu directive.

We were silently ignoring any features we couldn't match up, which led to
errors in an inline asm block missing the conventional "\n\t".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303108 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[NewGVN] Remove unused setDefiningExpr(). NFCI.
Davide Italiano [Mon, 15 May 2017 19:35:40 +0000 (19:35 +0000)]
[NewGVN] Remove unused setDefiningExpr(). NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303107 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] restrict icmp fold with 2 sdiv exact operands (PR32949)
Sanjay Patel [Mon, 15 May 2017 19:27:53 +0000 (19:27 +0000)]
[InstCombine] restrict icmp fold with 2 sdiv exact operands (PR32949)

This is the InstCombine counterpart to D32954.
I added some comments about the code duplication in:
rL302436

Alive-based verification:
http://rise4fun.com/Alive/dPw

This is a 2nd fix for the problem reported in:
https://bugs.llvm.org/show_bug.cgi?id=32949

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303105 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] restrict icmp fold with 2 sdiv exact operands (PR32949)
Sanjay Patel [Mon, 15 May 2017 19:16:49 +0000 (19:16 +0000)]
[InstSimplify] restrict icmp fold with 2 sdiv exact operands (PR32949)

These folds were introduced with https://reviews.llvm.org/rL127064 as part of solving:
https://bugs.llvm.org/show_bug.cgi?id=9343

As shown here:
http://rise4fun.com/Alive/C8
...however, the sdiv exact case needs a stronger predicate.

I opted for duplicated code instead of adding another fallthrough because I think that's
easier to read (and edit in case we need/want to restrict/loosen the predicates any more).

This should fix:
https://bugs.llvm.org/show_bug.cgi?id=32949
https://bugs.llvm.org/show_bug.cgi?id=32948

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303104 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThe patch adds CTLZ idiom recognition.
Evgeny Stupachenko [Mon, 15 May 2017 19:08:56 +0000 (19:08 +0000)]
The patch adds CTLZ idiom recognition.

Summary:

The following loops should be recognized:
i = 0;
while (n) {
  n = n >> 1;
  i++;
  body();
}
use(i);

And replaced with builtin_ctlz(n) if body() is empty or
for CPUs that have CTLZ instruction converted to countable:

for (j = 0; j < builtin_ctlz(n); j++) {
  n = n >> 1;
  i++;
  body();
}
use(builtin_ctlz(n));

Reviewers: rengolin, joerg

Differential Revision: http://reviews.llvm.org/D32605

From: Evgeny Stupachenko <evstupac@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303102 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[NewGVN] Fix verification of MemoryPhis in verifyMemoryCongruency().
Davide Italiano [Mon, 15 May 2017 18:50:53 +0000 (18:50 +0000)]
[NewGVN] Fix verification of MemoryPhis in verifyMemoryCongruency().

verifyMemoryCongruency() filters out trivially dead MemoryDef(s),
as we find them immediately dead, before moving from TOP to a new
congruence class.
This fixes the same problem for PHI(s) skipping MemoryPhis if all
the operands are dead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303100 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][Falkor] Fix sched details for FMOV
Geoff Berry [Mon, 15 May 2017 18:50:22 +0000 (18:50 +0000)]
[AArch64][Falkor] Fix sched details for FMOV

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303099 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert 303091.
Jan Sjodin [Mon, 15 May 2017 18:39:47 +0000 (18:39 +0000)]
Revert 303091.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303098 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd support for handling ifuncs to GlobalValue::getBaseObject
Teresa Johnson [Mon, 15 May 2017 18:28:29 +0000 (18:28 +0000)]
Add support for handling ifuncs to GlobalValue::getBaseObject

Summary:
All GlobalIndirectSymbol types (not just GlobalAlias) should return
their base object.

Without this patch LTO would warn "Unable to determine comdat of
alias!" for an ifunc.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303096 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SCEV] Use copy initialization of APInts instead of direct initialization.
Craig Topper [Mon, 15 May 2017 18:14:16 +0000 (18:14 +0000)]
[SCEV] Use copy initialization of APInts instead of direct initialization.

This is based on post commit feed back from r302769.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303092 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd AMDGPUMachineCFGStructurizer.
Jan Sjodin [Mon, 15 May 2017 18:13:56 +0000 (18:13 +0000)]
Add AMDGPUMachineCFGStructurizer.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303091 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] use m_OneUse to reduce code; NFCI
Sanjay Patel [Mon, 15 May 2017 18:08:17 +0000 (18:08 +0000)]
[InstCombine] use m_OneUse to reduce code; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303090 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian...
Kostya Serebryany [Mon, 15 May 2017 17:39:42 +0000 (17:39 +0000)]
[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian Holler. This also fixes a logical bug, which however does not affect the libFuzzer's ability too much (I wasn't able to create a differentiating test)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303087 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCodeGen: BlockPlacement: Increase tail duplication size for O3.
Kyle Butt [Mon, 15 May 2017 17:30:47 +0000 (17:30 +0000)]
CodeGen: BlockPlacement: Increase tail duplication size for O3.

At O3 we are more willing to increase size if we believe it will improve
performance. The current threshold for tail-duplication of 2 instructions is
conservative, and can be relaxed at O3.

Benchmark results:
llvm test-suite:
6% improvement in aha, due to duplication of loop latch
3% improvement in hexxagon

2% slowdown in lpbench. Seems related, but couldn't completely diagnose.

Internal google benchmark:
Produces 4% improvement on internal google protocol buffer serialization
benchmarks.

Differential-Revision: https://reviews.llvm.org/D32324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303084 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[NVPTX] Don't flag StoreParam/LoadParam memory chain operands as ReadMem/WriteMem...
Simon Pilgrim [Mon, 15 May 2017 17:17:44 +0000 (17:17 +0000)]
[NVPTX] Don't flag StoreParam/LoadParam memory chain operands as ReadMem/WriteMem (PR32146)

Follow up to D33147

NVPTXTargetLowering::LowerCall was trusting the default argument values.

Fixes another 17 of the NVPTX '-verify-machineinstrs with EXPENSIVE_CHECKS' errors in PR32146.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303082 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agobuild_llvm_package.bat: Minor updates
Hans Wennborg [Mon, 15 May 2017 16:50:48 +0000 (16:50 +0000)]
build_llvm_package.bat: Minor updates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303080 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd an extra test for archive symbol tables.
Rafael Espindola [Mon, 15 May 2017 15:56:23 +0000 (15:56 +0000)]
Add an extra test for archive symbol tables.

The table should include only defined symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303075 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SLPVectorizer][X86] Add vectorization tests for vXi64/vXi32/vXi16/VXi8 add/sub/mul
Simon Pilgrim [Mon, 15 May 2017 15:48:15 +0000 (15:48 +0000)]
[SLPVectorizer][X86] Add vectorization tests for vXi64/vXi32/vXi16/VXi8 add/sub/mul

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303074 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Enable FeatureFuseAES on Cortex-A72.
Florian Hahn [Mon, 15 May 2017 15:15:22 +0000 (15:15 +0000)]
[AArch64] Enable FeatureFuseAES on Cortex-A72.

This patch enables fusing dependent AESE/AESMC and AESD/AESIMC
instruction pairs on Cortex-A72, as recommended in the Software
Optimization Guide, section 4.10.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303073 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU][MC] Corrected several VI opcodes to avoid printing _e64
Dmitry Preobrazhensky [Mon, 15 May 2017 14:28:23 +0000 (14:28 +0000)]
[AMDGPU][MC] Corrected several VI opcodes to avoid printing _e64

See bug 32936: https://bugs.llvm.org//show_bug.cgi?id=32936

Reviewers: artem.tamazov, vpykhtin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303070 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SLPVectorizer][X86] Add vectorization tests for vXi64/vXi32/vXi16/VXi8 shifts
Simon Pilgrim [Mon, 15 May 2017 14:27:11 +0000 (14:27 +0000)]
[SLPVectorizer][X86] Add vectorization tests for vXi64/vXi32/vXi16/VXi8 shifts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303069 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoTest commit.
Dinar Temirbulatov [Mon, 15 May 2017 13:14:04 +0000 (13:14 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303059 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU][MC] Removed V_MQSAD_U16_U8
Dmitry Preobrazhensky [Mon, 15 May 2017 12:37:03 +0000 (12:37 +0000)]
[AMDGPU][MC] Removed V_MQSAD_U16_U8

This instruction does not really exist

See Bug 33018: https://bugs.llvm.org//show_bug.cgi?id=33018

Reviewers: vpykhtin, artem.tamazov

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303055 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ARM] Mark LEApcrel instructions as isAsCheapAsAMove
John Brawn [Mon, 15 May 2017 11:57:54 +0000 (11:57 +0000)]
[ARM] Mark LEApcrel instructions as isAsCheapAsAMove

Doing this means that if an LEApcrel is used in two places we will rematerialize
instead of generating two MOVs. This is particularly useful for printfs using
the same format string, where we want to generate an address into a register
that's going to get corrupted by the call.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303054 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ARM] Mark LEApcrel as not having side effects
John Brawn [Mon, 15 May 2017 11:50:21 +0000 (11:50 +0000)]
[ARM] Mark LEApcrel as not having side effects

Doing this lets us hoist it out of loops, and I've also marked it as
rematerializable the same as the thumb1 and thumb2 counterparts.

It looks like it being marked as such was just a mistake, as the commit that
made that change only mentions LEApcrelJT and in thumb1 and thumb2 only the
LEApcrelJT instructions were marked as having side-effects, so it looks like
the intent was to only mark LEApcrelJT as having side-effects but LEApcrel was
accidentally marked as such also.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303053 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DWARF] - Speedup handling of relocations in DWARFContextInMemory.
George Rimar [Mon, 15 May 2017 11:45:28 +0000 (11:45 +0000)]
[DWARF] - Speedup handling of relocations in DWARFContextInMemory.

I am working on a speedup of building .gdb_index in LLD and
noticed that relocations that are proccessed in DWARFContextInMemory often uses
the same symbol in a row. This patch introduces caching to reduce the relocations
proccessing time.

For benchmark,
I took debug LLC binary objects configured with -ggnu-pubnames and linked it using LLD.

Link time without --gdb-index is about 4,45s.
Link time with --gdb-index: a) Without patch: 19,16s b) With patch: 15,52s
That means time spent on --gdb-index in this configuration is
19,16s - 4,45s = 14,71s (without patch) vs 15,52s - 4,45s = 11,07s (with patch).

Differential revision: https://reviews.llvm.org/D31136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303051 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics...
Ayman Musa [Mon, 15 May 2017 11:30:54 +0000 (11:30 +0000)]
[X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option.

Currently, when masked load, store, gather or scatter intrinsics are used, we check in CodeGenPrepare pass if the subtarget support these intrinsics, if not we replace them with scalar code - this is a functional transformation not an optimization (not optional).

CodeGenPrepare pass does not run when the optimization level is set to CodeGenOpt::None (-O0).

Functional transformation should run with all optimization levels, so here I created a new pass which runs on all optimization levels and does no more than this transformation.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303050 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[NVPTX] Don't rely on default arguments to SelectionDAG::getMemIntrinsicNode. NFC.
Simon Pilgrim [Mon, 15 May 2017 10:47:48 +0000 (10:47 +0000)]
[NVPTX] Don't rely on default arguments to SelectionDAG::getMemIntrinsicNode. NFC.

NFC followup to D33147, this explicitly sets all the arguments (instead of relying on the defaults) to SelectionDAG::getMemIntrinsicNode to help identify -verify-machineinstrs issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303047 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[TableGen] Add EncoderMethod to RegisterOperand
Sam Kolton [Mon, 15 May 2017 10:13:07 +0000 (10:13 +0000)]
[TableGen] Add EncoderMethod to RegisterOperand

Reviewers: stoklund, grosbach, vpykhtin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303044 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RegisterBankInfo] Remove overly-agressive asserts
Tom Stellard [Mon, 15 May 2017 09:52:33 +0000 (09:52 +0000)]
[RegisterBankInfo] Remove overly-agressive asserts

Summary:
We were asserting in RegisterBankInfo if RBI.copyCost() returns
UINT_MAX.  This is OK for RegBankSelect::Mode::Fast since we only
try one instruction mapping and can't recover from this, but for
RegBankSelect::Mode::Greedy we will be considering multiple
instruction mappings, so we can recover if we see a UNIT_MAX copy
cost.

The copy cost for one pair of register banks in the AMDGPU backend
will be UNIT_MAX, so this patch will prevent AMDGPU tests from
breaking.

Reviewers: ab, qcolombet, t.p.northover, dsanders

Reviewed By: qcolombet

Subscribers: tpr, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303043 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoCMake: Fix docs-llvm-man target when clang+llvm is in the same source tree
Tom Stellard [Mon, 15 May 2017 09:34:23 +0000 (09:34 +0000)]
CMake: Fix docs-llvm-man target when clang+llvm is in the same source tree

Summary:
This was broken by r302499.  Configuring with -DLLVM_BUILD_DOCS=ON would
cause the docs-llvm-man target not to be created.

Reviewers: anemet, beanz

Reviewed By: anemet

Subscribers: llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303042 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMCObjectStreamer : fail with a diagnostic when emitting an out of range value.
Arnaud A. de Grandmaison [Mon, 15 May 2017 08:43:27 +0000 (08:43 +0000)]
MCObjectStreamer : fail with a diagnostic when emitting an out of range value.

We were previously silently emitting bogus data in release mode,
making it very hard to diagnose the error, or crashing with an
assert in debug mode. A proper diagnostic is now always emitted
when the value to be emitted is out of range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303041 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[GlobalISel][X86] G_BR instruction select test
Igor Breger [Mon, 15 May 2017 07:03:38 +0000 (07:03 +0000)]
[GlobalISel][X86] G_BR instruction select test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303036 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits.
Craig Topper [Mon, 15 May 2017 06:39:41 +0000 (06:39 +0000)]
[ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits.

This patch finishes off the conversion of ComputeSignBit to computeKnownBits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303035 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd '#' to test regex that I forgot in r303025.
Daniel Jasper [Mon, 15 May 2017 04:58:27 +0000 (04:58 +0000)]
Add '#' to test regex that I forgot in r303025.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303034 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ConstantRange] Fix what appear to be copy and paste mistakes in the unittest.
Craig Topper [Mon, 15 May 2017 04:40:19 +0000 (04:40 +0000)]
[ConstantRange] Fix what appear to be copy and paste mistakes in the unittest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303033 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMove some code into ScalarEvolution.cpp; NFC
Sanjoy Das [Mon, 15 May 2017 04:22:09 +0000 (04:22 +0000)]
Move some code into ScalarEvolution.cpp; NFC

I need to add some asserts to these constructors that are easier to
add once they're in the .cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303032 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Merge duplicate functionality between InstCombine and ValueTracking
Craig Topper [Mon, 15 May 2017 02:44:08 +0000 (02:44 +0000)]
[InstCombine] Merge duplicate functionality between InstCombine and ValueTracking

Summary:
Merge overflow computation for signed add,
appearing both in InstCombine and ValueTracking.

As part of the merge,
cleanup the interface for overflow checks in InstCombine.

Patch by Yoav Ben-Shalom.

Reviewers: craig.topper, majnemer

Reviewed By: craig.topper

Subscribers: takuto.ikuta, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303029 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Remove 'return' of a called function that also returned void. NFC
Craig Topper [Mon, 15 May 2017 02:30:27 +0000 (02:30 +0000)]
[InstCombine] Remove 'return' of a called function that also returned void. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303028 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix two tests that weren't correctly copied.
Daniel Jasper [Sun, 14 May 2017 22:07:50 +0000 (22:07 +0000)]
Fix two tests that weren't correctly copied.

One didn't correctly fine the regex variable, the other still had a RUN
line for FNOBUILTIN-checks, which weren't copied to the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303025 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Utilize SelectionDAG::getSelect(). NFC.
Zvi Rackover [Sun, 14 May 2017 21:30:38 +0000 (21:30 +0000)]
[X86] Utilize SelectionDAG::getSelect(). NFC.

Replace SelectionDAG::getNode(ISD::SELECT, ...)
and SelectionDAG::getNode(ISD::VSELECT, ...)
with SelectionDAG::getSelect(...)
Saves a few lines of code and in some cases saves the need to explicitly
check the type of the desired node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303024 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX1] Account for cost of extract/insert of 256-bit shifts
Simon Pilgrim [Sun, 14 May 2017 20:52:11 +0000 (20:52 +0000)]
[X86][AVX1] Account for cost of extract/insert of 256-bit shifts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303023 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX2] Fix costs for v4i64 ashr by splat
Simon Pilgrim [Sun, 14 May 2017 20:25:42 +0000 (20:25 +0000)]
[X86][AVX2] Fix costs for v4i64 ashr by splat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303022 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX1] Account for cost of extract/insert of 256-bit shifts by splat
Simon Pilgrim [Sun, 14 May 2017 20:02:34 +0000 (20:02 +0000)]
[X86][AVX1] Account for cost of extract/insert of 256-bit shifts by splat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303021 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add avx512vl command lines to the 128/256-bit vector-lzcnt tests so we can...
Craig Topper [Sun, 14 May 2017 19:38:11 +0000 (19:38 +0000)]
[X86] Add avx512vl command lines to the 128/256-bit vector-lzcnt tests so we can see what compare instructions are being used in the lookup table code.

I noticed the 512-bit lzcnts don't use the X86 specific lookup table code and instead use the EXPAND case in LegalizeDAG. I was toying around with fixing this and noticed it would require compare instructions that generate i1 masks and then converting from mask to vector. Then I noticed that we don't test which compares are used with avx512vl and no avx512cd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303020 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Cleanup some of the check-prefixes in the vector-lzcnt tests.
Craig Topper [Sun, 14 May 2017 19:38:09 +0000 (19:38 +0000)]
[X86] Cleanup some of the check-prefixes in the vector-lzcnt tests.

Remove an unneeded prefix from the 32-bit command line. Make all the 64-bit triples match. Replace ALL with X64 and remove it from the 32-bit test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303019 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Remove unused value from IntrinsicType enum. NFC
Craig Topper [Sun, 14 May 2017 19:38:06 +0000 (19:38 +0000)]
[X86] Remove unused value from IntrinsicType enum. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303018 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX1] Account for cost of extract/insert of 256-bit SDIV/UDIV by mul sequences
Simon Pilgrim [Sun, 14 May 2017 18:52:15 +0000 (18:52 +0000)]
[X86][AVX1] Account for cost of extract/insert of 256-bit SDIV/UDIV by mul sequences

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303017 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix DynamicLibraryTest.cpp on FreeBSD and NetBSD
Dimitry Andric [Sun, 14 May 2017 18:35:38 +0000 (18:35 +0000)]
Fix DynamicLibraryTest.cpp on FreeBSD and NetBSD

Summary:

After rL301562, on FreeBSD the DynamicLibrary unittests fail, because
the test uses getMainExecutable("DynamicLibraryTests", Ptr), and since
the path does not contain any slashes, retrieving the main executable
will not work.

Reimplement getMainExecutable() for FreeBSD and NetBSD using sysctl(3),
which is more reliable than fiddling with relative or absolute paths.

Also add retrieval of the original argv[] from the GoogleTest framework,
to use as a fallback for other OSes.

Reviewers: emaste, marsupial, hans, krytarowski

Reviewed By: krytarowski

Subscribers: krytarowski, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303015 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[COFF] Gracefully handle empty .drectve sections
Shoaib Meenai [Sun, 14 May 2017 18:34:56 +0000 (18:34 +0000)]
[COFF] Gracefully handle empty .drectve sections

Running `llvm-readobj -coff-directives msvcrt.lib` resulted in this error:

    Invalid data was encountered while parsing the file

This happened because some of the object files in the archive have empty
`.drectve` sections. These empty sections result in a `parse_failed` error being
returned from `COFFObjectFile::getSectionContents()`, which in turn caused
`llvm-readobj` to stop. With this change, `getSectionContents` now returns
success, and like before the resulting array is empty.

Patch by Dave Lee.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303014 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][XOP] XOP's general v16i8 shifts will be used instead of v8i16 shift + mask.
Simon Pilgrim [Sun, 14 May 2017 17:59:46 +0000 (17:59 +0000)]
[X86][XOP] XOP's general v16i8 shifts will be used instead of v8i16 shift + mask.

Tweak cost model to match what lowering actually does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303013 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Account for cost of extract/insert of v32i8 vector shifts
Simon Pilgrim [Sun, 14 May 2017 17:36:07 +0000 (17:36 +0000)]
[X86][SSE] Account for cost of extract/insert of v32i8 vector shifts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303012 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[StringExtras] Add llvm::to_integer.
Zachary Turner [Sun, 14 May 2017 17:11:05 +0000 (17:11 +0000)]
[StringExtras] Add llvm::to_integer.

This is a very thin wrapper around StringRef::getAsInteger.
It serves three purposes.

1) It allows a cleaner syntax when you have something other than
   a StringRef - for example, a std::string or an llvm::SmallString.
   Previously, in this case you would have to write something like:
      StringRef(MyStr).getAsInteger(0, Result)
   by explicitly constructing a temporary StringRef.  This can be
   done implicitly however with the new function by just writing:
      to_integer(MyStr, ...).
2) Correcting the travesty that is getAsInteger's return value.
   This function returns true on success, and false on failure.
   While this may cause confusion with people familiar with the
   getAsInteger API, there seems to be widespread agreement that
   the return semantics of getAsInteger was a mistake.
3) It allows the Radix to be deduced as a default argument by
   putting it last in the parameter list.  Most uses of getAsInteger
   pass 0 for the first argument.  With this syntax it can just be
   omitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303011 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][XOP] Account for cost of extract/insert of 256-bit vector shifts
Simon Pilgrim [Sun, 14 May 2017 13:38:53 +0000 (13:38 +0000)]
[X86][XOP] Account for cost of extract/insert of 256-bit vector shifts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303010 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX] Allow 32-bit targets to peek through subvectors to extract constant splats...
Simon Pilgrim [Sun, 14 May 2017 11:46:26 +0000 (11:46 +0000)]
[X86][AVX] Allow 32-bit targets to peek through subvectors to extract constant splats for vXi64 shifts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303009 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][AVX] Add additional 32-bit target vector shift tests
Simon Pilgrim [Sun, 14 May 2017 11:13:03 +0000 (11:13 +0000)]
[X86][AVX] Add additional 32-bit target vector shift tests

Shows issue with 32-bits not being able to peek through subvectors to extract constant splats

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303008 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoupdate of the url
Sylvestre Ledru [Sun, 14 May 2017 07:55:01 +0000 (07:55 +0000)]
update of the url

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303005 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] Add patterns for folding (A & B) | (~A ^ B) -> (~A ^ B) and its commut...
Craig Topper [Sun, 14 May 2017 07:54:43 +0000 (07:54 +0000)]
[InstSimplify] Add patterns for folding (A & B) | (~A ^ B) -> (~A ^ B) and its commuted variants.

We already had (A & ~B) | (A ^ B), but we missed the cases where the not was part of the xor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303004 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agofoo
Craig Topper [Sun, 14 May 2017 07:54:40 +0000 (07:54 +0000)]
foo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303003 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[BasicAA] Alphabetize includes. NFC
Craig Topper [Sun, 14 May 2017 06:18:34 +0000 (06:18 +0000)]
[BasicAA] Alphabetize includes. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303002 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRenable test that was disabled due to cost analysis
Xinliang David Li [Sun, 14 May 2017 02:58:39 +0000 (02:58 +0000)]
Renable test that was disabled due to cost analysis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303000 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix test failure on windows -- do not return deleted func
Xinliang David Li [Sun, 14 May 2017 02:54:02 +0000 (02:54 +0000)]
Fix test failure on windows -- do not return deleted func

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302999 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-pdbdump] Add the option to sort functions and data.
Zachary Turner [Sun, 14 May 2017 01:13:40 +0000 (01:13 +0000)]
[llvm-pdbdump] Add the option to sort functions and data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302998 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SelectionDAG] Added support for EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts in...
Simon Pilgrim [Sat, 13 May 2017 22:10:58 +0000 (22:10 +0000)]
[SelectionDAG] Added support for EXTRACT_SUBVECTOR/CONCAT_VECTORS demandedelts in ComputeNumSignBits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302997 91177308-0d34-0410-b5e6-96231b3b80d8