]> granicus.if.org Git - llvm/log
llvm
7 years agoAMDGPU: Fix using SMRD instructions for argument loads in functions
Matt Arsenault [Wed, 26 Jul 2017 20:39:42 +0000 (20:39 +0000)]
AMDGPU: Fix using SMRD instructions for argument loads in functions

These are not actually uniform values except in kernels.

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

7 years ago[Dominators] Fix typos. NFC.
Jakub Kuderski [Wed, 26 Jul 2017 20:26:13 +0000 (20:26 +0000)]
[Dominators] Fix typos. NFC.

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

7 years agoDisable libxml on i686, because it is a 32 bit architecture and
Eric Beckmann [Wed, 26 Jul 2017 20:22:26 +0000 (20:22 +0000)]
Disable libxml on i686, because it is a 32 bit architecture and
libxml2.so is for 64 bit.

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

7 years agoAMDGPU/GlobalISel: Mark 32-bit G_OR as legal
Tom Stellard [Wed, 26 Jul 2017 20:00:53 +0000 (20:00 +0000)]
AMDGPU/GlobalISel: Mark 32-bit G_OR as legal

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

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

7 years ago[GISel]: Avoid zero length array when building Instrs that don't have
Aditya Nandakumar [Wed, 26 Jul 2017 19:58:03 +0000 (19:58 +0000)]
[GISel]: Avoid zero length array when building Instrs that don't have
uses.

Also splitting the buildSources part allows more overloads such as
adding MachineOperands directly in the arguments for buildInstr.

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

7 years agoChange CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.
Peter Collingbourne [Wed, 26 Jul 2017 19:15:29 +0000 (19:15 +0000)]
Change CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.

This was a use-after-free waiting to happen.

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

7 years agoMigrate SimplifyLibCalls to new OptimizationRemarkEmitter
Adam Nemet [Wed, 26 Jul 2017 19:03:18 +0000 (19:03 +0000)]
Migrate SimplifyLibCalls to new OptimizationRemarkEmitter

Summary:
This changes SimplifyLibCalls to use the new OptimizationRemarkEmitter
API.

In fact, as SimplifyLibCalls is only ever called via InstCombine,
(as far as I can tell) the OptimizationRemarkEmitter is added there,
and then passed through to SimplifyLibCalls later.

I have avoided changing any remark text.

This closes PR33787

Patch by Sam Elliott!

Reviewers: anemet, davide

Reviewed By: anemet

Subscribers: davide, mehdi_amini, eraman, fhahn, llvm-commits

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

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

7 years agoThis patch returns proper value to indicate the case when instruction throughput...
Andrew V. Tischenko [Wed, 26 Jul 2017 18:55:14 +0000 (18:55 +0000)]
This patch returns proper value to indicate the case when instruction throughput can't be calculated.
Differential revision https://reviews.llvm.org/D35831

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

7 years agoDo a better job at emitting prefrabricated skeleton CUs.
Adrian Prantl [Wed, 26 Jul 2017 18:48:32 +0000 (18:48 +0000)]
Do a better job at emitting prefrabricated skeleton CUs.

This is a better fix than r308708 for the problem introduced in
r304020. It restores the skeleton CU testcases modified by that commit
to their original form and most importantly ensures that
frontend-generated skeleton CUs (such as used to point to Clang
modules) come after the regular CUs. This broke for DICompileUnit
nodes that don't have any immediate children because they are now
constructed lazily instead of the order in which they are listed in
!llvm.dbg.cu. After this commit we still don't guarantee that order,
but we do guarantee that empty skeletons come last.

Shipping versions of LLDB are very sensitive to the ordering of
CUs. I'll track a fix for LLDB to be more permissive separately.
This fixes a test failure in the LLDB testsuite.

rdar://problem/33357252

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

7 years agoUnlink nodes instead of copying, to avoid memory problems.
Eric Beckmann [Wed, 26 Jul 2017 18:33:21 +0000 (18:33 +0000)]
Unlink nodes instead of copying, to avoid memory problems.

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

7 years ago[Dominators] Change Roots type to SmallVector
Jakub Kuderski [Wed, 26 Jul 2017 18:27:39 +0000 (18:27 +0000)]
[Dominators] Change Roots type to SmallVector

Summary: We can use the template parameter `IsPostDom` to pick an appropriate SmallVector size to store DomTree roots for dominators and postdominators. Before, the code would always allocate memory with `std::vector`.

Reviewers: dberlin, davide, sanjoy, grosser

Reviewed By: grosser

Subscribers: llvm-commits

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

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

7 years ago[Dominators] Move root-finding out of DomTreeBase and simplify it
Jakub Kuderski [Wed, 26 Jul 2017 18:07:40 +0000 (18:07 +0000)]
[Dominators] Move root-finding out of DomTreeBase and simplify it

Summary:
This patch moves root-finding logic from DominatorTreeBase to GenericDomTreeConstruction.h.
It makes the behavior simpler and more consistent by always adding a virtual root to PostDominatorTrees.

Reviewers: dberlin, davide, grosser, sanjoy

Reviewed By: dberlin

Subscribers: llvm-commits

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

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

