oota-llvm.git
8 years agoMerging r261039:
Hans Wennborg [Wed, 17 Feb 2016 19:00:40 +0000 (19:00 +0000)]
Merging r261039:
------------------------------------------------------------------------
r261039 | rnk | 2016-02-16 16:17:33 -0800 (Tue, 16 Feb 2016) | 6 lines

[X86] Fix a shrink-wrapping miscompile around __chkstk

__chkstk clobbers EAX. If EAX is live across the prologue, then we have
to take extra steps to save it. We already had code to do this if EAX
was a register parameter. This change adapts it to work when shrink
wrapping is used.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261136 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258616:
David Majnemer [Wed, 17 Feb 2016 18:49:28 +0000 (18:49 +0000)]
Merging r258616:
------------------------------------------------------------------------
r258616 | majnemer | 2016-01-22 22:00:44 -0800 (Fri, 22 Jan 2016) | 3 lines

[PruneEH] Don't try to insert a terminator after another terminator

LLVM's BasicBlock has a single terminator, it is not valid to have two.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261132 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258611:
David Majnemer [Wed, 17 Feb 2016 18:49:09 +0000 (18:49 +0000)]
Merging r258611:
------------------------------------------------------------------------
r258611 | majnemer | 2016-01-22 21:41:29 -0800 (Fri, 22 Jan 2016) | 6 lines

[PruneEH] FuncletPads must not have undef operands

Instead of RAUW with undef, replace the first non-token instruction with
unreachable.

This fixes PR26263.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261131 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258610:
David Majnemer [Wed, 17 Feb 2016 18:48:45 +0000 (18:48 +0000)]
Merging r258610:
------------------------------------------------------------------------
r258610 | majnemer | 2016-01-22 21:41:27 -0800 (Fri, 22 Jan 2016) | 3 lines

[PruneEH] Unify invoke and call handling in DeleteBasicBlock

No functionality change is intended.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261130 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258609:
David Majnemer [Wed, 17 Feb 2016 18:48:28 +0000 (18:48 +0000)]
Merging r258609:
------------------------------------------------------------------------
r258609 | majnemer | 2016-01-22 21:41:22 -0800 (Fri, 22 Jan 2016) | 5 lines

[PruneEH] Reuse code from removeUnwindEdge

PruneEH had functionality idential to removeUnwindEdge.
Consolidate around removeUnwindEdge.
No functionality change is intended.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261129 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259702:
David Majnemer [Wed, 17 Feb 2016 18:42:17 +0000 (18:42 +0000)]
Merging r259702:
------------------------------------------------------------------------
r259702 | majnemer | 2016-02-03 13:30:34 -0800 (Wed, 03 Feb 2016) | 7 lines

[LoopStrengthReduce] Don't rewrite PHIs with incoming values from CatchSwitches

Bail out if we have a PHI on an EHPad that gets a value from a
CatchSwitchInst.  Because the CatchSwitchInst cannot be split, there is
no good place to stick any instructions.

This fixes PR26373.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261126 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260164:
David Majnemer [Wed, 17 Feb 2016 18:41:44 +0000 (18:41 +0000)]
Merging r260164:
------------------------------------------------------------------------
r260164 | akaylor | 2016-02-08 14:52:51 -0800 (Mon, 08 Feb 2016) | 5 lines

[regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261125 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260733:
David Majnemer [Wed, 17 Feb 2016 18:41:08 +0000 (18:41 +0000)]
Merging r260733:
------------------------------------------------------------------------
r260733 | akaylor | 2016-02-12 13:10:16 -0800 (Fri, 12 Feb 2016) | 5 lines

[WinEH] Prevent EH state numbering from skipping nested cleanup pads that never return

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261124 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: new Win EH instructions; by David Majnemer
Hans Wennborg [Wed, 17 Feb 2016 17:57:26 +0000 (17:57 +0000)]
ReleaseNotes: new Win EH instructions; by David Majnemer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261116 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r261033:
Hans Wennborg [Wed, 17 Feb 2016 16:40:51 +0000 (16:40 +0000)]
Merging r261033:
------------------------------------------------------------------------
r261033 | akaylor | 2016-02-16 15:52:18 -0800 (Tue, 16 Feb 2016) | 5 lines

Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261106 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: -femultated-tls; by Chih-hung Hsieh
Hans Wennborg [Wed, 17 Feb 2016 00:05:18 +0000 (00:05 +0000)]
ReleaseNotes: -femultated-tls; by Chih-hung Hsieh

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261035 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260390:
Hans Wennborg [Tue, 16 Feb 2016 23:22:17 +0000 (23:22 +0000)]
Merging r260390:
------------------------------------------------------------------------
r260390 | jyknight | 2016-02-10 09:47:20 -0800 (Wed, 10 Feb 2016) | 12 lines

[SPARC] Repair floating-point condition encodings in assembly parser.

The encodings for floating point conditions A(lways) and N(ever) were
incorrectly specified for the assembly parser, per Sparc manual v8 page
121. This change corrects that mistake.

Also, strangely, all of the branch instructions already had MC test
cases, except for the broken ones. Added the tests.

Patch by Chris Dewhurst

Differential Revision: http://reviews.llvm.org/D17074
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261031 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258103:
Hans Wennborg [Tue, 16 Feb 2016 21:46:52 +0000 (21:46 +0000)]
Merging r258103:
------------------------------------------------------------------------
r258103 | kli | 2016-01-18 16:04:41 -0800 (Mon, 18 Jan 2016) | 2 lines

parseArch() supports more variations of arch names for PowerPC builds

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261015 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: shrink-wrapping; by Quentin Colombet
Hans Wennborg [Tue, 16 Feb 2016 19:37:14 +0000 (19:37 +0000)]
ReleaseNotes: shrink-wrapping; by Quentin Colombet

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261001 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: typo
Hans Wennborg [Tue, 16 Feb 2016 19:29:54 +0000 (19:29 +0000)]
ReleaseNotes: typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@261000 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: Hexagon; by Krzysztof Parzyszek
Hans Wennborg [Tue, 16 Feb 2016 19:27:50 +0000 (19:27 +0000)]
ReleaseNotes: Hexagon; by Krzysztof Parzyszek

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260999 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257864 and r258112:
Hans Wennborg [Tue, 16 Feb 2016 19:20:40 +0000 (19:20 +0000)]
Merging r257864 and r258112:

------------------------------------------------------------------------
r257864 | axw | 2016-01-14 19:33:35 -0800 (Thu, 14 Jan 2016) | 12 lines

[docs] Document LLVM_{BUILD,LINK}_LLVM_DYLIB

Summary:
Document the LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB
CMake options, move BUILD_SHARED_LIBS out of frequently-used,
and add a note/warning to BUILD_SHARED_LIBS.

Reviewers: beanz, delcypher, mjacob

Subscribers: mjacob, llvm-commits

Differential Revision: http://reviews.llvm.org/D16208
------------------------------------------------------------------------

------------------------------------------------------------------------
r258112 | axw | 2016-01-18 21:43:21 -0800 (Mon, 18 Jan 2016) | 8 lines

docs: address post-commit review

Rewording/expansion of CMake options
suggested by Dan Liew.

See http://reviews.llvm.org/D16208.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260996 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: -DLLVM_LINK_LLVM_DYLIB=ON; by Andrew Wilkins
Hans Wennborg [Tue, 16 Feb 2016 19:19:03 +0000 (19:19 +0000)]
ReleaseNotes: -DLLVM_LINK_LLVM_DYLIB=ON; by Andrew Wilkins

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260995 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: ORC in Kaleidoscope and C bindings; by Lang Hames
Hans Wennborg [Tue, 16 Feb 2016 19:07:38 +0000 (19:07 +0000)]
ReleaseNotes: ORC in Kaleidoscope and C bindings; by Lang Hames

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260991 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: fix typo, reported by Eugene
Hans Wennborg [Tue, 16 Feb 2016 17:38:25 +0000 (17:38 +0000)]
ReleaseNotes: fix typo, reported by Eugene

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260985 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260703:
Hans Wennborg [Fri, 12 Feb 2016 19:03:12 +0000 (19:03 +0000)]
Merging r260703:
------------------------------------------------------------------------
r260703 | hans | 2016-02-12 11:02:39 -0800 (Fri, 12 Feb 2016) | 11 lines

[CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF

When cmake is run with -DLLVM_ENABLE_PIC=OFF, build fails while
linking shared library libLTO.so, because its dependencies are built
with -fno-PIC. More details here: https://llvm.org/bugs/show_bug.cgi?id=26484.
This diff reverts r252652 (git 9fd4377ddb83aee3c049dc8757e7771edbb8ee71),
which removed check NOT LLVM_ENABLE_PIC before disabling build for libLTO.so.

Patch by Igor Sugak!

Differential Revision: http://reviews.llvm.org/D17049
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260704 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoARM: Mention r251322 in release notes.
Peter Collingbourne [Fri, 12 Feb 2016 18:46:48 +0000 (18:46 +0000)]
ARM: Mention r251322 in release notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260702 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260641:
Hans Wennborg [Fri, 12 Feb 2016 17:52:29 +0000 (17:52 +0000)]
Merging r260641:
------------------------------------------------------------------------
r260641 | axw | 2016-02-11 17:42:43 -0800 (Thu, 11 Feb 2016) | 10 lines

Avoid linking LLVM component libraries with libLLVM

Patch by Jack Howarth.

When linking to libLLVM, don't also link to the component
libraries that constitute libLLVM.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260693 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260427:
Hans Wennborg [Fri, 12 Feb 2016 16:18:07 +0000 (16:18 +0000)]
Merging r260427:
------------------------------------------------------------------------
r260427 | nha | 2016-02-10 12:13:58 -0800 (Wed, 10 Feb 2016) | 16 lines

AMDGPU: Release the scavenged offset register during VGPR spill

Summary:
This fixes a crash where subsequent spills would be unable to scavenge
a register. In particular, it fixes a crash in piglit's
spec@glsl-1.50@execution@geometry@max-input-components (the test still
has a shader that fails to compile because of too many SGPR spills, but
at least it doesn't crash any more).

This is a candidate for the release branch.

Reviewers: arsenm, tstellarAMD

Subscribers: qcolombet, arsenm

Differential Revision: http://reviews.llvm.org/D16558
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260687 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM/AArch64] 3.8.0 release notes changes
Renato Golin [Fri, 12 Feb 2016 15:29:34 +0000 (15:29 +0000)]
[ARM/AArch64] 3.8.0 release notes changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260684 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVR] Add release notes for 3.8
Dylan McKay [Fri, 12 Feb 2016 06:38:02 +0000 (06:38 +0000)]
[AVR] Add release notes for 3.8

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260659 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: oh, there already was a section about X86
Hans Wennborg [Fri, 12 Feb 2016 02:32:24 +0000 (02:32 +0000)]
ReleaseNotes: oh, there already was a section about X86

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260650 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: start off a 'Changes to X86' section
Hans Wennborg [Fri, 12 Feb 2016 02:29:33 +0000 (02:29 +0000)]
ReleaseNotes: start off a 'Changes to X86' section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRelease Notes: RegisterScheduler::setDefault removed; by Mehdi Amini
Hans Wennborg [Fri, 12 Feb 2016 01:56:35 +0000 (01:56 +0000)]
Release Notes: RegisterScheduler::setDefault removed; by Mehdi Amini

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260643 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r260587:
Hans Wennborg [Fri, 12 Feb 2016 01:42:38 +0000 (01:42 +0000)]
Merging r260587:
------------------------------------------------------------------------
r260587 | pete | 2016-02-11 13:10:40 -0800 (Thu, 11 Feb 2016) | 13 lines

Set load alignment on aggregate loads.

When optimizing a extractvalue(load), we generate a load from the
aggregate type.  This load didn't have alignment set and so would
get the alignment of the type.  This breaks when the type is packed
and so the alignment should be lower.

For example, loading { int, int } would give us alignment of 4, but
the original load from this type may have an alignment of 1 if packed.

Reviewed by David Majnemer

Differential revision: http://reviews.llvm.org/D17158
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260640 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: drop in-progress warning and svn checkout note
Hans Wennborg [Fri, 12 Feb 2016 00:45:55 +0000 (00:45 +0000)]
ReleaseNotes: drop in-progress warning and svn checkout note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260634 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd LDC compiler to list of external OS projects using LLVM 3.8
Kai Nacke [Thu, 11 Feb 2016 20:42:16 +0000 (20:42 +0000)]
Add LDC compiler to list of external OS projects using LLVM 3.8

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260584 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes: Document changes to ilist API
Duncan P. N. Exon Smith [Wed, 10 Feb 2016 19:20:23 +0000 (19:20 +0000)]
ReleaseNotes: Document changes to ilist API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260415 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259958:
Hans Wennborg [Mon, 8 Feb 2016 22:15:55 +0000 (22:15 +0000)]
Merging r259958:
------------------------------------------------------------------------
r259958 | evandro | 2016-02-05 16:01:41 -0800 (Fri, 05 Feb 2016) | 11 lines

[AArch64] Add the scheduling model for Exynos-M1

Summary:
Add the core scheduling model for the Samsung Exynos-M1 (ARMv8-A).

Reviewers: jmolloy, rengolin, christof, MinSeongKIM, t.p.northover

Subscribers: aemerson, rengolin, MatzeB

Differential Revision: http://reviews.llvm.org/D16644
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260156 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259696:
Hans Wennborg [Mon, 8 Feb 2016 18:31:49 +0000 (18:31 +0000)]
Merging r259696:
------------------------------------------------------------------------
r259696 | kfischer | 2016-02-03 13:13:33 -0800 (Wed, 03 Feb 2016) | 12 lines

[DWARFDebug] Fix another case of overlapping ranges

Summary:
In r257979, I added code to ensure that we wouldn't merge DebugLocEntries if
the pieces they describe overlap. Unfortunately, I failed to cover the case,
where there may have multiple active Expressions in the entry, in which case we
need to make sure that no two values overlap before we can perform the merge.

This fixed PR26148.

Reviewers: aprantl
Differential Revision: http://reviews.llvm.org/D16742
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260121 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Add initial release notes for MIPS32.
Daniel Sanders [Mon, 8 Feb 2016 14:14:18 +0000 (14:14 +0000)]
[mips] Add initial release notes for MIPS32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260095 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259381:
Hans Wennborg [Fri, 5 Feb 2016 22:17:38 +0000 (22:17 +0000)]
Merging r259381:
------------------------------------------------------------------------
r259381 | uweigand | 2016-02-01 10:31:19 -0800 (Mon, 01 Feb 2016) | 21 lines

[SystemZ] Fix wrong-code generation for certain always-false conditions

We've found another bug in the code generation logic conditions for a
certain class of always-false conditions, those of the form
   if ((a & 1) < 0)

These only reach the back end when compiling without optimization.

The bug was introduced by the choice of using TEST UNDER MASK
to implement a check for
   if ((a & MASK) < VAL)
as
   if ((a & MASK) == 0)

where VAL is less than the the lowest bit of MASK.  This is correct
in all cases except for VAL == 0, in which case the original
condition is always false, but the replacement isn't.

Fixed by excluding that particular case.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259940 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259886 and r259888:
Hans Wennborg [Fri, 5 Feb 2016 16:30:31 +0000 (16:30 +0000)]
Merging r259886 and r259888:

------------------------------------------------------------------------
r259886 | nemanjai | 2016-02-05 06:50:29 -0800 (Fri, 05 Feb 2016) | 5 lines

Fix for PR 26193

This is a simple fix for a PowerPC intrinsic that was incorrectly defined
(the return type was incorrect).
------------------------------------------------------------------------

------------------------------------------------------------------------
r259888 | nemanjai | 2016-02-05 07:03:17 -0800 (Fri, 05 Feb 2016) | 3 lines

Add the missing test case for PR26193
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259891 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259840 on top of r259178:
Hans Wennborg [Fri, 5 Feb 2016 00:55:39 +0000 (00:55 +0000)]
Merging r259840 on top of r259178:

------------------------------------------------------------------------
r259178 | echristo | 2016-01-28 23:20:30 -0800 (Thu, 28 Jan 2016) | 1 line

Refactor common code for PPC fast isel load immediate selection.
------------------------------------------------------------------------

------------------------------------------------------------------------
r259840 | nemanjai | 2016-02-04 15:14:42 -0800 (Thu, 04 Feb 2016) | 7 lines

Fix for PR 26356

Using the load immediate only when the immediate (whether signed or unsigned)
can fit in a 16-bit signed field. Namely, from -32768 to 32767 for signed and
0 to 65535 for unsigned. This patch also ensures that we sign-extend under the
right conditions.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259858 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259798, r259835:
Hans Wennborg [Fri, 5 Feb 2016 00:46:12 +0000 (00:46 +0000)]
Merging r259798, r259835:

------------------------------------------------------------------------
r259798 | nemanjai | 2016-02-04 08:18:08 -0800 (Thu, 04 Feb 2016) | 9 lines

Enable the %s modifier in inline asm template string

This patch corresponds to review:
http://reviews.llvm.org/D16847

There are some files in glibc that use the output operand modifier even though
it was deprecated in GCC. This patch just adds support for it to prevent issues
with such files.
------------------------------------------------------------------------

------------------------------------------------------------------------
r259835 | nemanjai | 2016-02-04 14:36:10 -0800 (Thu, 04 Feb 2016) | 3 lines

Provide a test case for rl259798
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259856 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259695:
Hans Wennborg [Thu, 4 Feb 2016 16:59:45 +0000 (16:59 +0000)]
Merging r259695:
------------------------------------------------------------------------
r259695 | tfiala | 2016-02-03 13:13:23 -0800 (Wed, 03 Feb 2016) | 11 lines

Address NDEBUG-related linkage issues for Value::assertModuleIsMaterialized()

The IR/Value class had a linkage issue present when LLVM was built
as a library, and the LLVM library build time had different settings
for NDEBUG than the client of the LLVM library.  Clients could get
into a state where the LLVM lib expected
Value::assertModuleIsMaterialized() to be inline-defined in the header
but clients expected that method to be defined in the LLVM library.

See this llvm-commits thread for more details:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160201/329667.html
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259801 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259740:
Hans Wennborg [Thu, 4 Feb 2016 02:16:36 +0000 (02:16 +0000)]
Merging r259740:
------------------------------------------------------------------------
r259740 | nemanjai | 2016-02-03 17:58:20 -0800 (Wed, 03 Feb 2016) | 2 lines

Test case for PR 26381

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259743 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259177:
Hans Wennborg [Wed, 3 Feb 2016 22:00:13 +0000 (22:00 +0000)]
Merging r259177:
------------------------------------------------------------------------
r259177 | echristo | 2016-01-28 23:20:01 -0800 (Thu, 28 Jan 2016) | 5 lines

Since LI/LIS sign extend the constant passed into the instruction we should
check that the sign extended constant fits into 16-bits if we want a
zero extended value, otherwise go ahead and put it together piecemeal.

Fixes PR26356.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259713 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259649:
Hans Wennborg [Wed, 3 Feb 2016 21:24:31 +0000 (21:24 +0000)]
Merging r259649:
------------------------------------------------------------------------
r259649 | jamesm | 2016-02-03 07:05:06 -0800 (Wed, 03 Feb 2016) | 11 lines

[DemandedBits] Revert r249687 due to PR26071

This regresses a test in LoopVectorize, so I'll need to go away and think about how to solve this in a way that isn't broken.

From the writeup in PR26071:

What's happening is that ComputeKnownZeroes is telling us that all bits except the LSB are zero. We're then deciding that only the LSB needs to be demanded from the icmp's inputs.

This is where we're wrong - we're assuming that after simplification the bits that were known zero will continue to be known zero. But they're not - during trivialization the upper bits get changed (because an XOR isn't shrunk), so the icmp fails.

