OSDN Git Service
Michael Trent [Thu, 30 May 2019 22:11:29 +0000 (22:11 +0000)]
Update the tests in r362121 / r362141 to allow for Windows-specific error
messages: "Is a directory" instead of "is a directory"
This should resolve the errors being reported on clang-x64-windows-msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362167
91177308-0d34-0410-b5e6-
96231b3b80d8
Amy Huang [Thu, 30 May 2019 22:04:11 +0000 (22:04 +0000)]
Add enums as global variables in the IR metadata.
Summary:
Keeps track of the enums that were used by saving them as DIGlobalVariables,
since CodeView emits debug info for global constants.
Reviewers: rnk
Subscribers: aprantl, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D62635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362166
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 30 May 2019 22:01:56 +0000 (22:01 +0000)]
[Remarks] Fix usage of enum class
Breaks the build on some compilers:
http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/9720/steps/build%20stage%201/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362165
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Thu, 30 May 2019 21:45:59 +0000 (21:45 +0000)]
[Remarks][NFC] Move the serialization to lib/Remarks
Separate the remark serialization to YAML from the LLVM Diagnostics.
This adds a new serialization abstraction: remarks::Serializer. It's
completely independent from lib/IR and it provides an easy way to
replace YAML by providing a new remarks::Serializer.
Differential Revision: https://reviews.llvm.org/D62632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362160
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 21:41:21 +0000 (21:41 +0000)]
[NFC][ARM] Add a test that potentially causes endless combine loop with D62266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362159
91177308-0d34-0410-b5e6-
96231b3b80d8
Puyan Lotfi [Thu, 30 May 2019 21:37:25 +0000 (21:37 +0000)]
[MIR-Canon] Fixing case where MachineFunction is empty.
In cases where the machine function is empty: bail on the RPO traversal.
Differential Revision: https://reviews.llvm.org/D62617
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362158
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 21:10:37 +0000 (21:10 +0000)]
[DAGCombine] Limit 'hoist add/sub binop w/ constant op' to non-opaque consts
I don't have a test case for these, but there is a test case for D62266
where, even after all the constant-folding patches, we still end up
with endless combine loop. Which makes sense, since we don't constant
fold for opaque constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362156
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Thu, 30 May 2019 21:03:17 +0000 (21:03 +0000)]
[CVP] Add tests for non-overflowing saturating math; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362153
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Thu, 30 May 2019 21:03:10 +0000 (21:03 +0000)]
[CVP] Generalize willNotOverflow(); NFC
Change argument from WithOverflowInst to BinaryOpIntrinsic, so this
function can also be used for saturating math intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362152
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 30 May 2019 20:58:28 +0000 (20:58 +0000)]
[RuntimeDyld] Update reserveAllocationSpace to account for stub padding.
This should fix the buildbot failures caused by r362139.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362151
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 30 May 2019 20:53:21 +0000 (20:53 +0000)]
[InstCombine] Avoid use after free in DenseMap, when built with GCC
Previously, this used a statement like this:
Map[A] = Map[B];
This is equivalent to the following:
const auto &Src = Map[B];
auto &Dest = Map[A];
Dest = Src;
The second statement, "auto &Dest = Map[A];" can insert a new
element into the DenseMap, which can potentially grow and reallocate
the DenseMap's internal storage, which will invalidate the existing
reference to the source. When doing the actual assignment,
the Src reference is dereferenced, accessing memory that was
freed when the DenseMap grew.
This issue hasn't shown up when LLVM was built with Clang, because
the right hand side ended up dereferenced before evaulating the
left hand side. (If the value type is a larger data type, Clang doesn't
do this but behaves like GCC.)
With GCC, a cast to Value* isn't enough to make it dereference the
right hand side reference before invoking operator[] (while that is
enough to make Clang/LLVM do the right thing for larger types), but
storing it in an intermediate variable in a separate statement works.
This fixes PR42065.
Differential Revision: https://reviews.llvm.org/D62624
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362150
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 20:37:49 +0000 (20:37 +0000)]
[DAGCombiner][X86][AArch64] (x - C) + y -> (x + y) - C fold. Try 2
Summary:
Only vector tests are being affected here,
since subtraction by scalar constant is rewritten
as addition by negated constant.
No surprising test changes.
https://rise4fun.com/Alive/pbT
This is a recommit, originally committed in rL361852, but reverted
to investigate test-suite compile-time hangs.
Reviewers: RKSimon, craig.topper, spatel
Reviewed By: RKSimon
Subscribers: javed.absar, kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62257
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362146
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 20:37:39 +0000 (20:37 +0000)]
[DAGCombine] (x - C) - y -> (x - y) - C fold. Try 3
Summary:
Again only vectors affected. Frustrating. Let me take a look into that..
https://rise4fun.com/Alive/AAq
This is a recommit, originally committed in rL361852, but reverted
to investigate test-suite compile-time hangs, and then reverted in
rL362109 to fix missing constant folds that were causing
endless combine loops.
Reviewers: RKSimon, craig.topper, spatel
Reviewed By: RKSimon
Subscribers: javed.absar, JDevlieghere, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62294
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362145
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 20:37:29 +0000 (20:37 +0000)]
[DAGCombine][X86][AArch64][AMDGPU] (x - y) + -1 -> add (xor y, -1), x fold. Try 3
Summary:
This prevents regressions in next patch,
and somewhat recovers from the regression to AMDGPU test in D62223.
It is indeed not great that we leave vector decrement,
don't transform it into vector add all-ones..
https://rise4fun.com/Alive/ZRl
This is a recommit, originally committed in rL361852, but reverted
to investigate test-suite compile-time hangs, and then reverted in
rL362109 to fix missing constant folds that were causing
endless combine loops.
Reviewers: RKSimon, craig.topper, spatel, arsenm
Reviewed By: RKSimon, arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, javed.absar, dstuttard, tpr, t-tye, kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362144
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 20:37:18 +0000 (20:37 +0000)]
[DAGCombiner][X86][AArch64][SPARC][SystemZ] y - (x + C) -> (y - x) - C fold. Try 3
Summary:
Direct sibling of D62223 patch.
While i don't have a direct motivational pattern for this,
it would seem to make sense to handle both patterns (or none),
for symmetry?
The aarch64 changes look neutral;
sparc and systemz look like improvement (one less instruction each);
x86 changes - 32bit case improves, 64bit case shows that LEA no longer
gets constructed, which may be because that whole test is `-mattr=+slow-lea,+slow-3ops-lea`
https://rise4fun.com/Alive/ffh
This is a recommit, originally committed in rL361852, but reverted
to investigate test-suite compile-time hangs, and then reverted in
rL362109 to fix missing constant folds that were causing
endless combine loops.
Reviewers: RKSimon, craig.topper, spatel, t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, jyknight, javed.absar, kristof.beyls, fedor.sergeev, jrtc27, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362143
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 20:36:54 +0000 (20:36 +0000)]
[DAGCombiner][X86][AArch64][AMDGPU] (x + C) - y -> (x - y) + C fold. Try 3
Summary:
The main motivation is shown by all these `neg` instructions that are now created.
In particular, the `@reg32_lshr_by_negated_unfolded_sub_b` test.
AArch64 test changes all look good (`neg` created), or neutral.
X86 changes look neutral (vectors), or good (`neg` / `xor eax, eax` created).
I'm not sure about `X86/ragreedy-hoist-spill.ll`, it looks like the spill
is now hoisted into preheader (which should still be good?),
2 4-byte reloads become 1 8-byte reload, and are elsewhere,
but i'm not sure how that affects that loop.
I'm unable to interpret AMDGPU change, looks neutral-ish?
This is hopefully a step towards solving [[ https://bugs.llvm.org/show_bug.cgi?id=41952 | PR41952 ]].
https://rise4fun.com/Alive/pkdq (we are missing more patterns, i'll submit them later)
This is a recommit, originally committed in rL361852, but reverted
to investigate test-suite compile-time hangs, and then reverted in
rL362109 to fix missing constant folds that were causing
endless combine loops.
Reviewers: craig.topper, RKSimon, spatel, arsenm
Reviewed By: RKSimon
Subscribers: bjope, qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, javed.absar, dstuttard, tpr, t-tye, kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62223
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362142
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Trent [Thu, 30 May 2019 20:09:09 +0000 (20:09 +0000)]
Write new tests for r362121
Summary:
The tests for r362121 ran dsymutil against a test binary every time.
This caused problems on lld-x86_64-ubuntu-fast as dsymutil required
a lipo tool be available to process those binaries.
This change rewrites the new test cases in macho-disassemble-g-dsym
to use bespoke test binaries (exe and dwarf) simplifying the test's
runtime dependencies.
The changes to tools/llvm-objdump/MachODump.cpp are unchanged from
r362121
Reviewers: pete, lhames, JDevlieghere
Reviewed By: pete
Subscribers: smeenai, aprantl, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62694
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362141
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 30 May 2019 19:59:20 +0000 (19:59 +0000)]
[RuntimeDyld] Apply padding and alignment bumps to all sections with stubs, and
increase the MachO/x86-64 stub alignment to 8.
Stub alignment should be guaranteed for any section containing RuntimeDyld
stubs/GOT-entries. To do this we should pad and align all sections containing
stubs, not just code sections.
This commit also bumps the MachO/x86-64 stub alignment to 8, so that GOT entries
will be aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362139
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Thu, 30 May 2019 19:42:25 +0000 (19:42 +0000)]
[NFC][InstCombine] Add unary FNeg tests to fmul.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362137
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 30 May 2019 19:33:18 +0000 (19:33 +0000)]
AMDGPU/GlobalISel: Add wave scratch offset argument
Avoids crashing in PEI in a future change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362136
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 19:27:51 +0000 (19:27 +0000)]
[DAGCombine] ((c1-A)-c2) -> ((c1-c2)-A) constant-fold
Summary: https://rise4fun.com/Alive/B0A
Reviewers: t.p.northover, RKSimon, spatel, craig.topper
Reviewed By: RKSimon
Subscribers: javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362135
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 19:27:42 +0000 (19:27 +0000)]
[DAGCombine] (A-C1)-C2 -> A-(C1+C2) constant-fold
Summary: https://rise4fun.com/Alive/Mb1M
Reviewers: RKSimon, craig.topper, spatel, t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62689
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362134
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 19:27:32 +0000 (19:27 +0000)]
[DAGCombine] (A+C1)-C2 -> A+(C1-C2) constant-fold
Summary:
Direct sibling of D62662, the root cause of the endless combine loop in D62257
https://rise4fun.com/Alive/d3W
Reviewers: RKSimon, craig.topper, spatel, t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62664
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362133
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 19:27:26 +0000 (19:27 +0000)]
[DAGCombine] Use FoldConstantArithmetic() to perform C2-(A+C1) -> (C2-C1)-A fold
Summary:
No tests change, and i'm not sure how to test this, but it's better safe than sorry.
Reviewers: spatel, RKSimon, craig.topper, t.p.northover
Reviewed By: craig.topper
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62663
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362132
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 19:27:19 +0000 (19:27 +0000)]
[DAGCombine] ((A-c1)+c2) -> (A+(c2-c1)) constant-fold
Summary:
This was the root cause of the endless combine loop in D62257
https://rise4fun.com/Alive/d3W
Reviewers: RKSimon, spatel, craig.topper, t.p.northover
Reviewed By: t.p.northover
Subscribers: t.p.northover, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62662
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362131
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 19:27:10 +0000 (19:27 +0000)]
[DAGCombine] Use FoldConstantArithmetic() to perform ((c1-A)+c2) -> (c1+c2)-A fold
Summary: No tests change, and i'm not sure how to test this, but it's better safe than sorry.
Reviewers: spatel, RKSimon, craig.topper, t.p.northover
Reviewed By: craig.topper
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62661
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362130
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 30 May 2019 18:48:23 +0000 (18:48 +0000)]
Reapply: IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe
how many bytes a 'byval' parameter should occupy on the stack. This adds
a (for now) optional extra type parameter.
If present, the type must match the pointee type of the argument.
The original commit did not remap byval types when linking modules, which broke
LTO. This version fixes that.
Note to front-end maintainers: if this causes test failures, it's probably
because the "byval" attribute is printed after attributes without any parameter
after this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362128
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Thu, 30 May 2019 18:46:34 +0000 (18:46 +0000)]
[AMDGPU] Added target-specific attribute amdgpu-max-memory-clause
With LLPC, previous investigation has suggested that si-scheduler
interacts badly with SiFormMemoryClauses on an XNACK target in some
games.
That needs further investigation in the future. In the meantime, this
commit adds a target-specific attribute to allow us to disable
SIFormMemoryClauses by setting it to 1 on a per-function basis for LLPC
to use.
Differential Revision: https://reviews.llvm.org/D62572
Change-Id: Ia0ca12ce79093cbbe86caded723ffb13384ede92
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362127
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 30 May 2019 18:46:13 +0000 (18:46 +0000)]
[LV] Remove the redundant using LoopVectorizationPlanner:VPlanPtr
VPlan.h already contains the declaration of VPlanPtr type alias:
using VPlanPtr = std::unique_ptr<VPlan>;
The LoopVectorizationPlanner class also contains the same declaration
of VPlanPtr and therefore LoopVectorize requires a long wording when
its methods return VPlanPtr:
LoopVectorizationPlanner::VPlanPtr
LoopVectorizationPlanner::buildVPlanWithVPRecipes(...)
but LoopVectorize.cpp includes VPlan.h (via LoopVectorizationPlanner.h)
and can use VPlanPtr from that header.
Patch by Pavel Samolysov.
Reviewers: hsaito, rengolin, fhahn
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D62576
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362126
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 May 2019 18:19:35 +0000 (18:19 +0000)]
[LoopVectorize] Add FNeg instruction support
Differential Revision: https://reviews.llvm.org/D62510
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362124
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Trent [Thu, 30 May 2019 18:17:10 +0000 (18:17 +0000)]
Reverting change r362121 due to lld-x86_64-ubuntu-fast test failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362123
91177308-0d34-0410-b5e6-
96231b3b80d8
Puyan Lotfi [Thu, 30 May 2019 18:06:28 +0000 (18:06 +0000)]
[MIR-Canon] Add support for rewriting VRegs that are typed but don't have an RC.
There were crashes (addrspace-memoperands.mir was only one of them) in MIR that
had operands that came from before register classes were set. With these
operands, creating a replacement vreg (for MIR-Canon's renaming) needs to use
the vreg type rather than the RegisterClass which is not present.
Differential Revision: https://reviews.llvm.org/D62543
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362122
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Trent [Thu, 30 May 2019 17:56:05 +0000 (17:56 +0000)]
Support Universal dSYM files in llvm-objdump
Summary:
Commonly programmers use llvm-objdump to disassemble Mach-O target
binaries with Mach-O dSYMS. While llvm-objdump allows programmers to
disassemble Universal binaries, it previously did not recognize
Universal dSYM files. This change updates llvm-objdump to support
passing in Universal files via the -dsym option. Now, when
disassembling a Mach-O file either as a stand alone file or as an entry
in a Universal binariy, llvm-objdump will search through a Universal
dSYM for a Mach-O matching the architecture flag of the file being
disassembled.
Reviewers: pete, lhames
Reviewed By: pete
Subscribers: rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62642
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362121
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Korous [Thu, 30 May 2019 17:54:26 +0000 (17:54 +0000)]
[NFC] Fix SmallVector::append comments
Fix the copy-pasted comment.
Remove low-value comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362120
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin P. Neal [Thu, 30 May 2019 17:21:45 +0000 (17:21 +0000)]
Correct error in revert of r362112.
Differential Revision: http://reviews.llvm.org/D62546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362118
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin P. Neal [Thu, 30 May 2019 17:10:21 +0000 (17:10 +0000)]
Revert r362112, it broke the bots with the message "Unsupported vector argument or return type"
Differential Revision: http://reviews.llvm.org/D62546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362117
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 16:50:43 +0000 (16:50 +0000)]
[NFC][Codegen] Potential add/sub constant folding: fixup non-splat tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362114
91177308-0d34-0410-b5e6-
96231b3b80d8
J. Ryan Stinnett [Thu, 30 May 2019 16:46:22 +0000 (16:46 +0000)]
[Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS" when no specific version number is
mentioned.
If a specific version is mentioned, this attempts to use the OS name at the time
of that version:
* Mac OS X for 10.0 - 10.7
* OS X for 10.8 - 10.11
* macOS for 10.12 - present
Reviewers: JDevlieghere
Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits
Tags: #clang, #lldb, #libc, #llvm
Differential Revision: https://reviews.llvm.org/D62654
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362113
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin P. Neal [Thu, 30 May 2019 16:44:47 +0000 (16:44 +0000)]
[FPEnv] Added a special UnrollVectorOp method to deal with the chain on StrictFP opcodes
This change creates UnrollVectorOp_StrictFP. The purpose of this is to address a failure that consistently occurs when calling StrictFP functions on vectors whose number of elements is 3 + 2n on most platforms, such as PowerPC or SystemZ. The old UnrollVectorOp method does not expect that the vector that it will unroll will have a chain, so it has an assert that prevents it from running if this is the case. This new StrictFP version of the method deals with the chain while unrolling the vector. With this new function in place during vector widending, llc can run vector-constrained-fp-intrinsics.ll for SystemZ successfully.
Submitted by: Drew Wock <drew.wock@sas.com>
Reviewed by: Cameron McInally, Kevin P. Neal
Approved by: Cameron McInally
Differential Revision: http://reviews.llvm.org/D62546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362112
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 16:07:19 +0000 (16:07 +0000)]
[NFC][Codegen] Add better test coverage for potential add/sub constant folding
This adds hopefully-full test coverage for all the possible permutations:
First op is one of:
* x + c1
* x - c1
* c1 - x
Second op is one of:
* + c2
* - c2
* c2 -
And thus 3*3=9 patterns.
Some of them show missed constant-folds.
Without previous patch (the revert), these tests were causing endless
dagcombine loop. I really should have thought about this first :S
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362110
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 16:07:11 +0000 (16:07 +0000)]
[DAGCombine] Revert of recommit of "binop-with-const hoisting" patches
I was looking into an endless combine loop the uncommitted follow-up patch
was causing, and it appears even these patches can exibit such an
endless loop. The root cause is that we try to hoist one binop (add/sub) with
constant operand, and if we get two such binops both of which are
eligible for this hoisting, we get stuck.
Some cases may highlight missing constant-folds.
Reverts r361871,r361872,r361873,r361874.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362109
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 30 May 2019 15:26:37 +0000 (15:26 +0000)]
[NFC][ARM][ParallelDSP] Refactor narrow sequence
Most of the code used for finding a 'narrow' sequence is not used,
so I've removed it and simplified the calls from the smlad matcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362104
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 30 May 2019 14:34:29 +0000 (14:34 +0000)]
[ARM] Change the MC names for VMAXNM/VMINNM
Now the NEON ones have a prefix "NEON_", and the VFP ones have a
prefix "VFP_". This is so that the regex in ARMScheduleA57.td can be
made to match both of _those_ classes of VMAXNM without also matching
the MVE ones that are going to be introduced soon. NFCI.
Patch by Simon Tatham.
Differential Revision: https://reviews.llvm.org/D60700
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362097
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 30 May 2019 14:01:24 +0000 (14:01 +0000)]
[ARM] LowerVECTOR_SHUFFLE - fix uninitialized variable warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362094
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 13:02:11 +0000 (13:02 +0000)]
[NFC][Codegen] Add add+sub/sub+add constant-fold tests for from D62257
add+sub/sub+add when second operands are constants should be folded
into a single add, just like with add+add.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362093
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 13:02:06 +0000 (13:02 +0000)]
[LoopIdiom] Basic OptimizationRemarkEmitter handling
Summary:
I'm adding ORE to memset/memcpy formation, with tests,
but mainly this is split off from D61144.
Reviewers: reames, anemet, thegameg, craig.topper
Reviewed By: thegameg
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362092
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 30 May 2019 13:01:53 +0000 (13:01 +0000)]
[LoopIdiomRecognize][NFC] Sort includes
Split off from D61144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362091
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 30 May 2019 12:57:04 +0000 (12:57 +0000)]
[ARM] add target arch definitions for 8.1-M and MVE
This adds:
- LLVM subtarget features to make all the new instructions conditional on,
- CPU and FPU names for use on clang's command line, with default FPUs set
so that "armv8.1-m.main+fp" and "armv8.1-m.main+fp.dp" will select the right
FPU features,
- architecture extension names "mve" and "mve.fp",
- ABI build attribute support for v8.1-M (a new value for Tag_CPU_arch) and MVE
(a new actual tag).
Patch mostly by Simon Tatham.
Differential Revision: https://reviews.llvm.org/D60698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362090
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 30 May 2019 12:39:05 +0000 (12:39 +0000)]
[llvm-readobj] - Rewrite reloc-types.test to use YAML. NFCI.
This change rewrites and splits reloc-types.test
to use yaml2obj instead of precompiled binaries.
That allowed to remove 7 precompiled objects from the inputs.
I took the existent objects, used obj2yaml on them, simplified the result and
used yaml2obj in the test case with the result.
Notes:
* I converted, but did not remove relocs.obj.elf-i386, relocs.obj.elf-x86_64 or relocs.obj.elf-mips objects
because found they are used in other tests.
* I was unable to convert relocs.obj.elf-ppc64, because obj2yaml hangs on this file for me.
* I was unable to convert relocs.obj.macho-arm, relocs.obj.macho-i386 and relocs.obj.macho-x86_64
because the output produced by obj2yaml does not seem to be correct.
* Because of the above I did not remove the script for creating all
of those objects: test\tools\llvm-readobj\Inputs\relocs.py
Differential revision: https://reviews.llvm.org/D62594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362089
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 30 May 2019 12:37:05 +0000 (12:37 +0000)]
[ARM] Introduce separate features for FP registers
The MVE extension in Arm v8.1-M permits the use of some move, load and
store isntructions which access the FP registers, even if there's no
actual FP support in the processor (in particular, if you have the
integer-only version of MVE).
Therefore, we need separate subtarget features to condition those
instructions on, which are implied by both FP and MVE but are not part
of either.
Patch mostly by Simon Tatham.
Differential Revision: https://reviews.llvm.org/D60694
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362088
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 30 May 2019 10:42:47 +0000 (10:42 +0000)]
[llvm-readobj] - An attemp to fix BB.
BB failed:
http://lab.llvm.org:8011/builders/clang-armv7-linux-build-cache/builds/15062/steps/build%20stage%201/logs/stdio
Error was:
/home/buildslave/buildslave/clang-armv7-linux-build-cache/llvm/tools/llvm-readobj/ELFDumper.cpp:3540:7:
error: non-constant-expression cannot be narrowed from type 'llvm::support::detail::packed_endian_specific_integral<unsigned long long,
llvm::support::endianness::little, 1>::value_type' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
StrTabSec->sh_size};
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362084
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 30 May 2019 10:41:04 +0000 (10:41 +0000)]
[CostModel][X86] Add bool vector and/or/xor cost tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362083
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 30 May 2019 10:36:52 +0000 (10:36 +0000)]
[llvm-readobj/llvm-readelf] - Implement GNU style dumper of the SHT_GNU_verdef section.
It was not implemented yet, we had only LLVM style dumper implemented.
Section description is here: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html
Differential revision: https://reviews.llvm.org/D62520
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362082
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 30 May 2019 10:25:20 +0000 (10:25 +0000)]
[X86][SSE] Improve bool vector extload (PR26091)
We already have good codegen for (vXiY *ext(vXi1 bitcast(iX))) cases, this patch uses it for loads of vXi1 types as well - changing the load into a iX integer load, and bitcasting so that combineToExtendBoolVectorInReg can then use it.
Differential Revision: https://reviews.llvm.org/D62449
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362081
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 30 May 2019 10:14:41 +0000 (10:14 +0000)]
[llvm-readobj/llvm-readelf] - Implement GNU style dumper of the SHT_GNU_verneed section.
It was not implemented yet, we had only LLVM style dumper implemented.
Section description is here: https://refspecs.linuxfoundation.org/LSB_2.0.1/LSB-Core/LSB-Core/symverrqmts.html
Differential revision: https://reviews.llvm.org/D62516
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362080
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 30 May 2019 09:40:35 +0000 (09:40 +0000)]
Fix sphinx warning about missing footnote.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362077
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Thu, 30 May 2019 09:09:01 +0000 (09:09 +0000)]
[llvm-objcopy] Remove %p format specifiers
On 32-bit machines %p expects 32 bit values, however
addresses in llvm-objcopy are always 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362074
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 30 May 2019 08:51:39 +0000 (08:51 +0000)]
[AArch64][SVE2] Asm: support SVE2 vector splice (constructive)
Summary:
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D62530
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362073
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 30 May 2019 08:44:27 +0000 (08:44 +0000)]
[AArch64][SVE2] Asm: support SVE2 load instructions
Summary:
Patch adds support for the following instructions:
* LDNT1SB, LDNT1B, LDNT1SH, LDNT1H, LDNT1SW, LDNT1W, LDNT1D
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D62528
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362072
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 30 May 2019 08:35:12 +0000 (08:35 +0000)]
[AArch64][SVE2] Asm: support FCVTX/FLOGB instructions
Summary:
Patch completes SVE2 support for:
SVE Floating Point Unary Operations - Predicated Group
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D62526
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362071
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 30 May 2019 08:25:17 +0000 (08:25 +0000)]
[AArch64][SVE2] Asm: add ext (immediate offset, constructive) instruction
Summary:
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: chill
Differential Revision: https://reviews.llvm.org/D62518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362070
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 30 May 2019 08:07:06 +0000 (08:07 +0000)]
[ARM] Add an MVE execution domain
MVE architecturally specifies a 'beat' system in which a vector
instruction executed now will complete its actual operation over the
next four cycles, so it can overlap with the execution of the previous
and next MVE instruction.
This makes it generally an advantage to avoid moving values back and
forth between MVE registers and anywhere else, if there's any sensible
way to do the same processing in whatever register type the values
already occupied.
That's just what the 'execution domain' system is supposed to achieve.
So here we add a new execution domain which will contain all the MVE
vector instructions when they are added.
Patch by: Simon Tatham
Differential Revision: https://reviews.llvm.org/D60703
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362068
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 30 May 2019 07:38:09 +0000 (07:38 +0000)]
[TableGen] AsmMatcher: allow repeated input operands
If an assembly instruction has to mention an input operand name twice,
for example the MVE VMOV instruction that accesses two lanes of the
same vector by writing 'vmov r1, r2, q0[3], q0[1]', then the obvious
way to write its AsmString is to include the same operand (here $Qd)
twice. But this causes the AsmMatcher generator to omit that
instruction completely from the match table, on the basis that the
generator isn't clever enough to deal with the duplication.
But you need to have _some_ way of dealing with an instruction like
this - and in this case, where the mnemonic is shared with many other
instructions that the AsmMatcher does handle, it would be very painful
to take it out of the AsmMatcher system completely.
A nicer way is to add a custom AsmMatchConverter routine, and let that
deal with the problem if the autogenerated converter can't. But that
doesn't work, because TableGen leaves the instruction out of its table
_even_ if you provide a custom converter.
Solution: this change, which makes TableGen relax the restriction on
duplicated operands in the case where there's a custom converter.
Patch by: Simon Tatham
Differential Revision: https://reviews.llvm.org/D60695
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362066
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Thu, 30 May 2019 07:34:39 +0000 (07:34 +0000)]
[CMake] Use find_package(LLVM) instead of LLVMConfig
This addresses an issues introduced in r362047.
Differential Revision: https://reviews.llvm.org/D62640
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362065
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 30 May 2019 07:30:37 +0000 (07:30 +0000)]
[TableGen] New default operand "undef_tied_input"
This is a new special identifier which you can use as a default in
OperandWithDefaultOps. The idea is that you use it for an input
operand of an instruction that's tied to an output operand, and its
semantics are that (in the default case) the input operand's value is
not used at all.
The detailed effect is that when instruction selection emits the
instruction in the form of a pre-regalloc MachineInstr, it creates an
IMPLICIT_DEF node to use as that input.
If you're creating an MCInst with explicit register names, then the
right handling would be to set the input operand to the same register
as the output one (honouring the tie) and to add the 'undef' flag
indicating that that register is deemed to acquire a new don't-care
definition just before we read it. But I haven't done that in this
commit, because there was no need to - no Tablegen backend seems to
autogenerate default fields in an MCInst.
Patch by: Simon Tatham
Differential Revision: https://reviews.llvm.org/D60696
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362064
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 30 May 2019 06:48:13 +0000 (06:48 +0000)]
[LoopVectorize] Precommit tests for D62510. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362060
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 30 May 2019 05:03:12 +0000 (05:03 +0000)]
[LV] Inform about exactly reason of loop illegality
Currently, only the following information is provided by LoopVectorizer
in the case when the CF of the loop is not legal for vectorization:
LV: Can't vectorize the instructions or CFG
LV: Not vectorizing: Cannot prove legality.
But this information is not enough for the root cause analysis; what is
exactly wrong with the loop should also be printed:
LV: Not vectorizing: The exiting block is not the loop latch.
Patch by Pavel Samolysov.
Reviewers: mkuper, hsaito, rengolin, fhahn
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D62311
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362056
91177308-0d34-0410-b5e6-
96231b3b80d8
Pengfei Wang [Thu, 30 May 2019 03:59:16 +0000 (03:59 +0000)]
[X86] Add ENQCMD instructions
For more details about these instructions, please refer to the latest
ISE document:
https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference.
Patch by Tianqing Wang (tianqing)
Differential Revision: https://reviews.llvm.org/D62281
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362053
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Thu, 30 May 2019 01:24:31 +0000 (01:24 +0000)]
[CMake] Set LLVM_PATH in the runtimes build
This avoids using llvm-config for inferring various paths within the
runtimes build. We also set LLVM_INCLUDE_DIR variable that's used by
these builds and move assignment of LLVM_BINARY_DIR and LLVM_LIBRARY_DIR
to the same location for consistency.
Differential Revision: https://reviews.llvm.org/D62637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362047
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Korous [Thu, 30 May 2019 01:08:38 +0000 (01:08 +0000)]
[BitstreamWriter][NFC] Remove obsolete comment.
The Abbv parameter was just a raw pointer when the comment was written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362046
91177308-0d34-0410-b5e6-
96231b3b80d8
Seiya Nuta [Wed, 29 May 2019 22:21:12 +0000 (22:21 +0000)]
[llvm-objcopy][MachO] Print an error message on use of unsupported options
Summary:
It is better to print an error message instead of silently ignoring unsupported options.
As mentioned in https://reviews.llvm.org/D57045, this is not the best solution and we should print which flag is not supported at some time.
Reviewers: alexshap, rupprecht, jhenderson, jakehehrlich
Reviewed By: alexshap, rupprecht, jakehehrlich
Subscribers: jakehehrlich, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62578
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362040
91177308-0d34-0410-b5e6-
96231b3b80d8
Amy Huang [Wed, 29 May 2019 21:45:34 +0000 (21:45 +0000)]
CodeView - add static data members to global variable debug info.
Summary:
Add static data members to IR debug info's list of global variables
so that they are emitted as S_CONSTANT records.
Related to https://bugs.llvm.org/show_bug.cgi?id=41615.
Reviewers: rnk
Subscribers: aprantl, cfe-commits, llvm-commits, thakis
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D62167
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362038
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 29 May 2019 21:26:25 +0000 (21:26 +0000)]
[llvm-pdbutil] Dump inline call site line table annotations
This ports and improves on some existing llvm-readobj -codeview dumping
functionality that llvm-pdbutil lacked.
Helpful for comparing inline line tables between MSVC and clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362037
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 29 May 2019 20:47:59 +0000 (20:47 +0000)]
LoopVersioningLICM: Respect convergent and noduplicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362031
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 29 May 2019 20:46:38 +0000 (20:46 +0000)]
Revert "IR: add optional type to 'byval' function parameters"
The IRLinker doesn't delve into the new byval attribute when mapping types, and
this breaks LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362029
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Wed, 29 May 2019 20:11:53 +0000 (20:11 +0000)]
[LoopIdiomRecognize][NFC] Use DEBUG_TYPE, add LLVM_DEBUG() to runOnNoncountableLoop()
Split off from D61144
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362022
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Couperus [Wed, 29 May 2019 20:07:35 +0000 (20:07 +0000)]
[ARC] Cleanup ARCAsmPrinter.
Summary:
Remove unused getTargetStreamer.
Remove unused headers.
Reviewers: dantrushin
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62549
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362021
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Wed, 29 May 2019 20:03:00 +0000 (20:03 +0000)]
UpdateTestChecks: Lanai triple support
Summary:
The assembly structure most resembles the SPARC pattern:
```
.globl f6 ! -- Begin function f6
.p2align 2
.type f6,@function
f6: ! @f6
.cfi_startproc
! %bb.0:
st %fp, [--%sp]
<...>
ld -8[%fp], %fp
.Lfunc_end0:
.size f6, .Lfunc_end0-f6
.cfi_endproc
! -- End function
```
Test being affected by upcoming patch, so regenerate it.
Reviewers: RKSimon, jpienaar
Reviewed By: RKSimon
Subscribers: jyknight, fedor.sergeev, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62545
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362019
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 29 May 2019 20:00:36 +0000 (20:00 +0000)]
gn build: Make it possible to build with coverage information
Differential Revision: https://reviews.llvm.org/D62508
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362018
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 29 May 2019 19:24:19 +0000 (19:24 +0000)]
[DAGCombiner] Replace gathers with a zero mask with the passthru value
These can be created by the legalizer when splitting a larger gather.
See https://llvm.org/PR42055 for a motivating example.
Differential Revision: https://reviews.llvm.org/D62613
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362015
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 29 May 2019 19:12:48 +0000 (19:12 +0000)]
IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe
how many bytes a 'byval' parameter should occupy on the stack. This adds
a (for now) optional extra type parameter.
If present, the type must match the pointee type of the argument.
Note to front-end maintainers: if this causes test failures, it's probably
because the "byval" attribute is printed after attributes without any parameter
after this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362012
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Wed, 29 May 2019 18:37:49 +0000 (18:37 +0000)]
[CMake] [Runtimes] Set *_STANDALONE_BUILD
Summary:
The runtimes use `*_STANDALONE_BUILD=OFF` to signify that clang is an in-tree target. This is not the case with the runtime builds, so we really need this set to `ON`.
In order to resolve the issues phosek was having with checks, we should use checks that don't link. We can use compiler-rt's `try_compile_only` as a basis for that.
This patch is *required* to be able to run the runtime libraries check-* targets.
Reviewers: smeenai, phosek, compnerd
Reviewed By: phosek
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62410
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362007
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Wed, 29 May 2019 18:37:13 +0000 (18:37 +0000)]
[InstCombine] Optimize always overflowing signed saturating add/sub
Based on the overflow direction information added in D62463, we can
now fold always overflowing signed saturating add/sub to signed min/max.
Differential Revision: https://reviews.llvm.org/D62544
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362006
91177308-0d34-0410-b5e6-
96231b3b80d8
Aakanksha Patil [Wed, 29 May 2019 18:20:11 +0000 (18:20 +0000)]
AMDGPU: Return address lowering
The patch computes the return address for the current function.
Differential revision: https://reviews.llvm.org/D59666
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362001
91177308-0d34-0410-b5e6-
96231b3b80d8
Stella Stamenova [Wed, 29 May 2019 18:07:39 +0000 (18:07 +0000)]
lit: modernize the lit configuration for the lit tests
Summary: This also normalizes the config feature that represents the windows platform to "system-windows" as opposed to having both "windows" and "system-windows"
Reviewers: asmith, probinson
Subscribers: delcypher, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361998
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Wed, 29 May 2019 17:14:48 +0000 (17:14 +0000)]
Yet another attempt to fix buildbot after r361949
Looks like %p format specifier of createStringError behaves
differently on different platforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361993
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 29 May 2019 17:02:27 +0000 (17:02 +0000)]
[X86] Fix machineverifier error on avx512f-256-set0.mir
Previously the pass ran the entire llc pipeline which caused the IR to be recodegened.
This commit restricts it to just running the postrapseudos pass and checking the results of that instead of the final assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361991
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 29 May 2019 16:59:48 +0000 (16:59 +0000)]
CallSiteSplitting: Respect convergent and noduplicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361990
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 29 May 2019 16:50:46 +0000 (16:50 +0000)]
[ThinLTO] Use original alias visibility when importing
Summary:
When we import an alias, we do so by making a clone of the aliasee. Just
as this clone uses the original alias name and linkage, it should also
use the same visibility (not the aliasee's visibility). Otherwise,
linker behavior is affected (e.g. if the aliasee was hidden, but the
alias is not, the resulting imported clone should not be hidden,
otherwise the linker will make the final symbol hidden which is
incorrect).
Reviewers: wmi
Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62535
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361989
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 29 May 2019 16:50:14 +0000 (16:50 +0000)]
[NFC][InstCombine] Add a unary FNeg test to fsub.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361988
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin P. Neal [Wed, 29 May 2019 16:29:31 +0000 (16:29 +0000)]
Partial revert of revert of r361827: Add constrained intrinsic tests for powerpc64le.
The powerpc64-"nonle" tests are removed. They fail because of a bug that
Drew is currently working on that affects multiple targets.
Submitted by: Drew Wock <drew.wock@sas.com>
Reviewed by: Hal Finkel, Kevin P. Neal
Approved by: Hal Finkel
Differential Revision: http://reviews.llvm.org/D62388
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361985
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 29 May 2019 15:29:35 +0000 (15:29 +0000)]
[NFC][InstCombine] Add unary FNeg tests to fpcast.ll and fpextend.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361973
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 29 May 2019 15:21:28 +0000 (15:21 +0000)]
[NFC][InstCombine] Add unary FNeg tests to fsub.ll known-never-nan.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361971
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam McCall [Wed, 29 May 2019 15:02:16 +0000 (15:02 +0000)]
Qualify use of llvm::empty that's ambiguous with std::empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361968
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 29 May 2019 14:59:07 +0000 (14:59 +0000)]
[mips] Use reg-exp in tests to tolerate register indexes changing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361966
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 29 May 2019 14:58:56 +0000 (14:58 +0000)]
[mips] Iterate over MSACtrlRegClass to reserve all MSA control registers. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361965
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 29 May 2019 14:58:50 +0000 (14:58 +0000)]
[mips] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361964
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 29 May 2019 14:39:37 +0000 (14:39 +0000)]
Revert rL361944 from llvm/trunk :
[ADT] add iterator_range::empty()
........
Breaks windows buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361963
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 29 May 2019 14:15:35 +0000 (14:15 +0000)]
gn build: Merge r361953
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361961
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Wed, 29 May 2019 13:41:57 +0000 (13:41 +0000)]
[ARM] Split predicates out into their own .td file
The new ARMPredicates.td is included from ARM.td, early enough that
the predicate definitions are already in scope when ARMSchedule.td is
included. This will make it possible to refer to them in
UnsupportedFeatures fields of scheduling models.
NFC: the chunk of Tablegen being moved here is copied and pasted
verbatim.
Patch by: Simon Tatham
Differential Revision: https://reviews.llvm.org/D60693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361958
91177308-0d34-0410-b5e6-
96231b3b80d8