140113 Commits

Author SHA1 Message Date
Kostya Serebryany
9df8914246 [libFuzzer] revert 285259 -- hit commit too soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 00:24:34 +00:00
Kostya Serebryany
06289376f7 [libFuzzer] speculatively trying to fix the Mac build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 00:22:39 +00:00
Davide Italiano
cf6a8a6948 [IR] Retire unused getGEPReturnType overload. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 23:46:16 +00:00
Tim Shen
5e89a7d1f9 [APFloat] Fix APFloat::getExactInverse when the input is nullptr. This is a regression introduced by r285105.
Reviewers: kbarton, echristo, iteratee, eugenis

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 23:31:41 +00:00
Justin Bogner
403d906e8b llvm-objdump: Make some error messages more consistent
Most of the version of report_error were quoting the filename and
printing a colon between the file name and the error message, but this
one wasn't doing either of those. Fix the output to be more
consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285252 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 22:37:52 +00:00
Vedant Kumar
47e18f4158 [utils] Add a '--unified-report' option to the code coverage prep script
In --unified-report mode, a single coverage report is prepared for all
specified binaries and written to *report_dir*. This mode is compatible
with all existing script options, including the --restrict mode which is
used to limit coverage reporting to certain files or directories.

This should not break any existing users of the script.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 22:07:39 +00:00
Vedant Kumar
1182ed1523 [utils] Use print_function in the code coverage prep script, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 22:07:37 +00:00
Vedant Kumar
a8dbdb73ec [utils] Add an '--only-merge' option to the code coverage prep script
In --only-merge mode, the script terminates after the profile merging
step.  This makes the script less stateful: it's more natural to split
the merge out into a separate step instead of relying on the first
invocation of the script to do it.

This should not break any existing users of the script.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285247 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 22:07:35 +00:00
Evandro Menezes
04c77eeb64 [AArch64] Create feature set for Samsung Exynos-M2
Since Exynos-M2 improved the FP square root unit a bit over the one in
Exynos-M1, it does not benefit from using the Newton series for such
operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 22:06:20 +00:00
Victor Leschuk
7614f6d29c DebugInfo: fix incorrect alignment type (NFC)
Change type of some missed DebugInfo-related alignment variables,
that are still uint64_t, to uint32_t.

Original change introduced in r284482.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 21:32:29 +00:00
Reid Kleckner
9b4e828678 [lit] Work around Windows MSys command line tokenization bug
Summary:
This will allow us to revert LLD r284768, which added spaces to get MSys
echo to print what we want.

Reviewers: ruiu, inglorion, rafael

Subscribers: modocache, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285237 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 20:29:27 +00:00
Ehsan Amiri
9434af136b [PPC] Remove testcase from incorrect directory
During my last commit this testcase was put in an incorrect directory. Removing
it. Will put it in the right directory when I can verify everything is correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 20:16:59 +00:00
Tim Northover
1ff4f02fe6 ARM: don't rely on push/pop reglists being in order when folding SP adjust.
It would be a very nice invariant to rely on, but unfortunately it doesn't
necessarily hold (and the causes of mis-sorted reglists appear to be quite
varied) so to be robust the frame lowering code can't assume that the first
register in the list is also the first one that actually gets pushed.

Should fix an issue where we were turning something like:

    push {r8, r4, r7, lr}
    sub sp, #24

into nonsense like:

    push {r2, r3, r4, r5, r6, r7, r8, r4, r7, lr}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 20:01:00 +00:00
Nemanja Ivanovic
73235dc8dc Do not assume that FP vector operands are never legalized by expanding
This patch ensures that if a floating point vector operand is legalized by
expanding, it is legalized through the stack rather than by calling
DAGTypeLegalizer::IntegerToVector which will cause a failure since the operand
is a non-integer type.

This fixes PR 30715.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285231 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 19:51:35 +00:00
Sanjoy Das
cf6e9a81f6 Simplify x >=u x >> y and x >=u x udiv y
Summary:
Extends InstSimplify to handle both `x >=u x >> y` and `x >=u x udiv y`.

This is a folloup of rL258422 and
https://github.com/rust-lang/rust/pull/30917 where llvm failed to
optimize away the bounds checking in a binary search.

Patch by Arthur Silva!

Reviewers: sanjoy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 19:18:43 +00:00
Chad Rosier
5a50eb6b58 Revert "[AliasSetTracker] Make AST smarter about intrinsics that don't actually affect memory."
This reverts commit r285191.

