Commit Graph

135417 Commits

Author SHA1 Message Date
Tom Stellard
a093ef43dd Merging r288433:
------------------------------------------------------------------------
r288433 | oranevskyy | 2016-12-01 14:58:35 -0800 (Thu, 01 Dec 2016) | 24 lines

[ARM] Fix for 64-bit CAS expansion on ARM32 with -O0

Summary:
This patch fixes comparison of 64-bit atomic with its expected value in CMP_SWAP_64 expansion.

Currently, the low words are compared with CMP, while the high words are compared with SBC. SBC expects the carry flag to be set if CMP detects a difference. CMP might leave the carry unset for unequal arguments though if the first one is >= than the second. This might cause the comparison logic to detect false equality.

Example of the broken C++ code:
```
std::atomic<long long> at(2);

long long ll = 1;
std::atomic_compare_exchange_strong(&at, &ll, 3);
```
Even though the atomic `at` and the expected value `ll` are not equal and `atomic_compare_exchange_strong` returns `false`, `at` is changed to 3.

The patch replaces SBC with CMPEQ.

Reviewers: t.p.northover

Subscribers: aemerson, rengolin, llvm-commits, asl

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 20:09:33 +00:00
Tom Stellard
b2d6212d1a Merging r288418:
------------------------------------------------------------------------
r288418 | tnorthover | 2016-12-01 13:31:59 -0800 (Thu, 01 Dec 2016) | 13 lines

AArch64: fix 128-bit cmpxchg at -O0 (again, again).

This time the issue is fortunately just a simple mistake rather than a horrible
design spectre. I thought SUBS/SBCS provided sufficient NZCV flags for
comparing two 64-bit values, but they don't.

The fix is slightly clunkier in AArch64 because we can't use conditional
execution to emit a pair of CMPs. Traditionally an "icmp ne i128" would map to
an EOR/EOR/ORR/CBNZ, but that uses more registers so it's easier to go with a
CSET/CINC/CBNZ combination. Slightly less efficient, but this is -O0 anyway.

Thanks to Anton Korobeynikov for pointing out the issue.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 20:09:32 +00:00
Tom Stellard
13422af5bb Merging r277755:
------------------------------------------------------------------------
r277755 | tnorthover | 2016-08-04 12:32:28 -0700 (Thu, 04 Aug 2016) | 5 lines

AArch64: don't assume all i128s are BUILD_PAIRs

It leads to a crash when they're not. I'm *sure* I've made this mistake before,
at least once.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 20:09:30 +00:00
Tom Stellard
de903c28a7 Revert "Merging r278268:"
This reverts commit r288454.  This was committed accidently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 02:06:41 +00:00
Tom Stellard
2abbb4324e Merging r287360:
------------------------------------------------------------------------
r287360 | hans | 2016-11-18 10:27:31 -0800 (Fri, 18 Nov 2016) | 2 lines

Fix test from r287353: don't use /dev/null

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 02:05:01 +00:00
Tom Stellard
e77b40ba40 Merging r278268:
------------------------------------------------------------------------
r278268 | nhaehnle | 2016-08-10 11:51:14 -0700 (Wed, 10 Aug 2016) | 28 lines

LiveIntervalAnalysis: fix a crash in repairOldRegInRange

Summary:
See the new test case for one that was (non-deterministically) crashing
on trunk and deterministically hit the assertion that I added in D23302.
Basically, the machine function contains a sequence

     DS_WRITE_B32 %vreg4, %vreg14:sub0, ...
     DS_WRITE_B32 %vreg4, %vreg14:sub0, ...
     %vreg14:sub1<def> = COPY %vreg14:sub0

and SILoadStoreOptimizer::mergeWrite2Pair merges the two DS_WRITE_B32
instructions into one before calling repairIntervalsInRange.

Now repairIntervalsInRange wants to repair %vreg14, in particular, and
ends up trying to repair %vreg14:sub1 as well, but that only becomes
active _after_ the range that is to be repaired, hence the crash due
to LR.find(...) == LR.begin() at the start of repairOldRegInRange.

I believe that just skipping those subrange is fine, but again, not too
familiar with that code.

Reviewers: MatzeB, kparzysz, tstellarAMD

Subscribers: llvm-commits, MatzeB

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-02 02:04:59 +00:00
Tom Stellard
c95a7375b1 Merging r287339:
------------------------------------------------------------------------
r287339 | nhaehnle | 2016-11-18 03:55:52 -0800 (Fri, 18 Nov 2016) | 20 lines

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/branches/release_39@288106 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 03:41:29 +00:00
Tom Stellard
25e2616626 Merging r280589:
------------------------------------------------------------------------
r280589 | nhaehnle | 2016-09-03 05:26:32 -0700 (Sat, 03 Sep 2016) | 19 lines