The fault is in demandedbits - its contract does clearly state that a non-demanded bit may either be zero or one.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259699 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259645:
Hans Wennborg [Wed, 3 Feb 2016 21:18:35 +0000 (21:18 +0000)]
Merging r259645:
------------------------------------------------------------------------
r259645 | nemanjai | 2016-02-03 04:53:38 -0800 (Wed, 03 Feb 2016) | 4 lines

Fix for PR 26381

Simple fix - Constant values were not being sign extended in FastIsel.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259698 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259346 (with adjustments for r258867):
Hans Wennborg [Tue, 2 Feb 2016 17:41:39 +0000 (17:41 +0000)]
Merging r259346 (with adjustments for r258867):

------------------------------------------------------------------------
r259346 | ibreger | 2016-02-01 01:57:15 -0800 (Mon, 01 Feb 2016) | 3 lines

AVX512: fix mask handling for gather/scatter/prefetch intrinsics.

Differential Revision: http://reviews.llvm.org/D16755
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259536 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259342 (with s/p2align 4/align 16) because r258750 is not in 3.8.
Hans Wennborg [Tue, 2 Feb 2016 17:35:07 +0000 (17:35 +0000)]
Merging r259342 (with s/p2align 4/align 16) because r258750 is not in 3.8.

------------------------------------------------------------------------
r259342 | ibreger | 2016-01-31 23:56:09 -0800 (Sun, 31 Jan 2016) | 3 lines