7 years agoUn-XFAIL some internal lit tests on Windows, they pass for me locally
Reid Kleckner [Wed, 26 Jul 2017 18:04:18 +0000 (18:04 +0000)]
Un-XFAIL some internal lit tests on Windows, they pass for me locally

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

7 years agoDiffing against a file that is itself used in the test seems to be a bad
Eric Beckmann [Wed, 26 Jul 2017 17:47:44 +0000 (17:47 +0000)]
Diffing against a file that is itself used in the test seems to be a bad
idea, because it might get locked down and rendered unopenable.

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

7 years agoSimplify. NFC.
Rafael Espindola [Wed, 26 Jul 2017 17:27:27 +0000 (17:27 +0000)]
Simplify. NFC.

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

7 years agoFix LIT test breakage
George Karpenkov [Wed, 26 Jul 2017 17:19:36 +0000 (17:19 +0000)]
Fix LIT test breakage

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

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

7 years ago[X86][AVX512] Regenerated and cleaned up extension tests.
Simon Pilgrim [Wed, 26 Jul 2017 16:47:00 +0000 (16:47 +0000)]
[X86][AVX512] Regenerated and cleaned up extension tests.

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

7 years ago[X86] Regenerate setcc tests
Simon Pilgrim [Wed, 26 Jul 2017 16:45:57 +0000 (16:45 +0000)]
[X86] Regenerate setcc tests

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

7 years ago[X86][AVX512] Regenerate shuffle tests with broadcast comments.
Simon Pilgrim [Wed, 26 Jul 2017 16:41:18 +0000 (16:41 +0000)]
[X86][AVX512] Regenerate shuffle tests with broadcast comments.

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

7 years ago[X86] Regenerate memset tests
Simon Pilgrim [Wed, 26 Jul 2017 16:39:07 +0000 (16:39 +0000)]
[X86] Regenerate memset tests

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

7 years agoCorrectly enable the llvm-mt tests, now that build flags changed.
Eric Beckmann [Wed, 26 Jul 2017 16:35:44 +0000 (16:35 +0000)]
Correctly enable the llvm-mt tests, now that build flags changed.

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

7 years agoQuote '?' in llvm-rc test
Reid Kleckner [Wed, 26 Jul 2017 16:25:48 +0000 (16:25 +0000)]
Quote '?' in llvm-rc test

Summary:
Bash interperets the '?' character as matching an arbitrary character.
On systems that have a file or directory with exactly one character in
their root directory, '/?' gets reinterpreted into that pathname, which
fails to match the expected Help text for llvm-rc.
This patch quotes the '/?' to avoid that edge case.

Reviewers: mnbvmar, ecbeckmann, rnk

Reviewed By: rnk

Subscribers: dyung, ruiu, llvm-commits

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

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

7 years ago[Hexagon] Mark raise_relocation_error as NORETURN.
Florian Hahn [Wed, 26 Jul 2017 16:07:51 +0000 (16:07 +0000)]
[Hexagon] Mark raise_relocation_error as NORETURN.

Summary:
This silences a couple of implicit fallthrough warnings with GCC 7.1 in
this file.

Reviewers: colinl, kparzysz

Reviewed By: kparzysz

Subscribers: llvm-commits

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

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

7 years agoUpdate the assertion to meet with the changes in r309121. (NFC)
Dehao Chen [Wed, 26 Jul 2017 15:47:00 +0000 (15:47 +0000)]
Update the assertion to meet with the changes in r309121. (NFC)

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

7 years ago[X86] Add combineBT test failure because bits have multiple uses.
Simon Pilgrim [Wed, 26 Jul 2017 15:41:57 +0000 (15:41 +0000)]
[X86] Add combineBT test failure because bits have multiple uses.

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

7 years ago[lit] Mark several of lit's tests XFAIL on Windows
Brian Gesiak [Wed, 26 Jul 2017 15:10:50 +0000 (15:10 +0000)]
[lit] Mark several of lit's tests XFAIL on Windows

Summary:
rL257221 attempted to run lit's own test suite continuously, but that
commit was reverted because lit's test suite does not pass on Windows.
Because lit's tests do not run continuously, they often regress.

In order to un-revert rL257221, mark lit tests that fail as XFAIL for
Windows platforms.

Test Plan:
On a Windows development environment, follow the instructions in
utils/lit/README.txt to run lit's test suite:

```
utils/lit/lit.py \
    --path /path/to/your/llvm/build/bin \
    utils/lit/tests
```

Verify that the test suite is run and a successful exit code is
returned.

Reviewers: mgorny, rnk, delcypher, beanz

Reviewed By: rnk

Subscribers: llvm-commits

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

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

7 years ago[lit] Fix type error for parallelism groups
Brian Gesiak [Wed, 26 Jul 2017 15:02:05 +0000 (15:02 +0000)]
[lit] Fix type error for parallelism groups

Summary:
Whereas rL299560 and rL309071 call `parallelism_groups.items()`, under the
assumption that `parallelism_groups` is a `dict` type, the default
parameter for that attribute is a `list`. Change the default to a
`dict` for type correctness.