AMDGPU: Fix an interaction between WQM and polygon stippling

Summary:
This fixes a rare bug in polygon stippling with non-monolithic pixel shaders.

The underlying problem is as follows: the prolog part contains the polygon
stippling sequence, i.e. a kill. The main part then enables WQM based on the
_reduced_ exec mask, effectively undoing most of the polygon stippling.

Since we cannot know whether polygon stippling will be used, the main part
of a non-monolithic shader must always return to exact mode to fix this
problem.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits, kzhuravl

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 03:41:28 +00:00
Tom Stellard
efccb7dcb2 Merging r277504:
------------------------------------------------------------------------
r277504 | nhaehnle | 2016-08-02 12:31:14 -0700 (Tue, 02 Aug 2016) | 21 lines

AMDGPU: Stay in WQM for non-intrinsic stores

Summary:
Two types of stores are possible in pixel shaders: stores to memory that are
explicitly requested at the API level, and stores that are an implementation
detail of register spilling or lowering of arrays.

For the first kind of store, we must ensure that helper pixels have no effect
and hence WQM must be disabled. The second kind of store must always be
executed, because the written value may be loaded again in a way that is
relevant for helper pixels as well -- and there are no externally visible
effects anyway.

This is a candidate for the 3.9 release branch.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, kzhuravl, llvm-commits

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288104 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 03:41:26 +00:00
Tom Stellard
25c1eb0bc3 Merging r277500:
------------------------------------------------------------------------
r277500 | nhaehnle | 2016-08-02 12:17:37 -0700 (Tue, 02 Aug 2016) | 18 lines

AMDGPU: Track physical registers in SIWholeQuadMode

Summary:
There are cases where uniform branch conditions are computed in VGPRs, and
we didn't correctly mark those as WQM.

The stray change in basic-branch.ll is because invoking the LiveIntervals
analysis leads to the detection of a dead register that would otherwise
not be seen at -O0.

This is a candidate for the 3.9 branch, as it fixes a possible hang.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits, kzhuravl

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 03:41:24 +00:00
Pawel Bylica
fadb1c1c61 Merging r286998:
------------------------------------------------------------------------
r286998 | chfast | 2016-11-15 19:29:24 +0100 (wto, 15 lis 2016) | 12 lines

Integer legalization: fix MUL expansion

Summary:
This fixes the runtime results produces by the fallback multiplication expansion introduced in r270720.

For tests I created a fuzz tester that compares the results with Boost.Multiprecision.

Reviewers: hfinkel

Subscribers: llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 22:45:01 +00:00
Pawel Bylica
9b2f9c4eed Merging r281403:
------------------------------------------------------------------------
r281403 | chfast | 2016-09-13 23:55:41 +0200 (wto, 13 wrz 2016) | 9 lines

[CodeGen] Fix invalid shift in mul expansion

Summary: When expanding mul in type legalization make sure the type for
shift amount can actually fit the value.
This fixes PR30354 https://llvm.org/bugs/show_bug.cgi?id=30354.

Reviewers: hfinkel, majnemer, RKSimon

Subscribers: RKSimon, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288085 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 22:41:59 +00:00
Tom Stellard
f92d91a710 Merging r285782:
------------------------------------------------------------------------
r285782 | brad | 2016-11-01 18:39:01 -0700 (Tue, 01 Nov 2016) | 9 lines

Disable the use of std::call_once on OpenBSD with libstdc++.

It was noticed this caused performance regressions and deadlocks. PR30768.

Reorder the code to make it clearer what is tested.

PPC now disables the use of std::call_once only with libstdc++ with
the reordering of the code, as was the original intent.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:53:38 +00:00
Tom Stellard
e0af6c9240 Merging r283612:
------------------------------------------------------------------------
r283612 | davide | 2016-10-07 14:53:09 -0700 (Fri, 07 Oct 2016) | 5 lines

[InstCombine] Don't unpack arrays that are too large (part 2).

This is similar to r283599, but for store instructions.
Thanks to David for pointing out!

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:35:41 +00:00
Tom Stellard
7e79c454db Merging r283599:
------------------------------------------------------------------------
r283599 | davide | 2016-10-07 13:57:42 -0700 (Fri, 07 Oct 2016) | 4 lines