AVX512 : Fix SETCCE lowering for KNL 32 bit.

Differential Revision: http://reviews.llvm.org/D16752
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259533 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259375:
Hans Wennborg [Mon, 1 Feb 2016 19:18:10 +0000 (19:18 +0000)]
Merging r259375:
------------------------------------------------------------------------
r259375 | majnemer | 2016-02-01 09:37:56 -0800 (Mon, 01 Feb 2016) | 6 lines

[InstCombine] Don't transform (X+INT_MAX)>=(Y+INT_MAX) -> (X<=Y)

This miscompile came about because we tried to use a transform which was
only appropriate for xor operators when addition was present.

This fixes PR26407.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259390 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259228:
Tim Northover [Fri, 29 Jan 2016 22:00:06 +0000 (22:00 +0000)]
Merging r259228:
------------------------------------------------------------------------
r259228 | tnorthover | 2016-01-29 11:18:46 -0800 (Fri, 29 Jan 2016) | 13 lines

ARM: don't mangle DAG constant if it has more than one use

The basic optimisation was to convert (mul $LHS, $complex_constant) into
roughly "(shl (mul $LHS, $simple_constant), $simple_amt)" when it was expected
to be cheaper. The original logic checks that the mul only has one use (since
we're mangling $complex_constant), but when used in even more complex
addressing modes there may be an outer addition that can pick up the wrong
value too.

I *think* the ARM addressing-mode problem is actually unreachable at the
moment, but that depends on complex assessments of the profitability of
pre-increment addressing modes so I've put a real check in there instead of an
assertion.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259247 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r259236:
Hans Wennborg [Fri, 29 Jan 2016 21:33:02 +0000 (21:33 +0000)]
Merging r259236:
------------------------------------------------------------------------
r259236 | spatel | 2016-01-29 12:21:02 -0800 (Fri, 29 Jan 2016) | 8 lines

[InstCombine] avoid an insertelement transformation that induces the opposite extractelement fold (PR26354)

We would infinite loop because we created a shufflevector that was wider than
needed and then failed to combine that with the insertelement. When subsequently
visiting the extractelement from that shuffle, we see that it's unnecessary,
delete it, and trigger another visit to the insertelement.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259245 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258922:
Tom Stellard [Fri, 29 Jan 2016 16:45:55 +0000 (16:45 +0000)]
Merging r258922:

------------------------------------------------------------------------
r258922 | marek.olsak | 2016-01-27 06:19:45 -0500 (Wed, 27 Jan 2016) |
12 lines

AMDGPU/SI: Stoney has only 16 LDS banks

Summary:
This is a candidate for stable, along with all patches that add the
"stoney"
processor.

Reviewers: tstellarAMD

Subscribers: arsenm

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259207 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257666:
Tom Stellard [Fri, 29 Jan 2016 16:45:52 +0000 (16:45 +0000)]
Merging r257666:

------------------------------------------------------------------------
r257666 | changpeng.fang | 2016-01-13 15:39:25 -0500 (Wed, 13 Jan 2016) | 2 lines

AMDGPU/SI: Update ISA version for FIJI

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259206 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBring back the test-suite export in test-release without bringing back the build...
Daniel Sanders [Thu, 28 Jan 2016 21:05:40 +0000 (21:05 +0000)]
Bring back the test-suite export in test-release without bringing back the build failures.

Summary:
r257791 disabled the test-suite export since the addition of CMakeLists.txt was
causing build failures. This patch exports the test-suite again but does so
outside the source tree so that it isn't included in the Phase[123] builds.

Reviewers: hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259093 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258971:
Hans Wennborg [Thu, 28 Jan 2016 18:23:25 +0000 (18:23 +0000)]
Merging r258971:
------------------------------------------------------------------------
r258971 | spatel | 2016-01-27 11:22:45 -0800 (Wed, 27 Jan 2016) | 26 lines

[SimplifyCFG] limit recursion depth when speculating instructions (PR26308)

This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=26308

With the switch to using the TTI cost model in:
http://reviews.llvm.org/rL228826
...it became possible to hit a zero-cost cycle of instructions (gep -> phi -> gep...),
so we need a cap for the recursion in DominatesMergePoint().

A recursion depth parameter was already added for a different reason in:
http://reviews.llvm.org/rL255660
...so we can just set a limit for it.

I pulled "10" out of the air and made it an independent parameter that we can play with.
It might be higher than it needs to be given the currently low default value of
PHINodeFoldingThreshold (2). That's the starting cost value that we enter the recursion
with, and most instructions have cost set to TCC_Basic (1), so I don't think we're going
to speculate more than 2 instructions with the current parameters.

As noted in the review and the TODO comment, we can do better than just limiting recursion
depth.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259066 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258471:
Hans Wennborg [Thu, 28 Jan 2016 18:16:55 +0000 (18:16 +0000)]
Merging r258471:
------------------------------------------------------------------------
r258471 | pirama | 2016-01-21 17:16:57 -0800 (Thu, 21 Jan 2016) | 14 lines

Do not lower VSETCC if operand is an f16 vector

Summary:
SETCC with f16 vectors has OperationAction set to Expand but still gets
lowered to FCM* intrinsics based on its result type.  This patch skips
lowering of VSETCC if the operand is an f16 vector.

v4 and v8 tests included.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

Differential Revision: http://reviews.llvm.org/D15361
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259064 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258891:
Hans Wennborg [Wed, 27 Jan 2016 00:19:52 +0000 (00:19 +0000)]
Merging r258891:
------------------------------------------------------------------------
r258891 | hans | 2016-01-26 16:19:05 -0800 (Tue, 26 Jan 2016) | 25 lines

test-release.sh: Ignore LC_CTYPE in sed invocation on Darwin

Here, sed is used to prepare object files for comparison via cmp. On my Darwin
15.4.0 machine, LC_CTYPE is set to UTF-8 (by default, I believe). Under these
circumstances, anything sed is made to read will be treated as UTF-8, prompting
it to signal an error if it is not, like so:

% sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
sed: RE error: illegal byte sequence
1
%

To make sed work as expected, I need to set LC_CTYPE to C:

% env LC_CTYPE=C sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
0
%

Without this change, sed will exit with an error for every single file that it
compares between phase 2 and phase 3, thereby making it look as if the
differences were far larger than they are.

Patch by Elias Pipping!

Differential Revision: http://reviews.llvm.org/D16548
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258892 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258386:
Tom Stellard [Tue, 26 Jan 2016 23:57:01 +0000 (23:57 +0000)]
Merging r258386:

------------------------------------------------------------------------
r258386 | thomas.stellard | 2016-01-20 23:28:34 -0500 (Wed, 20 Jan 2016) | 14 lines

AMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute

Summary:
Currently the SI scheduler can be selected via command line option,
but it turned out it would be better if it was selectable via a Target Attribute.

This patch adds "si-scheduler" attribute to the backend.

Reviewers: tstellarAMD, echristo

Subscribers: echristo, arsenm

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258885 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258184:
Sanjoy Das [Tue, 26 Jan 2016 22:29:46 +0000 (22:29 +0000)]
Merging r258184:
------------------------------------------------------------------------
r258184 | sanjoy | 2016-01-19 12:53:51 -0800 (Tue, 19 Jan 2016) | 20 lines

[SCEV] Fix PR26207

In some cases, the max backedge taken count can be more conservative
than the exact backedge taken count (for instance, because
ScalarEvolution::getRange is not control-flow sensitive whereas
computeExitLimitFromICmp can be).  In these cases,
computeExitLimitFromCond (specifically the bit that deals with `and` and
`or` instructions) can create an ExitLimit instance with a
`SCEVCouldNotCompute` max backedge count expression, but a computable
exact backedge count expression.  This violates an implicit SCEV
assumption: a computable exact BE count should imply a computable max BE
count.

This change

 - Makes the above implicit invariant explicit by adding an assert to
   ExitLimit's constructor

 - Changes `computeExitLimitFromCond` to be more robust around
   conservative max backedge counts
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258869 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert accidental changes from r258805
Hans Wennborg [Tue, 26 Jan 2016 19:44:49 +0000 (19:44 +0000)]
Revert accidental changes from r258805

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258844 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258436:
Dimitry Andric [Tue, 26 Jan 2016 19:43:59 +0000 (19:43 +0000)]
Merging r258436:
------------------------------------------------------------------------
r258436 | dim | 2016-01-21 22:57:49 +0100 (Thu, 21 Jan 2016) | 17 lines

Let test-release.sh checkout subprojects directly into the target tree,
instead of using symlinks

Summary:
In the past I have run into several problems with the way
`test-release.sh` creates all the subproject directories as siblings,
and then uses symlinks to stitch them all together.  In some scenarios
this leads to clang not being able to find header files, etc.

This patch changes the script so it directly exports into the correct
target locations for each subproject.

Reviewers: hans

Subscribers: emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D16420
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258842 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258729:
Hans Wennborg [Tue, 26 Jan 2016 19:31:16 +0000 (19:31 +0000)]
Merging r258729:
------------------------------------------------------------------------
r258729 | matze | 2016-01-25 14:08:25 -0800 (Mon, 25 Jan 2016) | 13 lines

X86ISelLowering: Fix cmov(cmov) special lowering bug

There's a special case in EmitLoweredSelect() that produces an improved
lowering for cmov(cmov) patterns. However this special lowering is
currently broken if the inner cmov has multiple users so this patch
stops using it in this case.

If you wonder why this wasn't fixed by continuing to use the special
lowering and inserting a 2nd PHI for the inner cmov: I believe this
would incur additional copies/register pressure so the special lowering
does not improve upon the normal one anymore in this case.

This fixes http://llvm.org/PR26256 (= rdar://24329747)
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258840 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258690:
James Molloy [Tue, 26 Jan 2016 13:30:49 +0000 (13:30 +0000)]
Merging r258690:
------------------------------------------------------------------------
r258690 | jamesm | 2016-01-25 14:49:36 +0000 (Mon, 25 Jan 2016) | 7 lines

[DemandedBits] Fix computation of demanded bits for ICmps

The computation of ICmp demanded bits is independent of the individual operand being evaluated. We simply return a mask consisting of the minimum leading zeroes of both operands.

We were incorrectly passing "I" to ComputeKnownBits - this should be "UserI->getOperand(0)". In cases where we were evaluating the 1th operand, we were taking the minimum leading zeroes of it and itself.

This should fix PR26266.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258805 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258406:
Hans Wennborg [Mon, 25 Jan 2016 22:24:50 +0000 (22:24 +0000)]
Merging r258406:
------------------------------------------------------------------------
r258406 | vedantk | 2016-01-21 09:04:42 -0800 (Thu, 21 Jan 2016) | 16 lines

[GCOV] Avoid emitting profile arcs for module and skeleton CUs

Do not emit profile arc files and note files for module and skeleton
CU's.

Our users report seeing unexpected *.gcda and *.gcno files in their
projects when using gcov-style profiling with modules or frameworks.
The unwanted files come from these modules. This is not very helpful
for end-users. Further, we've seen reports of instrumented programs
crashing while writing these files out (due to I/O failures).

rdar://problem/22838296

Reviewed-by: aprantl
Differential Revision: http://reviews.llvm.org/D15997
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258731 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258416 and r258428:
Hans Wennborg [Fri, 22 Jan 2016 18:37:31 +0000 (18:37 +0000)]
Merging r258416 and r258428:

------------------------------------------------------------------------
r258416 | spatel | 2016-01-21 10:01:57 -0800 (Thu, 21 Jan 2016) | 2 lines

make helper functions static; NFCI
------------------------------------------------------------------------

------------------------------------------------------------------------
r258428 | spatel | 2016-01-21 12:19:54 -0800 (Thu, 21 Jan 2016) | 15 lines

[LibCallSimplifier] don't get fooled by a fake fmin()

This is similar to the bug/fix:
https://llvm.org/bugs/show_bug.cgi?id=26211
http://reviews.llvm.org/rL258325

The fmin() test case reveals another bug caused by sloppy
code duplication. It will crash without this patch because
fp128 is a valid floating-point type, but we would think
that we had matched a function that used doubles.

The new helper function can be used to replace similar
checks that are used in several other places in this file.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258512 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257886:
Hans Wennborg [Fri, 22 Jan 2016 18:26:38 +0000 (18:26 +0000)]
Merging r257886:
------------------------------------------------------------------------
r257886 | jamesm | 2016-01-15 02:36:01 -0800 (Fri, 15 Jan 2016) | 3 lines

[CodeGenPrepare] Try and appease sanitizers

dupRetToEnableTailCallOpts(BB) can invalidate BB. It must run *after* we iterate across BB!
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258510 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258325:
Hans Wennborg [Wed, 20 Jan 2016 21:49:02 +0000 (21:49 +0000)]
Merging r258325:
------------------------------------------------------------------------
r258325 | spatel | 2016-01-20 09:41:14 -0800 (Wed, 20 Jan 2016) | 21 lines

[LibCallSimplifier] don't get fooled by a fake sqrt()

The test case will crash without this patch because the subsequent call to
hasUnsafeAlgebra() assumes that the call instruction is an FPMathOperator
(ie, returns an FP type).

This part of the function signature check was omitted for the sqrt() case,
but seems to be in place for all other transforms.

Before:
http://reviews.llvm.org/rL257400
...we would have needlessly continued execution in optimizeSqrt(), but the
bug was harmless because we'd eventually fail some other check and return
without damage.

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258353 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257940:
Hans Wennborg [Wed, 20 Jan 2016 21:30:57 +0000 (21:30 +0000)]
Merging r257940:
------------------------------------------------------------------------
r257940 | djg | 2016-01-15 13:56:40 -0800 (Fri, 15 Jan 2016) | 10 lines

[SelectionDAG] CSE nodes with differing SDNodeFlags

In the optimizer (GVN etc.) when eliminating redundant nodes with different
flags, the flags are ignored for the purposes of testing for congruence, and
then intersected for the purposes of producing a result that supports the union
of all the uses. This commit makes SelectionDAG's CSE do the same thing,
allowing it to CSE nodes in more cases. This fixes PR26063.

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

------------------------------------------------------------------------
Merging r257942:
------------------------------------------------------------------------
r257942 | djg | 2016-01-15 14:07:35 -0800 (Fri, 15 Jan 2016) | 2 lines

Remove a now-empty file left behind by r257940.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258351 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258273:
Hans Wennborg [Wed, 20 Jan 2016 21:14:05 +0000 (21:14 +0000)]
Merging r258273:
------------------------------------------------------------------------
r258273 | josepht | 2016-01-19 18:15:15 -0800 (Tue, 19 Jan 2016) | 37 lines

[Inliner/WinEH] Honor implicit nounwinds

Summary:
Funclet EH tables require that a given funclet have only one unwind
destination for exceptional exits.  The verifier will therefore reject
e.g. two cleanuprets with different unwind dests for the same cleanup, or
two invokes exiting the same funclet but to different unwind dests.
Because catchswitch has no 'nounwind' variant, and because IR producers
are not *required* to annotate calls which will not unwind as 'nounwind',
it is legal to nest a call or an "unwind to caller" catchswitch within a
funclet pad that has an unwind destination other than caller; it is
undefined behavior for such a call or catchswitch to unwind.

Normally when inlining an invoke, calls in the inlined sequence are
rewritten to invokes that unwind to the callsite invoke's unwind
destination, and "unwind to caller" catchswitches in the inlined sequence
are rewritten to unwind to the callsite invoke's unwind destination.
However, if such a call or "unwind to caller" catchswitch is located in a
callee funclet that has another exceptional exit with an unwind
destination within the callee, applying the normal transformation would
give that callee funclet multiple unwind destinations for its exceptional
exits.  There would be no way for EH table generation to determine which
is the "true" exit, and the verifier would reject the function
accordingly.

Add logic to the inliner to detect these cases and leave such calls and
"unwind to caller" catchswitches as calls and "unwind to caller"
catchswitches in the inlined sequence.

This fixes PR26147.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: alexcrichton, llvm-commits

Differential Revision: http://reviews.llvm.org/D16319
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258349 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258308: [AArch64] Fix two bugs in the .inst directive
Renato Golin [Wed, 20 Jan 2016 18:01:05 +0000 (18:01 +0000)]
Merging r258308: [AArch64] Fix two bugs in the .inst directive

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258326 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258221:
Quentin Colombet [Wed, 20 Jan 2016 01:14:03 +0000 (01:14 +0000)]
Merging r258221:
------------------------------------------------------------------------
r258221 | qcolombet | 2016-01-19 15:29:03 -0800 (Tue, 19 Jan 2016) | 8 lines

[X86] Do not run shrink-wrapping on function with split-stack attribute or HiPE
calling convention.
The implementation of the related callbacks in the x86 backend for such
functions are not ready to deal with a prologue block that is not the entry
block of the function.

This fixes PR26107, but the longer term solution would be to fix those callbacks.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258269 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258207:
Quentin Colombet [Wed, 20 Jan 2016 01:09:12 +0000 (01:09 +0000)]
Merging r258207:
------------------------------------------------------------------------
r258207 | qcolombet | 2016-01-19 14:31:12 -0800 (Tue, 19 Jan 2016) | 1 line

[MachineFunction] Constify getter. NFC.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258268 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257977:
Hans Wennborg [Wed, 20 Jan 2016 00:48:30 +0000 (00:48 +0000)]
Merging r257977:
------------------------------------------------------------------------
r257977 | kfischer | 2016-01-15 17:11:33 -0800 (Fri, 15 Jan 2016) | 1 line

[DwarfDebug] Move MergeValues to .cpp, NFC
------------------------------------------------------------------------
Merging r257979:
------------------------------------------------------------------------
r257979 | kfischer | 2016-01-15 17:15:32 -0800 (Fri, 15 Jan 2016) | 11 lines

[DwarfDebug] Don't merge DebugLocEntries if their pieces overlap

Summary:
Later in DWARF emission we check that DebugLocEntries have
non-overlapping pieces, so we should create any such entries
by merging here.

Fixes PR26163.

Reviewers: aprantl
Differential Revision: http://reviews.llvm.org/D16249
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258267 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[r257857] lli: use llvm::utostr() instead of std::to_string().
NAKAMURA Takumi [Wed, 20 Jan 2016 00:32:09 +0000 (00:32 +0000)]
[r257857] lli: use llvm::utostr() instead of std::to_string().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258266 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[r257732] Mark remote-JIT tests as XFAIL, as well as win32, for targeting mingw32.
NAKAMURA Takumi [Wed, 20 Jan 2016 00:28:22 +0000 (00:28 +0000)]
[r257732] Mark remote-JIT tests as XFAIL, as well as win32, for targeting mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258265 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257875:
Hans Wennborg [Tue, 19 Jan 2016 20:49:25 +0000 (20:49 +0000)]
Merging r257875:
------------------------------------------------------------------------
r257875 | jamesm | 2016-01-15 01:20:19 -0800 (Fri, 15 Jan 2016) | 11 lines

[InstCombine] Rewrite bswap/bitreverse handling completely.

There are several requirements that ended up with this design;
  1. Matching bitreversals is too heavyweight for InstCombine and doesn't really need to be done so early.
  2. Bitreversals and byteswaps are very related in their matching logic.
  3. We want to implement support for matching more advanced bswap/bitreverse patterns like partial bswaps/bitreverses.
  4. Bswaps are best matched early in InstCombine.

The result of these is that a new utility function is created in Transforms/Utils/Local.h that can be configured to search for bswaps, bitreverses or both. InstCombine uses it to find only bswaps, CGP uses it to find only bitreversals.

We can then extend the matching logic in one place only.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258180 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r258168:
Hans Wennborg [Tue, 19 Jan 2016 19:28:41 +0000 (19:28 +0000)]
Merging r258168:
------------------------------------------------------------------------
r258168 | hans | 2016-01-19 11:21:58 -0800 (Tue, 19 Jan 2016) | 3 lines

test-release.sh: Use CMake also for Darwin

This didn't work for 3.7, but hopefully it should work now.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258170 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257925, r257929, r257930, and r257997:
Hans Wennborg [Tue, 19 Jan 2016 18:53:02 +0000 (18:53 +0000)]
Merging r257925, r257929, r257930, and r257997:
------------------------------------------------------------------------
r257925 | mren | 2016-01-15 11:35:42 -0800 (Fri, 15 Jan 2016) | 10 lines

CXX_FAST_TLS calling convention: fix issue on X86-64.

When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.

I will commit fixes to other platforms as well.

PR26136
------------------------------------------------------------------------

------------------------------------------------------------------------
r257929 | mren | 2016-01-15 12:13:28 -0800 (Fri, 15 Jan 2016) | 10 lines

CXX_FAST_TLS calling convention: fix issue on AArch64.

When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.

I will commit fixes to other platforms as well.

PR26136
------------------------------------------------------------------------

------------------------------------------------------------------------
r257930 | mren | 2016-01-15 12:24:11 -0800 (Fri, 15 Jan 2016) | 8 lines

CXX_FAST_TLS calling convention: fix issue on ARM.

When we have a single basic block, the explicit copy-back instructions should
be inserted right before the terminator. Before this fix, they were wrongly
placed at the beginning of the basic block.

PR26136
------------------------------------------------------------------------

------------------------------------------------------------------------
r257997 | mren | 2016-01-16 08:39:46 -0800 (Sat, 16 Jan 2016) | 12 lines

CXX_FAST_TLS calling convention: fix issue on x86-64.

%RBP can't be handled explicitly. We generate the following code:
    pushq %rbp
    movq  %rsp, %rbp
    ...
    movq  %rbx, (%rbp)  ## 8-byte Spill
where %rbp will be overwritten by the spilled value.

The fix is to let PEI handle %RBP.
PR26136
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258162 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257902 (and r257775)
Hans Wennborg [Tue, 19 Jan 2016 18:26:37 +0000 (18:26 +0000)]
Merging r257902 (and r257775)

------------------------------------------------------------------------
r257775 | jyknight | 2016-01-14 08:33:21 -0800 (Thu, 14 Jan 2016) | 3 lines

Revert "Stop increasing alignment of externally-visible globals on ELF platforms."

This reverts commit r257719, due to PR26144.
------------------------------------------------------------------------

------------------------------------------------------------------------
r257902 | jyknight | 2016-01-15 08:33:06 -0800 (Fri, 15 Jan 2016) | 17 lines

Stop increasing alignment of externally-visible globals on ELF
platforms.

With ELF, the alignment of a global variable in a shared library will
get copied into an executables linked against it, if the executable even
accesss the variable. So, it's not possible to implicitly increase
alignment based on access patterns, or you'll break existing binaries.

This happened to affect libc++'s std::cout symbol, for example. See
thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311

(This is a re-commit of r257719, without the bug reported in
PR26144. I've tweaked the code to not assert-fail in
enforceKnownAlignment when computeKnownBits doesn't recurse far enough
to find the underlying Alloca/GlobalObject value.)

Differential Revision: http://reviews.llvm.org/D16145
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258155 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257905:
Hans Wennborg [Tue, 19 Jan 2016 17:28:24 +0000 (17:28 +0000)]
Merging r257905:
------------------------------------------------------------------------
r257905 | hans | 2016-01-15 09:04:45 -0800 (Fri, 15 Jan 2016) | 3 lines

test-release.sh: Fix clang-tools-extra symlink for CMake build

The CMake and Autoconf builds want the symlink set up differently.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@258146 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257791:
Hans Wennborg [Thu, 14 Jan 2016 23:24:17 +0000 (23:24 +0000)]
Merging r257791:
------------------------------------------------------------------------
r257791 | hans | 2016-01-14 11:21:14 -0800 (Thu, 14 Jan 2016) | 4 lines

Exclude test-suite from CMake builds in test-release.sh

It's broken. In 3.7 there wasn't a CMake build for test-suite at all,
so we're not losing something we had before.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257836 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257730:
Hans Wennborg [Thu, 14 Jan 2016 17:52:28 +0000 (17:52 +0000)]
Merging r257730:
------------------------------------------------------------------------
r257730 | majnemer | 2016-01-13 17:20:03 -0800 (Wed, 13 Jan 2016) | 11 lines

[X86] Don't alter HasOpaqueSPAdjustment after we've relied on it

We rely on HasOpaqueSPAdjustment not changing after we've calculated
things based on it.  Things like whether or not we can use 'rep;movs' to
copy bytes around, that sort of thing.  If it changes, invariants in the
backend will quietly break.  This situation arose when we had a call to
memcpy *and* a COPY of the FLAGS register where we would attempt to
reference local variables using %esi, a register that was clobbered by
the 'rep;movs'.

This fixes PR26124.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257779 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReleaseNotes.rst: a few entries from Rafael
Hans Wennborg [Thu, 14 Jan 2016 00:23:32 +0000 (00:23 +0000)]
ReleaseNotes.rst: a few entries from Rafael

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257725 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257648:
Hans Wennborg [Wed, 13 Jan 2016 21:18:59 +0000 (21:18 +0000)]
Merging r257648:
------------------------------------------------------------------------
r257648 | hans | 2016-01-13 10:59:45 -0800 (Wed, 13 Jan 2016) | 1 line

Fix struct/class mismatch for MachineSchedContext
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257668 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMerging r257645:
Dimitry Andric [Wed, 13 Jan 2016 19:37:51 +0000 (19:37 +0000)]
Merging r257645:
------------------------------------------------------------------------
r257645 | dim | 2016-01-13 19:29:46 +0100 (Wed, 13 Jan 2016) | 22 lines

Avoid undefined behavior in LinkAllPasses.h

The LinkAllPasses.h file is included in several main programs, to force
a large number of passes to be linked in.  However, the ForcePassLinking
constructor uses undefined behavior, since it calls member functions on
`nullptr`, e.g.:

      ((llvm::Function*)nullptr)->viewCFGOnly();
      llvm::RGPassManager RGM;
      ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);