LICM appears to rely on the Alias Set Tracker hitting lifetime markers to prevent
code from being moved outside of the original scope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285227 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 19:18:19 +00:00
Nemanja Ivanovic
4e7356cfaf [PowerPC] Implement vec_insert_exp builtins - llvm portion
This revision corresponds to review: https://reviews.llvm.org/D25957.
Committing on behalf of Zaara Syeda.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 19:03:40 +00:00
Kostya Serebryany
3c0deb17ec [libFuzzer] simplify TracePC::HandleTrace even further. Also, when dealing with -exit_on_src_pos, symbolize every PC only once
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 18:52:04 +00:00
Chad Rosier
39d39677e6 Fix test from r285217.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 18:49:16 +00:00
Chad Rosier
1d0dc0fb0b [AArch64] Avoid materializing constant 1 when generating cneg instructions.
Instead of

 cmp w0, #1
 orr w8, wzr, #0x1
 cneg w0, w8, ne

we now generate

 cmp w0, #1
 csinv w0, w0, wzr, eq

PR28965

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 18:15:32 +00:00
Dan Gohman
9eeea0a8bb [WebAssembly] Update the README.txt.
Update the README.txt with newer information, add a link to the Emscripten
page explaining the current easiest way to use the LLVM wasm backend, and
mention that other ways of using the LLVM wasm backend are in development.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285215 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 17:44:09 +00:00
Nirav Dave
a72a0d6367 [MC] Fix comma typo in .loc parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285214 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 17:28:58 +00:00
Robert Lougher
72c8379fda Reapply: "Remove debug location from common tail when tail-merging"
This reapplies revision 285093.  Original commit message:

The branch folding pass tail merges blocks into a common-tail.  However, the
tail retains the debug information from one of the original inputs to the
merge (chosen randomly).  This is a problem for sampled-based PGO, as hits
on the common-tail will be attributed to whichever block was chosen,
irrespective of which path was actually taken to the common-tail.

This patch fixes the issue by nulling the debug location for the common-tail.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 17:01:47 +00:00
Yaxun Liu
c93e472923 AMDGPU: Refactor processor definition to use ISA version features
Add missing ISA versions 7.0.2/8.0.4/8.1.0. to backend.

Refactor processor definition to use ISA version features.

Fixed ISA version for stoney.

Based on Laurent Morichetti's patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285210 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 16:37:56 +00:00
Dehao Chen
98ab42a2bd Introduce updateDiscriminator interface to DILocation to make it cleaner assigning discriminators.
Summary: This patch introduces updateDiscriminator to DILocation so that it can be directly called by AddDiscriminator. It also makes it easier to update the discriminator later.

Reviewers: dnovillo, dblaikie, aprantl, echristo

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 15:48:45 +00:00
Matt Arsenault
f63894ba9e Reapply "AMDGPU: Don't use offen if it is 0"
This reverts r283003

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 15:08:16 +00:00
Matt Arsenault
44de456371 AMDGPU: Fix counting si_mask_branch as 4 bytes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285202 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:53:54 +00:00
Matt Arsenault
f205f3b0f4 Fix nondeterministic output in local stack slot alloc pass
This finds all of the references to a frame index in a function, and
sorts by the offset. If multiple instructions use the same offset,
nothing was breaking the tie for sorting.

This avoids the test failures the reverted r282999 introduced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:53:50 +00:00
Sanjay Patel
d0147e5c78 [InstCombine] clean up commonCastTransforms; NFC
1. Use 'auto' with dyn_cast.
2. Variables start with a capital letter.
3. Use proper punctuation in comments.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:52:35 +00:00
Tom Stellard
84b175c135 LegalizeDAG: Support promoting [US]DIV and [US]REM operations
Summary:
AMDGPU will need this one i16 is added as a legal type.  This is tested by:

test/CodeGen/AMDGPU/sdiv.ll
test/CodeGen/AMDGPU/sdivrem24.ll
test/CodeGen/AMDGPU/udiv.ll
test/CodeGen/AMDGPU/udivrem24.ll

Reviewers: bogner, efriedma

Subscribers: efriedma, wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:52:25 +00:00
Tom Stellard
1a633d108a AMDGPU/SI: Don't emit multi-dword flat memory ops when they might access scratch
Summary:
A single flat memory operations that might access the scratch buffer
can only access MaxPrivateElementSize bytes.

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:38:47 +00:00
Tom Stellard
e2f7559049 AMDGPU/SI: Remove unnecessary run lines from test
Summary:
This test had run lines disabling/enabling the promote alloca pass, but
enabling/disabling promote alloca had no impact on the output.

Reviewers: arsenm