[InstCombine] Don't unpack arrays that are too large

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:35:40 +00:00
Tom Stellard
0cdf5eea7a Merging r281650:
------------------------------------------------------------------------
r281650 | david.majnemer | 2016-09-15 13:10:09 -0700 (Thu, 15 Sep 2016) | 6 lines

[InstCombine] Do not RAUW a constant GEP

canRewriteGEPAsOffset expects to process instructions, not constants.

This fixes PR30342.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:25:53 +00:00
Tom Stellard
9496ac113a Merging r279980:
------------------------------------------------------------------------
r279980 | david.majnemer | 2016-08-29 10:14:08 -0700 (Mon, 29 Aug 2016) | 7 lines

[SimplifyCFG] Hoisting invalidates metadata

We forgot to remove optimization metadata when performing hosting during
FoldTwoEntryPHINode.

This fixes PR29163.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-28 21:13:03 +00:00
Mehdi Amini
dc6cf5a70c Merge r283123 into 3.9.1
[RTDyld] Fix a bug in RTDyldMemoryManager::deregisterEHFrames.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-25 04:47:11 +00:00
Tom Stellard
1014f0f373 Merging r287353:
------------------------------------------------------------------------
r287353 | hans | 2016-11-18 09:33:05 -0800 (Fri, 18 Nov 2016) | 12 lines

IRMover: Avoid accidentally mapping types from the destination module (PR30799)

During Module linking, it's possible for SrcM->getIdentifiedStructTypes();
to return types that are actually defined in the destination module
(DstM). Depending on how the bitcode file was read,
getIdentifiedStructTypes() might do a walk over all values, including
metadata nodes, looking for types. In my case, a debug info metadata
node was shared between the two modules, and it referred to a type
defined in the destination module (see test case).

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287906 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-25 01:47:20 +00:00
Guy Blank
56938b6ec4 merge r276347
[X86] Do not use AND8ri8 in AVX512 pattern

This variant is (as documented in the TD) for disassembler use only, and should
not be used in patterns - it is longer, and is broken on 64-bit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 06:52:24 +00:00
Tom Stellard
11d3b2906a Merging r282182:
------------------------------------------------------------------------
r282182 | nemanja.i.ibm | 2016-09-22 12:06:38 -0700 (Thu, 22 Sep 2016) | 6 lines

[PowerPC] Sign extend sub-word values for atomic comparisons

Atomic comparison instructions use the sub-word load instruction on
Power8 and up but the value is not sign extended prior to the signed word
compare instruction. This patch adds that sign extension.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287811 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:17:33 +00:00
Tom Stellard
b0558963d0 Merging r279933:
------------------------------------------------------------------------
r279933 | hfinkel | 2016-08-28 09:17:58 -0700 (Sun, 28 Aug 2016) | 4 lines

[PowerPC] Implement lowering for atomicrmw min/max/umin/umax

Implement lowering for atomicrmw min/max/umin/umax. Fixes PR28818.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287810 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:17:31 +00:00
Tom Stellard
1a4e1d82fe Merging r281479:
------------------------------------------------------------------------
r281479 | nemanja.i.ibm | 2016-09-14 07:19:09 -0700 (Wed, 14 Sep 2016) | 9 lines

Fix code-gen crash on Power9 for insert_vector_elt with variable index (PR30189)

This patch corresponds to review:
https://reviews.llvm.org/D24021