When the optimization level is -O2 or higher, the code below the first
nullptr dereference is optimized away, and replaced by `ud2` (on x86).

Therefore, the calls after that first dereference are never emitted.  In
my case, I noticed there was no call to `llvm::sys::RunningOnValgrind()`!

Replace instances of dereferencing `nullptr` with either objects on the
stack, or regular function calls.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257660 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDrop 'svn' suffix from version.
Hans Wennborg [Wed, 13 Jan 2016 19:03:44 +0000 (19:03 +0000)]
Drop 'svn' suffix from version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257651 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCreating release_38 branch off revision 257626
Hans Wennborg [Wed, 13 Jan 2016 17:34:56 +0000 (17:34 +0000)]
Creating release_38 branch off revision 257626

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257630 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 17:23:52 +0000 (17:23 +0000)]
fix typo

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

8 years agoAMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled
Marek Olsak [Wed, 13 Jan 2016 17:23:20 +0000 (17:23 +0000)]
AMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr
Marek Olsak [Wed, 13 Jan 2016 17:23:15 +0000 (17:23 +0000)]
AMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr

Reviewers: tstellarAMD, arsenm

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

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

8 years agoAMDGPU/SI: Remove ending s_endpgm from non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:12 +0000 (17:23 +0000)]
AMDGPU/SI: Remove ending s_endpgm from non-void functions

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add s_waitcnt at the end of non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:09 +0000 (17:23 +0000)]
AMDGPU/SI: Add s_waitcnt at the end of non-void functions