Subscribers: mgrang, kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:21:09 +00:00
Zvi Rackover
a1f05a248d [X86] AVX512 fallback for floating-point scalar selects
Summary:
In the case where of 'select i1 , f32, f32' or select i1, f64, f64 prefer lowering to masked-moves over branches.

Fixes pr30561

Reviewers: igorb, aymanmus, delena

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285196 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:12:46 +00:00
Sanjay Patel
1d3b444f80 [InstCombine] consolidate zext tests and auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 14:08:49 +00:00
Sanjay Patel
cbb0ce98c5 [InstCombine] auto-generate better checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 13:58:22 +00:00
Chad Rosier
e131755b83 [AliasSetTracker] Make AST smarter about intrinsics that don't actually affect memory.
Differential Revision: https://reviews.llvm.org/D25969

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 12:42:11 +00:00
Victor Leschuk
0ab9364cdd DebugInfo: support for DWARFv5 DW_AT_alignment attribute
* Assume that clang passes non-zero alignment value to DIBuilder
only in case when it was forced by C++11 'alignas', C11 '_Alignas'
or compiler attribute '__attribute__((aligned (N)))'.

* Emit DW_AT_alignment if alignment is specified for type/object.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285189 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 11:59:03 +00:00
Andrea Di Biagio
42dcce5386 [IndVarSimplify][DebugLoc] When widening the exit loop condition, correctly reuse the debug location of the original comparison.
When the loop exit condition is canonicalized as a != compaison, reuse the
debug location of the original (non canonical) comparison.

Before this patch, the debug location of the new icmp was obtained from the
loop latch terminator. This patch fixes the issue by correctly setting the
IRBuilder's "current debug location" to the location of the original compare.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285185 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 10:28:32 +00:00
Vassil Vassilev
1df4f64ba6 Revert r285181 "DebugInfo: support for DWARFv5 DW_AT_alignment attribute".
The commit broke the builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 10:13:47 +00:00
Victor Leschuk
de2f92b5ef DebugInfo: support for DWARFv5 DW_AT_alignment attribute
* Assume that clang passes non-zero alignment value to DIBuilder
only in case when it was forced by C++11 'alignas', C11 '_Alignas'
or compiler attribute '__attribute__((aligned (N)))'.

* Emit DW_AT_alignment if alignment is specified for type/object.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 08:55:27 +00:00
Victor Leschuk
6bee13e122 DebugInfo: add bitcode upgrade test for alignment
Bitcode format was changed in D25073, this adds bitcode upgrade test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 08:34:19 +00:00
Dean Michael Berris
2a38659521 [XRay] Be case-insensitive for error strings
On Windows, "no such file or directory" is the default error translation
as opposed to the capitalized form on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 05:10:39 +00:00
Craig Topper
9fc96e5646 [AVX-512] Add scalar vfmsub/vfnmsub mask3 intrinsics
Summary: Clang's intrinsic header currently tries to negate the third operand of a vfmadd mask3 in order to create vfmsub, but this fails isel. This patch adds scalar vfmsub and vfnmsub mask3 that we can use instead to avoid the negate. This is consistent with the packed instructions.

Reviewers: igorb, delena

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285173 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:59:58 +00:00
Dean Michael Berris
83f97dc820 [XRay] Remove unnecessary include of <unistd.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285171 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:46:50 +00:00
Dean Michael Berris
1af0e79b75 [XRay] Remove unnecessary include of <unistd.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285170 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:36:31 +00:00
Dean Michael Berris
dbc97f38e7 [XRay] Move specialisations into correct namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:26:53 +00:00
Dean Michael Berris
07792fbd6c [XRay] Remove extra ; to make -wpedantic happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285167 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:21:17 +00:00
Dean Michael Berris
a25c1fd8bb [XRay] Add llvm-xray as a dependency to test/CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285166 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:16:05 +00:00
Dean Michael Berris
5a35548822 [XRay] Implement llvm-xray extract, start of the llvm-xray tool
Usage:

  llvm-xray extract <object file> [-o <filename or '-'>]

The tool gets the XRay instrumentation map from an object file and turns
it into YAML.  We first support ELF64 sleds on x86_64 binaries, with
provision for supporting other supported platforms and formats later.

This is the first of a many-part change to fully implement the
`llvm-xray` tool.

We also define a subcommand registration and dispatch mechanism to be
used by other further subcommand implementations for llvm-xray.

Diffusion Revision: https://reviews.llvm.org/D21987

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285165 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 04:14:34 +00:00
Peter Collingbourne
446d7cc0db Cloning: Also clone global variable attached metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 02:57:33 +00:00