This regression in the unit tests would have been caught if the
unit tests were being run continously. It also would have been caught
if the lit project used a Python type checker such as `mypy`.

Test Plan:
As per the instructions in `utils/lit/README.txt`, run the lit unit
test suite:

```
utils/lit/lit.py \
    --path /path/to/your/llvm/build/bin \
    utils/lit/tests
```

Verify that the test `lit :: unit/TestRunner.py` fails before applying this
patch, but passes once this patch is applied.

Reviewers: mgorny, rnk, rafael

Reviewed By: mgorny

Subscribers: llvm-commits

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

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

7 years agoMake new PM honor -fdebug-info-for-profiling
Dehao Chen [Wed, 26 Jul 2017 15:01:20 +0000 (15:01 +0000)]
Make new PM honor -fdebug-info-for-profiling

Summary: The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling.

Reviewers: chandlerc, davidxl

Reviewed By: chandlerc

Subscribers: sanjoy, llvm-commits

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

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

7 years agoRevert "[lit] Remove dead code not referenced in the LLVM SVN repo."
Brian Gesiak [Wed, 26 Jul 2017 14:59:36 +0000 (14:59 +0000)]
Revert "[lit] Remove dead code not referenced in the LLVM SVN repo."

Summary:
This reverts rL306623, which removed `FileBasedTest`, an abstract base class,
but did not also remove the usages of that class in the lit unit tests.
The revert fixes four test failures in the lit unit test suite.

Test plan:
As per the instructions in `utils/lit/README.txt`, run the lit unit
test suite:

```
utils/lit/lit.py \
    --path /path/to/your/llvm/build/bin \
    utils/lit/tests
```

Verify that the following tests fail before applying this patch, and
pass once the patch is applied:

```
lit :: test-data.py
lit :: test-output.py
lit :: xunit-output.py
```

In addition, run `check-llvm` to make sure the existing LLVM test suite
executes normally.

Reviewers: george.karpenkov, mgorny, dlj

Reviewed By: mgorny

Subscribers: llvm-commits

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

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

7 years ago[docs] change a few code-blocks to llvm from text
Nuno Lopes [Wed, 26 Jul 2017 14:11:23 +0000 (14:11 +0000)]
[docs] change a few code-blocks to llvm from text

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

7 years ago[NFC] test commit.
Stefan Pintilie [Wed, 26 Jul 2017 13:44:59 +0000 (13:44 +0000)]
[NFC] test commit.

Added a comment to explain how to add a PPCISD node.

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

7 years ago[Bash-autocompletion] Show HelpText with possible flags
Yuka Takahashi [Wed, 26 Jul 2017 13:36:58 +0000 (13:36 +0000)]
[Bash-autocompletion] Show HelpText with possible flags

Summary:
`clang --autocomplete=-std` will show
```
-std:   Language standard to compile for
-std=   Language standard to compile for
-stdlib=        C++ standard library to use
```
after this change.

However, showing HelpText with completion in bash seems super tricky, so
this feature will be used in other shells (fish, zsh...).

Reviewers: v.g.vassilev, teemperor, ruiu

Subscribers: cfe-commits, hiraditya

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

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

7 years agoRevert r309094: [globalisel][tablegen] Fuse the generated tables together.
Daniel Sanders [Wed, 26 Jul 2017 13:28:40 +0000 (13:28 +0000)]
Revert r309094: [globalisel][tablegen] Fuse the generated tables together.

The ARM bots have started failing and while this patch should be an improvement
for these bots, it's also the only suspect in the blamelist. Reverting while
Diana and I investigate the problem.

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

7 years agoDAGCombiner: Extend reduceBuildVecToTrunc to handle non-zero offset
Zvi Rackover [Wed, 26 Jul 2017 12:57:03 +0000 (12:57 +0000)]
DAGCombiner: Extend reduceBuildVecToTrunc to handle non-zero offset

Summary:
Adding support for combining power2-strided build_vector's where the
first build_vectori's operand is extracted from a non-zero index.

Example:

 v4i32 build_vector((extract_elt V, 1),
                    (extract_elt V, 3),
                    (extract_elt V, 5),
                    (extract_elt V, 7))
 -->
 v4i32 truncate (bitcast (shuffle<1,u,3,u,5,u,7,u> V, u) to v4i64)

Reviewers: delena, RKSimon, guyblank

Reviewed By: RKSimon

Subscribers: llvm-commits

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

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

7 years ago[X86] Regenerated BT tests
Simon Pilgrim [Wed, 26 Jul 2017 12:49:20 +0000 (12:49 +0000)]
[X86] Regenerated BT tests

Test on 32/64 bit targets where appropriate

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