Summary:
v2: Make ReturnsVoid private, so that I can another 8 lines of code and
    look more productive.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU/SI: Add support for non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:04 +0000 (17:23 +0000)]
AMDGPU/SI: Add support for non-void functions

Summary:
Return values can be stored in SGPRs (i32) and VGPRs (f32).

This will be used by functions which expect some bytecode or other binary to
be appended at the end. It allows defining in which registers the return
values will be stored.

v2: don't do this for compute shaders

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years ago[WebAssemly] Invalidate liveness in CFG stackifier
Derek Schuff [Wed, 13 Jan 2016 17:10:28 +0000 (17:10 +0000)]
[WebAssemly] Invalidate liveness in CFG stackifier

WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing
verifier failure if liveness has not already been invalidated.

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

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:46:41 +0000 (16:46 +0000)]
fix typo

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

8 years ago[lit] Fix handling of per test timeout when the installed psutil version
Dan Liew [Wed, 13 Jan 2016 16:43:49 +0000 (16:43 +0000)]
[lit] Fix handling of per test timeout when the installed psutil version
is < ``2.0``.

Older versions of psutil (e.g. ``1.2.1`` which is the version shipped with
Ubuntu 14.04) use a different API for retrieving the child processes.
To handle this try the new API first and if that fails try the old API.

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

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:34:10 +0000 (16:34 +0000)]
fix typo

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

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:30:44 +0000 (16:30 +0000)]
fix typo

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

8 years agoAMDGPU/SI: Add SI Machine Scheduler
Nicolai Haehnle [Wed, 13 Jan 2016 16:10:10 +0000 (16:10 +0000)]
AMDGPU/SI: Add SI Machine Scheduler

Summary:
It is off by default, but can be used
with --misched=si

Patch by: Axel Davy

Reviewers: arsenm, tstellarAMD, nhaehnle

Subscribers: nhaehnle, solenskiner, arsenm, llvm-commits

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

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

8 years agoFixing warning by adding the X86ISD::VROTRI case.
Michael Zuckerman [Wed, 13 Jan 2016 15:48:42 +0000 (15:48 +0000)]
Fixing warning by adding the X86ISD::VROTRI case.

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

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

8 years ago[Hexagon] Do not insert non-phis before phis in bit simplification
Krzysztof Parzyszek [Wed, 13 Jan 2016 15:48:18 +0000 (15:48 +0000)]
[Hexagon] Do not insert non-phis before phis in bit simplification

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