In the initial implementation of this instruction, I forgot to account for
variable indices. This patch fixes PR30189 and should probably be merged into
3.9.1 (I'll open a bug according to the new instructions).

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 21:03:25 +00:00
Mehdi Amini
8676f815b6 Merge r287453 in 3.9.1 : [ThinLTO] Fix crash when importing an opaque type
See: http://llvm.org/PR31072



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287805 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:52:51 +00:00
Tom Stellard
1d63d1c34e Merging r279930:
------------------------------------------------------------------------
r279930 | elena.demikhovsky | 2016-08-28 01:53:53 -0700 (Sun, 28 Aug 2016) | 7 lines

[Loop Vectorizer] Fixed memory confilict checks.

Fixed a bug in run-time checks for possible memory conflicts inside loop.
The bug is in Low <-> High boundaries calculation. The High boundary
should be calculated as "last memory access pointer + element size".

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 17:26:28 +00:00
Tom Stellard
ecc0989ad5 Merging r280143:
------------------------------------------------------------------------
r280143 | dberlin | 2016-08-30 12:58:48 -0700 (Tue, 30 Aug 2016) | 2 lines

IntrArgMemOnly is only defined (and current AA machinery only sanely supports) pointer arguments, and these intrinsics have vector of pointer arguments.  Remove ArgMemOnly until we either have the machinery, define a new attribute, or something similar

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 17:05:01 +00:00
Tom Stellard
f4becce362 Merging r280599:
------------------------------------------------------------------------
r280599 | mehdi.amini | 2016-09-03 14:12:33 -0700 (Sat, 03 Sep 2016) | 10 lines

Fix ThinLTO crash with debug info

Because the recent change about ODR type uniquing in the context,
we can reach types defined in another module during IR linking.
This triggered some assertions in case we IR link without starting
from an empty module. To alleviate that, we can self-map metadata
defined in the destination module so that they won't be visited.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16 18:59:55 +00:00
Tom Stellard
33e873e59f Merging r283427:
------------------------------------------------------------------------
r283427 | nunoplopes | 2016-10-06 02:32:16 -0700 (Thu, 06 Oct 2016) | 3 lines

fix build on cygwin
Cygwin has dlfcn.h, but no Dl_info

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287133 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-16 18:48:06 +00:00
Simon Pilgrim
ef867d47bf [3.9.1] Merging r283070 - [X86][AVX] Ensure broadcast loads respect dependencies
To allow broadcast loads of a non-zero'th vector element, lowerVectorShuffleAsBroadcast can replace a load with a new load with an adjusted address, but unfortunately we weren't ensuring that the new load respected the same dependencies.

This patch adds a TokenFactor and updates all dependencies of the old load to reference the new load instead.

Bug found during internal testing.

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

As discussed on PR30596

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@286251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 17:01:05 +00:00
Simon Pilgrim
d5d7df5232 [3.9.1] Merging r282613 - [X86][AVX] Add test showing that VBROADCAST loads don't correctly respect dependencies
As discussed in PR30596, this is a preliminary test update before we can merge r283070

Note: This required the test to be regenerated after the merge as 3.9.1 doesn't have trunk's latest lea -> mov simplifications

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@286248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 16:45:26 +00:00
Hans Wennborg
d6c51ae2a9 Merging r283129:
------------------------------------------------------------------------
r283129 | hans | 2016-10-03 11:18:04 -0700 (Mon, 03 Oct 2016) | 6 lines

Jump threading: avoid trying to split edge into landingpad block (PR27840)

Splitting the edge is nontrivial because of the landing pad, and we would
currently assert trying to do it.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@286246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 16:38:34 +00:00
Simon Pilgrim
46079999e9 [3.9.1] Merging r280837 [X86] Don't reduce the width of vector mul if the target doesn't support SSE2.
The patch is to fix PR30298, which is caused by rL272694. The solution is to
bail out if the target has no SSE2.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@282753 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 19:16:52 +00:00
Matthias Braun
2eb3d6dc8d Cherry pick r281957 (see http://llvm.org/PR30463)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@282615 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-28 18:17:12 +00:00
Renato Golin
69e5622092 [3.9.1] Merging r281319 [ARM] Support ldr.w in pseudo instruction ldr rd,=immediate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@281634 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 18:10:44 +00:00
Tom Stellard
7d62f518b6 Bump version to 3.9.1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@281335 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-13 13:44:50 +00:00
Hans Wennborg
fbbabf3203 Merging r279647:
------------------------------------------------------------------------
r279647 | sanjoy | 2016-08-24 11:10:21 -0700 (Wed, 24 Aug 2016) | 5 lines

[SCCP] Don't delete side-effecting instructions

I'm not sure if the `!isa<CallInst>(Inst) &&
!isa<TerminatorInst>(Inst))` bit is correct either, but this fixes the
case we know is broken.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 23:46:52 +00:00
Hans Wennborg
3aa4a350b4 Merging r279268:
------------------------------------------------------------------------
r279268 | majnemer | 2016-08-19 09:37:40 -0700 (Fri, 19 Aug 2016) | 5 lines

[CloneFunction] Don't remove unrelated nodes from the CGSSC

CGSCC use a WeakVH to track call sites.  RAUW a call within a function
can result in that WeakVH getting confused about whether or not the call
site is still around.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279477 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-22 21:23:55 +00:00
Hans Wennborg
98e9ba6a0b Merging r279369 and update the test:
------------------------------------------------------------------------
r279369 | mssimpso | 2016-08-20 07:10:06 -0700 (Sat, 20 Aug 2016) | 1 line

[SLP] Add command line option for minimum tree size (NFC)
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279474 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-22 21:04:17 +00:00
Hans Wennborg
a164239806 Fix gather-root.ll SLP vectorizer test to not expose UB.
The undefined behaviour (signed integer overflow) is not a regression
in itself as it was already there, but the test exposing it is a
regression compared to rc1, i.e. the lit tests no longer run ubsan-clean.

This commit fixes the test based on Matt's change in r279125 to not
expose the undefined behaviour.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279468 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-22 20:27:42 +00:00
Hans Wennborg
0316f025da Merging r279125 and r278343:
------------------------------------------------------------------------
r279125 | mssimpso | 2016-08-18 12:50:32 -0700 (Thu, 18 Aug 2016) | 14 lines

[SLP] Initialize VectorizedValue when gathering

We abort building vectorizable trees in some cases (e.g., if the maximum
recursion depth is reached, if the region size is too large, etc.). If this
happens for a reduction, we can be left with a root entry that needs to be
gathered. For these cases, we need make sure we actually set VectorizedValue to
the resulting vector.

This patch ensures we properly set VectorizedValue, and it also ensures the
insertelement sequence generated for the gathers is inserted at the correct
location.

Reference: https://llvm.org/bugs/show_bug.cgi?id=28330
Differential Revison: https://reviews.llvm.org/D23410
------------------------------------------------------------------------

------------------------------------------------------------------------
r278343 | mssimpso | 2016-08-11 08:28:45 -0700 (Thu, 11 Aug 2016) | 1 line

[SLP] Make RecursionMaxDepth a command line option (NFC)
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 22:38:06 +00:00
Hans Wennborg
cd40eead11 ReleaseNotes: sphinx build fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 21:09:28 +00:00
Hans Wennborg
855a1e588f ReleaseNotes: tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279142 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 20:52:16 +00:00
Hans Wennborg
019ea1931b ReleaseNotes: drop in-progress warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 20:39:47 +00:00
Hans Wennborg
9df521b0c4 ReleaseNotes: reduced jump table density
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 20:07:07 +00:00
Hans Wennborg
e87f84d870 Merging r278559:
------------------------------------------------------------------------
r278559 | efriedma | 2016-08-12 13:28:02 -0700 (Fri, 12 Aug 2016) | 7 lines

[AArch64LoadStoreOpt] Handle offsets correctly for post-indexed paired loads.

Trunk would try to create something like "stp x9, x8, [x0], #512", which isn't actually a valid instruction.

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


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 19:43:50 +00:00
Hans Wennborg
3fa944fd5e Merging r278562:
------------------------------------------------------------------------
r278562 | efriedma | 2016-08-12 13:39:51 -0700 (Fri, 12 Aug 2016) | 7 lines

[AArch64LoadStoreOptimizer] Check aliasing correctly when creating paired loads/stores.

The existing code accidentally skipped the aliasing check in edge cases.

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


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 18:14:41 +00:00
Hans Wennborg
24ba7d3f6c Merging r278999:
------------------------------------------------------------------------
r278999 | hans | 2016-08-17 15:50:18 -0700 (Wed, 17 Aug 2016) | 3 lines

SCEV: Don't assert about non-SCEV-able value in isSCEVExprNeverPoison() (PR28932)

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@279093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 17:34:01 +00:00
Hans Wennborg
5139e4fb9b Merging r278938:
------------------------------------------------------------------------
r278938 | mcrosier | 2016-08-17 08:54:39 -0700 (Wed, 17 Aug 2016) | 5 lines

Revert "Reassociate: Reprocess RedoInsts after each inst".

This reverts commit r258830, which introduced a bug described in PR28367.

PR28367
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@278993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 22:13:00 +00:00
Hans Wennborg
4126f23e17 Merging r278900:
------------------------------------------------------------------------
r278900 | cycheng | 2016-08-16 20:17:44 -0700 (Tue, 16 Aug 2016) | 12 lines

[ppc64] Don't apply sibling call optimization if callee has any byval arg

This is a quick work around, because in some cases, e.g. caller's stack
size > callee's stack size, we are still able to apply sibling call
optimization even callee has any byval arg.

This patch fix: https://llvm.org/bugs/show_bug.cgi?id=28328

Reviewers: hfinkel kbarton nemanjai amehsan
Subscribers: hans, tjablin

https://reviews.llvm.org/D23441
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@278990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 22:03:07 +00:00
Hans Wennborg
5b9cd0413c Merging r278841:
------------------------------------------------------------------------
r278841 | haicheng | 2016-08-16 13:06:25 -0700 (Tue, 16 Aug 2016) | 3 lines

[BranchFolding] Change a test case of r278575.

Rename the operands to make the test less brittle.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@278874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-17 00:15:15 +00:00