7 years ago[COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations
Martin Storsjo [Wed, 26 Jul 2017 11:19:17 +0000 (11:19 +0000)]
[COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations

In COFF, a symbol offset can't be stored in the relocation (as is
done in ELF or MachO), but is stored as the immediate in the
instruction itself. The immediate in the ADRP thus is the symbol
offset in bytes, not in pages. For the PAGEOFFSET_12A/L relocations,
ignore any offset outside of the lowest 12 bits; they won't have any
effect on the ADD/LDR/STR instruction itself but only on the associated
ADRP.

This is similar to how the same issue is handled for MOVW/MOVT
instructions in ELF (see e.g. SVN r307713, and r307728 in lld).

This fixes "fixup out of range" errors while building larger object
files, where temporary symbols end up as a plain section symbol and
an offset, and fixes any cases where the symbol offset mean that
the actual target ended up on a different page than the symbol
itself.

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

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

7 years ago[X86] Add urem vector test for non-uniform pow2 constants
Simon Pilgrim [Wed, 26 Jul 2017 11:07:45 +0000 (11:07 +0000)]
[X86] Add urem vector test for non-uniform pow2 constants

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

7 years ago[X86] Regenerated urem pow2 tests on 32/64 bit targets
Simon Pilgrim [Wed, 26 Jul 2017 11:05:16 +0000 (11:05 +0000)]
[X86] Regenerated urem pow2 tests on 32/64 bit targets

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

7 years ago[X86] Regenerated umul overflow tests on 32/64 bit targets
Simon Pilgrim [Wed, 26 Jul 2017 11:04:18 +0000 (11:04 +0000)]
[X86] Regenerated umul overflow tests on 32/64 bit targets

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

7 years ago[ARM] GlobalISel: Map G_GLOBAL_VALUE to GPR
Diana Picus [Wed, 26 Jul 2017 11:01:13 +0000 (11:01 +0000)]
[ARM] GlobalISel: Map G_GLOBAL_VALUE to GPR

A G_GLOBAL_VALUE is basically a pointer, so it should live in the GPR.

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

7 years ago[X86][AVX] Regenerated and cleaned up AVX1 intrinsic tests.
Simon Pilgrim [Wed, 26 Jul 2017 10:54:51 +0000 (10:54 +0000)]
[X86][AVX] Regenerated and cleaned up AVX1 intrinsic tests.

Cleaned up triple settings, added 32-bit/64-bit targets where useful, added broadcast comments

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

7 years ago[X86][AVX2] Regenerated and cleaned up broadcast tests.
Simon Pilgrim [Wed, 26 Jul 2017 10:47:51 +0000 (10:47 +0000)]
[X86][AVX2] Regenerated and cleaned up broadcast tests.

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

7 years ago[X86][AVX512] Regenerated and added 32-bit targets to select tests
Simon Pilgrim [Wed, 26 Jul 2017 10:39:55 +0000 (10:39 +0000)]
[X86][AVX512] Regenerated and added 32-bit targets to select tests

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

7 years ago[X86][AVX] Regenerated and cleaned up masked gather/scatter tests.
Simon Pilgrim [Wed, 26 Jul 2017 10:37:12 +0000 (10:37 +0000)]
[X86][AVX] Regenerated and cleaned up masked gather/scatter tests.

Remove unused KNL checks and triple settings, added broadcast comments

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

7 years ago[X86][AVX] Regenerate lzcnt test.
Simon Pilgrim [Wed, 26 Jul 2017 10:22:56 +0000 (10:22 +0000)]
[X86][AVX] Regenerate lzcnt test.

Tidied up triples and checks.

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

7 years ago[globalisel][tablegen] Fuse the generated tables together.
Daniel Sanders [Wed, 26 Jul 2017 10:20:56 +0000 (10:20 +0000)]
[globalisel][tablegen] Fuse the generated tables together.

Summary:
Now that we have control flow in place, fuse the per-rule tables into a
single table. This is a compile-time saving at this point. However, this will
also enable the optimization of a table so that similar instructions can be
tested together, reducing the time spent on the matching the code.

This is NFC in terms of externally visible behaviour but some internals have
changed slightly. State.MIs is no longer reset between each rule that is
attempted because it's not necessary to do so. As a consequence of this the
restriction on the order that instructions are added to State.MIs has been
relaxed to only affect recorded instructions that require new elements to be
added to the vector. GIM_RecordInsn can now write to any element from 1 to
State.MIs.size() instead of just State.MIs.size().

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

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

7 years ago[X86][FMA] Regenerate test with broadcast comments.
Simon Pilgrim [Wed, 26 Jul 2017 10:20:49 +0000 (10:20 +0000)]
[X86][FMA] Regenerate test with broadcast comments.

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

7 years agoFollow up for r307085: a better fix for a dangling StringRef.
Alexander Kornienko [Wed, 26 Jul 2017 10:14:55 +0000 (10:14 +0000)]
Follow up for r307085: a better fix for a dangling StringRef.

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

7 years ago[ARM] GlobalISel: Mark G_GLOBAL_VALUE as legal
Diana Picus [Wed, 26 Jul 2017 09:25:15 +0000 (09:25 +0000)]
[ARM] GlobalISel: Mark G_GLOBAL_VALUE as legal

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

7 years ago[libOption] - Add flag allowing to print options aliases in help text.
George Rimar [Wed, 26 Jul 2017 09:09:56 +0000 (09:09 +0000)]
[libOption] - Add flag allowing to print options aliases in help text.

By default, we display only options that are not
hidden and have help texts. This patch adds flag
allowing to display aliases that have no help text.
In this case help text of aliased option used instead.

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

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

7 years ago[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Michael Zuckerman [Wed, 26 Jul 2017 08:10:14 +0000 (08:10 +0000)]
[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.

This patch expands the support of lowerInterleavedStore to 32x8i stride 4.

LLVM creates suboptimal shuffle code-gen for AVX2. In overall, this patch is a specific fix for the pattern (Strid=4 VF=32) and we plan to include more patterns in the future. To reach our goal of "more patterns". We include two mask creators. The first function creates shuffle's mask equivalent to unpacklo/unpackhi instructions. The other creator creates mask equivalent to a concat of two half vectors(high/low).

The patch goal is to optimize the following sequence:
At the end of the computation, we have ymm2, ymm0, ymm12 and ymm3 holding
each 32 chars:

c0, c1, , c31
m0, m1, , m31
y0, y1, , y31
k0, k1, ., k31

And these need to be transposed/interleaved and stored like so:

c0 m0 y0 k0 c1 m1 y1 k1 c2 m2 y2 k2 c3 m3 y3 k3 ....

Reviewers:
dorit
Farhana
RKSimon
guyblank
DavidKreitzer

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

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

7 years agoTargetLowering: Change isShuffleMaskLegal's mask argument type to ArrayRef<int>....
Zvi Rackover [Wed, 26 Jul 2017 08:06:58 +0000 (08:06 +0000)]
TargetLowering: Change isShuffleMaskLegal's mask argument type to ArrayRef<int>. NFCI.

Changing mask argument type from const SmallVectorImpl<int>& to
ArrayRef<int>.

This came up in D35700 where a mask is received as an ArrayRef<int> and
we want to pass it to TargetLowering::isShuffleMaskLegal().
Also saves a few lines of code.

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

7 years ago[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess part1.
Michael Zuckerman [Wed, 26 Jul 2017 07:45:02 +0000 (07:45 +0000)]
[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess part1.

splitting patch D34601 into two part. This part changes the location of two functions.
The second part will be based on that patch. This was requested by @RKSimon.

Reviewers:
1. dorit
2. Farhana
3. RKSimon
4. guyblank
5. DavidKreitzer

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

7 years ago[SCEV] Cache results of computeExitLimit
Max Kazantsev [Wed, 26 Jul 2017 04:55:54 +0000 (04:55 +0000)]
[SCEV] Cache results of computeExitLimit

This patch adds a cache for computeExitLimit to save compilation time. A lot of examples of
tests that take extensive time to compile are attached to the bug 33494.

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

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

7 years ago[X86] Prevent selecting masked aligned load instructions if the load should be non...
Craig Topper [Wed, 26 Jul 2017 04:31:04 +0000 (04:31 +0000)]
[X86] Prevent selecting masked aligned load instructions if the load should be non-temporal

Summary: The aligned load predicates don't  suppress themselves if the load is non-temporal the way the unaligned predicates do. For the most part this isn't a problem because the aligned predicates are mostly used for instructions that only load the the non-temporal loads have priority over those. The exception are masked loads.

Reviewers: RKSimon, zvi

Reviewed By: RKSimon

Subscribers: llvm-commits

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

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

7 years agoAdd test coverage for new PM PGOOpt handling.
Dehao Chen [Wed, 26 Jul 2017 02:00:43 +0000 (02:00 +0000)]
Add test coverage for new PM PGOOpt handling.

Summary: This patch adds flags and tests to cover the PGOOpt handling logic in new PM.

Reviewers: chandlerc, davide

Reviewed By: chandlerc

Subscribers: sanjoy, llvm-commits

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

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

7 years ago[gold] Enable data-sections by default for the gold-plugin.
Davide Italiano [Wed, 26 Jul 2017 01:47:17 +0000 (01:47 +0000)]
[gold] Enable data-sections by default for the gold-plugin.

Follow up to r309056.

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

7 years agoAdd "REQUIRES: asserts" for test unswitch-equality-undef.ll.
Wei Mi [Wed, 26 Jul 2017 01:34:46 +0000 (01:34 +0000)]
Add "REQUIRES: asserts" for test unswitch-equality-undef.ll.

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

7 years ago[SCEV] Remove unnecessary call to forgetMemoizedResults
Sanjoy Das [Wed, 26 Jul 2017 01:32:19 +0000 (01:32 +0000)]
[SCEV] Remove unnecessary call to forgetMemoizedResults

`SCEVUnknown::allUsesReplacedWith` does not need to call `forgetMemoizedResults`
since RAUW does a value-equivalent replacement by assumption.  If this
assumption was false then the later setValPtr(New) call would be incorrect too.

This is a non-trivial performance optimization for functions with a large number
of loops since `forgetMemoizedResults` walks all loop backedge taken counts to
see if any of them use the SCEVUnknown being RAUWed.  However, this improvement
is difficult to demonstrate without checking in an excessively large IR file.

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

7 years ago[lit] Attempt to fix Python unittest adaptor logic
Reid Kleckner [Wed, 26 Jul 2017 01:27:18 +0000 (01:27 +0000)]
[lit] Attempt to fix Python unittest adaptor logic

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

7 years agoMove manifest utils into separate lib, to reduce libxml2 deps.
Eric Beckmann [Wed, 26 Jul 2017 01:21:55 +0000 (01:21 +0000)]
Move manifest utils into separate lib, to reduce libxml2 deps.

Summary:
Previously were in support.  Since many many things depend on support,
were all forced to also depend on libxml2, which we only want in a few cases.
This puts all the libxml2 deps in a separate lib to be used only in a few
places.

Reviewers: ruiu, thakis, rnk

Subscribers: mgorny, hiraditya, llvm-commits

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

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

7 years ago[PDB] Remove stale GSI.h header that I intended to remove in the previous commit
Reid Kleckner [Wed, 26 Jul 2017 00:58:49 +0000 (00:58 +0000)]
[PDB] Remove stale GSI.h header that I intended to remove in the previous commit

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

7 years ago[DWARF] Generalized verification of .apple_names accelerator table to be applicable...
Spyridoula Gravani [Wed, 26 Jul 2017 00:52:31 +0000 (00:52 +0000)]
[DWARF] Generalized verification of .apple_names accelerator table to be applicable to any acceleration table. Added verification for .apple_types, .apple_namespaces and .apple_objc sections.

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

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

7 years ago[PDB] Improve GSI hash table dumping for publics and globals
Reid Kleckner [Wed, 26 Jul 2017 00:40:36 +0000 (00:40 +0000)]
[PDB] Improve GSI hash table dumping for publics and globals

The PDB "symbol stream" actually contains symbol records for the publics
and the globals stream. The globals and publics streams are essentially
hash tables that point into a single stream of records. In order to
match cvdump's behavior, we need to only dump symbol records referenced
from the hash table. This patch implements that, and then implements
global stream dumping, since it's just a subset of public stream
dumping.

Now we shouldn't see S_PROCREF or S_GDATA32 records when dumping
publics, and instead we should see those record in the globals stream.

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

7 years agoReapply "llvm-mt: implement simple merging of manifests, not factoring namespaces.
Eric Beckmann [Wed, 26 Jul 2017 00:25:12 +0000 (00:25 +0000)]
Reapply "llvm-mt: implement simple merging of manifests, not factoring namespaces.

This time with correct #if.

This reverts commit 9cf4eca0e0383040c1ff1416815c7f649650c2a0.

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

7 years ago[AArch64] Fix some Clang-tidy modernize-use-using and Include What You Use warnings...
Eugene Zelenko [Tue, 25 Jul 2017 23:51:02 +0000 (23:51 +0000)]
[AArch64] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

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

7 years agoDisable loop unswitching for some patterns containing equality comparison with undef.
Wei Mi [Tue, 25 Jul 2017 23:37:17 +0000 (23:37 +0000)]
Disable loop unswitching for some patterns containing equality comparison with undef.

This is a workaround for the bug described in PR31652 and
http://lists.llvm.org/pipermail/llvm-dev/2017-July/115497.html. The temporary
solution is to add a function EqualityPropUnSafe. In EqualityPropUnSafe, for
some simple patterns we can know the equality comparison may contains undef,
so we regard such comparison as unsafe and will not do loop-unswitching for
them. We also need to disable the select simplification when one of select
operand is undef and its result feeds into equality comparison.

The patch cannot clear the safety issue caused by the bug, but it can suppress
the issue from happening to some extent.

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

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

7 years agoDebug Info: Support fragmented variables in the MMI side table
Adrian Prantl [Tue, 25 Jul 2017 23:32:59 +0000 (23:32 +0000)]
Debug Info: Support fragmented variables in the MMI side table

This reapplies commit r309034 with a bugfix+test for inlined variables.

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

7 years ago[gold] Enable function-sections by default.
Davide Italiano [Tue, 25 Jul 2017 23:32:50 +0000 (23:32 +0000)]
[gold] Enable function-sections by default.

This is needed, among others, to respect --section-ordering-file
with LTO. I'll follow up with a similar change for data sections.

I hope every version of gold available on the bots has support for
--section-ordering file.

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

7 years agoRevert "llvm-mt: implement simple merging of manifests, not factoring namespaces."
Eric Beckmann [Tue, 25 Jul 2017 23:06:46 +0000 (23:06 +0000)]
Revert "llvm-mt: implement simple merging of manifests, not factoring namespaces."

This reverts commit 813308e240792ca70ed2f998f21df24a5061ada0.

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

7 years agollvm-mt: implement simple merging of manifests, not factoring namespaces.
Eric Beckmann [Tue, 25 Jul 2017 22:50:25 +0000 (22:50 +0000)]
llvm-mt: implement simple merging of manifests, not factoring namespaces.

Summary:
Does a simple merge, where mergeable elements are combined, all others
are appended.  Does not apply trickly namespace rules.

Subscribers: llvm-commits, hiraditya

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

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

7 years agoRevert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
Petr Hosek [Tue, 25 Jul 2017 22:39:52 +0000 (22:39 +0000)]
Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

This reverts commit 0d9d9250483761eb2f50236830161b0e2137d483.

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

7 years ago[lit] Fix UnboundLocalError for invalid shtest redirects
Michal Gorny [Tue, 25 Jul 2017 22:38:31 +0000 (22:38 +0000)]
[lit] Fix UnboundLocalError for invalid shtest redirects

Replace the incorrect variable reference when invalid redirect is used.
This fixes the following issue:

  File "/usr/src/llvm/utils/lit/lit/TestRunner.py", line 316, in processRedirects
    raise InternalShellError(cmd, "Unsupported redirect: %r" % (r,))
UnboundLocalError: local variable 'r' referenced before assignment

which in turn broke shtest-shell.py and max-failures.py lit tests.

The breakage was introduced during refactoring in rL307310.

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

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

7 years agoReland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Tue, 25 Jul 2017 22:38:08 +0000 (22:38 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

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

7 years agoUpdate the comments on default subtargets based on feedback.
Eric Christopher [Tue, 25 Jul 2017 22:21:08 +0000 (22:21 +0000)]
Update the comments on default subtargets based on feedback.

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

7 years ago[libFuzzer] don't disable msan for TracePC::CollectFeatures: this started to cause...
Kostya Serebryany [Tue, 25 Jul 2017 22:05:31 +0000 (22:05 +0000)]
[libFuzzer] don't disable msan for TracePC::CollectFeatures: this started to cause false positives in msan. No tests for libFuzzer+msan yet -- tests will need to wait until we move libFuzzer to compiler-rt

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

7 years agoRevert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
Petr Hosek [Tue, 25 Jul 2017 21:55:00 +0000 (21:55 +0000)]
Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

This reverts commit 960873b10dd071298c817ba74ef2228f94ead7a1.

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

7 years agoRevert "Debug Info: Support fragmented variables in the MMI side table"
Adrian Prantl [Tue, 25 Jul 2017 21:50:45 +0000 (21:50 +0000)]
Revert "Debug Info: Support fragmented variables in the MMI side table"

This reverts commit r309034 because of a sanitizer issue.

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

7 years agoDebug Info: Support fragmented variables in the MMI side table
Adrian Prantl [Tue, 25 Jul 2017 21:29:22 +0000 (21:29 +0000)]
Debug Info: Support fragmented variables in the MMI side table

<rdar://problem/17816343>

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

7 years agoReland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Tue, 25 Jul 2017 21:16:33 +0000 (21:16 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

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

7 years ago[CMAKE] Speedup developer builds when passing LLVM_APPEND_VC_REV = OFF
Don Hinton [Tue, 25 Jul 2017 21:13:18 +0000 (21:13 +0000)]
[CMAKE] Speedup developer builds when passing LLVM_APPEND_VC_REV = OFF

Make sure multiple targets don't get rebuilt unnecessarily when LLVM_APPEND_VC_REV = OFF.

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

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

7 years ago[CMake] Fix broken builds from r309029
Chris Bieneman [Tue, 25 Jul 2017 20:58:14 +0000 (20:58 +0000)]
[CMake] Fix broken builds from r309029

Fixing the mismatched beginning if and endif contents.

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

7 years ago[CMake] Allow TableGen.cmake to be included multiple times
Chris Bieneman [Tue, 25 Jul 2017 20:53:31 +0000 (20:53 +0000)]
[CMake] Allow TableGen.cmake to be included multiple times

This patch allows TableGen.cmake to be safely included multiple times in sub-projects.

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

7 years agoAMDGPU/SI: Fix Depth and Height computation for SI scheduler
Marek Olsak [Tue, 25 Jul 2017 20:37:03 +0000 (20:37 +0000)]
AMDGPU/SI: Fix Depth and Height computation for SI scheduler

Patch by: Axel Davy

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

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

7 years agoAMDGPU/SI: Force exports at the end for SI scheduler
Marek Olsak [Tue, 25 Jul 2017 20:36:58 +0000 (20:36 +0000)]
AMDGPU/SI: Force exports at the end for SI scheduler

Patch by: Axel Davy

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

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

7 years ago[AArch64] Update a comment in a test
Martin Storsjo [Tue, 25 Jul 2017 19:57:26 +0000 (19:57 +0000)]
[AArch64] Update a comment in a test

The comment ended up outdated when the test was rewritten in SVN r192281.

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

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

7 years ago[AArch64] Add a test for float argument passing to win64 vararg functions
Martin Storsjo [Tue, 25 Jul 2017 19:57:22 +0000 (19:57 +0000)]
[AArch64] Add a test for float argument passing to win64 vararg functions

The existing tests only tested how a va_start is lowered.

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

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

7 years ago[LTO] Prevent dead stripping and internalization of symbols with sections
Teresa Johnson [Tue, 25 Jul 2017 19:42:32 +0000 (19:42 +0000)]
[LTO] Prevent dead stripping and internalization of symbols with sections

Summary:
ELF linkers generate __start_<secname> and __stop_<secname> symbols
when there is a value in a section <secname> where the name is a valid
C identifier.  If dead stripping determines that the values declared
in section <secname> are dead, and we then internalize (and delete)
such a symbol, programs that reference the corresponding start and end
section symbols will get undefined reference linking errors.

To fix this, add the section name to the IRSymtab entry when a symbol is
defined in a specific section. Then use this in the gold-plugin to mark
the symbol as external and visible from outside the summary when the
section name is a valid C identifier.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, llvm-commits

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

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

7 years agoRevert "This patch enables the usage of constant Enum identifiers within Microsoft...
Eric Christopher [Tue, 25 Jul 2017 19:22:09 +0000 (19:22 +0000)]
Revert "This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements."

This reverts commit r308966.

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

7 years ago[PowerPC] Pretty-print CR bits the way the binutils disassembler does
Nemanja Ivanovic [Tue, 25 Jul 2017 18:26:35 +0000 (18:26 +0000)]
[PowerPC] Pretty-print CR bits the way the binutils disassembler does

This patch just adds printing of CR bit registers in a more human-readable
form akin to that used by the GNU binutils.

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

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

7 years ago[PowerPC] - Recommit r304907 now that the issue has been fixed
Nemanja Ivanovic [Tue, 25 Jul 2017 17:54:51 +0000 (17:54 +0000)]
[PowerPC] - Recommit r304907 now that the issue has been fixed

This is just a recommit since the issue that the commit exposed is now
resolved.

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

7 years ago[docs] Fix a typo: iteratation -> iteration
Stephen Hines [Tue, 25 Jul 2017 17:52:55 +0000 (17:52 +0000)]
[docs] Fix a typo: iteratation -> iteration

Reviewers: dgross

Reviewed By: dgross

Subscribers: dgross, llvm-commits

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

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

7 years ago[X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)
Simon Pilgrim [Tue, 25 Jul 2017 17:04:37 +0000 (17:04 +0000)]
[X86][CGP] Reduce memcmp() expansion to 2 load pairs (PR33914)

D35067/rL308322 attempted to support up to 4 load pairs for memcmp inlining which resulted in regressions for some optimized libc memcmp implementations (PR33914).

Until we can match these more optimal cases, this patch reduces the memcmp expansion to a maximum of 2 load pairs (which matches what we do for -Os).

This patch should be considered for the 5.0.0 release branch as well

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

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

7 years ago[DAG] Move DAGCombiner::GetDemandedBits to SelectionDAG
Simon Pilgrim [Tue, 25 Jul 2017 16:36:44 +0000 (16:36 +0000)]
[DAG] Move DAGCombiner::GetDemandedBits to SelectionDAG

This patch moves the DAGCombiner::GetDemandedBits function to SelectionDAG::GetDemandedBits as a first step towards making it easier for targets to get to the source of any demanded bits without the limitations of SimplifyDemandedBits.

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

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

7 years ago[X86] Regenerate test.
Simon Pilgrim [Tue, 25 Jul 2017 16:10:32 +0000 (16:10 +0000)]
[X86] Regenerate test.

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

7 years ago[X86] Regenerate test with broadcast comments.
Simon Pilgrim [Tue, 25 Jul 2017 16:09:56 +0000 (16:09 +0000)]
[X86] Regenerate test with broadcast comments.

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

7 years ago[Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed
Fedor Sergeev [Tue, 25 Jul 2017 15:28:28 +0000 (15:28 +0000)]
[Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed

Summary:
Some SPARC TLS relocations were applying nontrivial adjustments
to zero value, leading to unexpected non-zero values in ELF and then
Solaris linker failures.

Getting rid of these adjustments.

Fixes PR33825.

Reviewers: rafael, asb, jyknight

Subscribers: joerg, jyknight, llvm-commits

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

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

7 years agoX86 Asm uses assertions instead of proper diagnostic. This patch fixes that.
Andrew V. Tischenko [Tue, 25 Jul 2017 13:05:12 +0000 (13:05 +0000)]
X86 Asm uses assertions instead of proper diagnostic. This patch fixes that.

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

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

7 years ago[LIR] Teach LIR to avoid extending the BE count prior to adding one to
Chandler Carruth [Tue, 25 Jul 2017 10:48:32 +0000 (10:48 +0000)]
[LIR] Teach LIR to avoid extending the BE count prior to adding one to
it when safe.

Very often the BE count is the trip count minus one, and the plus one
here should fold with that minus one. But because the BE count might in
theory be UINT_MAX or some such, adding one before we extend could in
some cases wrap to zero and break when we scale things.

This patch checks to see if it would be safe to add one because the
specific case that would cause this is guarded for prior to entering the
preheader. This should handle essentially all of the common loop idioms
coming out of C/C++ code once canonicalized by LLVM.

Before this patch, both forms of loop in the added test cases ended up
subtracting one from the size, extending it, scaling it up by 8 and then
adding 8 back onto it. This is really silly, and it turns out made it
all the way into generated code very often, so this is a surprisingly
important cleanup to do.

Many thanks to Sanjoy for showing me how to do this with SCEV.

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

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

7 years agoThis patch enables the usage of constant Enum identifiers within Microsoft style...
Matan Haroush [Tue, 25 Jul 2017 10:44:09 +0000 (10:44 +0000)]
This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements.

Differential Revision:
https://reviews.llvm.org/D33277
https://reviews.llvm.org/D33278

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