OSDN Git Service
Daniel Sanders [Mon, 11 Feb 2019 20:05:49 +0000 (20:05 +0000)]
[globalisel] Restore comment explaining the nits of GISelChangeObserver::createdInstr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353741
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Mon, 11 Feb 2019 19:51:21 +0000 (19:51 +0000)]
[MemorySSA] Remove verifyClobberSanity.
Summary:
This verification may fail after certain transformations due to
BasicAA's fragility. Added a small explanation and a testcase that
triggers the assert in checkClobberSanity (before its removal).
Addresses PR40509.
Reviewers: george.burgess.iv
Subscribers: sanjoy, jlebar, llvm-commits, Prazek
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353739
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kruse [Mon, 11 Feb 2019 19:45:44 +0000 (19:45 +0000)]
Refactor setAlreadyUnrolled() and setAlreadyVectorized().
Loop::setAlreadyUnrolled() and
LoopVectorizeHints::setLoopAlreadyUnrolled() both add loop metadata that
stops the same loop from being transformed multiple times. This patch
merges both implementations.
In doing so we fix 3 potential issues:
* setLoopAlreadyUnrolled() kept the llvm.loop.vectorize/interleave.*
metadata even though it will not be used anymore. This already caused
problems such as http://llvm.org/PR40546. Change the behavior to the
one of setAlreadyUnrolled which deletes this loop metadata.
* setAlreadyUnrolled() used to create a new LoopID by calling
MDNode::get with nullptr as the first operand, then replacing it by
the returned references using replaceOperandWith. It is possible
that MDNode::get would instead return an existing node (due to
de-duplication) that then gets modified. To avoid, use a fresh
TempMDNode that does not get uniqued with anything else before
replacing it with replaceOperandWith.
* LoopVectorizeHints::matchesHintMetadataName() only compares the
suffix of the attribute to set the new value for. That is, when
called with "enable", would erase attributes such as
"llvm.loop.unroll.enable", "llvm.loop.vectorize.enable" and
"llvm.loop.distribute.enable" instead of the one to replace.
Fortunately, function was only called with "isvectorized".
Differential Revision: https://reviews.llvm.org/D57566
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353738
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 11 Feb 2019 19:26:27 +0000 (19:26 +0000)]
[InstCombine] Fix matchRotate bug when one operand is a ConstantExpr shift
This bug seems to be harmless in release builds, but will cause an error in UBSAN
builds or an assertion failure in debug builds.
When it gets to this opcode comparison, it assumes both of the operands are BinaryOperators,
but the prior m_LogicalShift will also match a ConstantExpr. The cast<BinaryOperator> will
assert in a debug build, or reading an invalid value for BinaryOp from memory with
((BinaryOperator*)constantExpr)->getOpcode() will cause an error in a UBSAN build.
The test I added will fail without this change in debug/UBSAN builds, but not in release.
Patch by: @AndrewScheidecker (Andrew Scheidecker)
Differential Revision: https://reviews.llvm.org/D58049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353736
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Mon, 11 Feb 2019 19:23:30 +0000 (19:23 +0000)]
[SelectionDAGBuilder] Add restrictions to EmitFuncArgumentDbgValue
Summary:
This patch fixes PR40587.
When a dbg.value instrinsic is emitted to the DAG
by using EmitFuncArgumentDbgValue the resulting
DBG_VALUE is hoisted to the beginning of the entry
block. I think the idea is to be able to locate
a formal argument already from the start of the
function.
However, EmitFuncArgumentDbgValue only checked that
the value that was used to describe a variable was
originating from a function parameter, not that the
variable itself actually was an argument to the
function. So when for example assigning a local
variable "local" the value from an argument "a",
the assocated DBG_VALUE instruction would be hoisted
to the beginning of the function, even if the scope
for "local" started somewhere else (or if "local"
was mapped to other values earlier in the function).
This patch adds some logic to EmitFuncArgumentDbgValue
to check that the variable being described actually
is an argument to the function. And that the dbg.value
being lowered already is in the entry block. Otherwise
we bail out, and the dbg.value will be handled as an
ordinary dbg.value (not as a "FuncArgumentDbgValue").
A tricky situation is when both the variable and
the value is related to function arguments, but not
neccessarily the same argument. We make sure that we
do not describe the same argument more than once as
a "FuncArgumentDbgValue". This solution works as long
as opt has injected a "first" dbg.value that corresponds
to the formal argument at the function entry.
Reviewers: jmorse, aprantl
Subscribers: jyknight, hiraditya, fedor.sergeev, dstenb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57702
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353735
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Mon, 11 Feb 2019 19:07:15 +0000 (19:07 +0000)]
[LICM&MSSA] Limit store hoisting.
Summary:
If there is no clobbering access for a store inside the loop, that store
can only be hoisted if there are no interfearing loads.
A more general verification introduced here: there are no loads that are
not optimized to an access outside the loop.
Addresses PR40586.
Reviewers: george.burgess.iv
Subscribers: sanjoy, jlebar, Prazek, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57967
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353734
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Mon, 11 Feb 2019 19:02:28 +0000 (19:02 +0000)]
[TargetLibraryInfo] Update run time support for Windows
It seems that the run time for Windows has changed and supports more math
functions than it used to, especially on AArch64, ARM, and AMD64.
Fixes PR40541.
Differential revision: https://reviews.llvm.org/D57625
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353733
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 11 Feb 2019 18:56:39 +0000 (18:56 +0000)]
[AArch64][GlobalISel] Add isel support for a couple vector exts/truncs
Add support for
- v4s16 <-> v4s32
- v2s64 <-> v2s32
And update tests that use them to show that we generate the correct
instructions.
Differential Revision: https://reviews.llvm.org/D57832
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353732
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 11 Feb 2019 18:41:22 +0000 (18:41 +0000)]
[GlobalISel][AArch64] NFC: Remove unnecessary IR from select-fp-casts.mir
The IR section in this test doesn't do anything, so there's no point in it
being there. Since it's redundant, just remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353731
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Mon, 11 Feb 2019 18:05:48 +0000 (18:05 +0000)]
[DebugInfo] Fix /usr/lib/debug llvm-symbolizer lookup with relative paths
Summary:
rL189250 added a realpath call, and rL352916 because realpath breaks assumptions with some build systems. However, the /usr/lib/debug case has been clarified, falling back to /usr/lib/debug is currently broken if the obj passed in is a relative path. Adding a call to use absolute paths when falling back to /usr/lib/debug fixes that while still not making any realpath assumptions.
This also adds a --fallback-debug-path command line flag for testing (since we probably can't write to /usr/lib/debug from buildbot environments), but was also verified manually:
```
$ rm -f path/to/dwarfdump-test.elf-x86-64
$ strace llvm-symbolizer --obj=relative/path/to/dwarfdump-test.elf-x86-64.debuglink 0x40113f |& grep dwarfdump
```
Lookups went to relative/path/to/dwarfdump-test.elf-x86-64, relative/path/to/.debug/dwarfdump-test.elf-x86-64, and then finally /usr/lib/debug/absolute/path/to/dwarfdump-test.elf-x86-64.
Reviewers: dblaikie, samsonov
Reviewed By: dblaikie
Subscribers: krytarowski, aprantl, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353730
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 11 Feb 2019 17:55:47 +0000 (17:55 +0000)]
[MCA][Scheduler] Track resources that were found busy when issuing an instruction.
This is a follow up of r353706. When the scheduler fails to issue a ready
instruction to the underlying pipelines, it now updates a mask of 'busy resource
units'. That information will be used in future to obtain the set of
"problematic" resources in the case of bottlenecks caused by resource pressure.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353728
91177308-0d34-0410-b5e6-
96231b3b80d8
Roland Froese [Mon, 11 Feb 2019 17:29:14 +0000 (17:29 +0000)]
[PowerPC] Avoid scalarization of vector truncate
The PowerPC code generator currently scalarizes vector truncates that would fit in a vector register, resulting in vector extracts, scalar operations, and vector merges. This patch custom lowers a vector truncate that would fit in a register to a vector shuffle instead.
Differential Revision: https://reviews.llvm.org/D56507
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353724
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 11 Feb 2019 17:22:58 +0000 (17:22 +0000)]
[GlobalISel][AArch64] Select G_FFLOOR
This teaches the legalizer about G_FFLOOR, and lets us select G_FFLOOR in
AArch64.
It updates the existing floating point tests, and adds a select-floor.mir test.
Differential Revision: https://reviews.llvm.org/D57486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353722
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Mon, 11 Feb 2019 17:16:32 +0000 (17:16 +0000)]
Recommit "[GlobalISel] Add IRTranslator support for G_FFLOOR"
After the changes introduced in r353586, this instruction doesn't cause any
issues for any backend.
Original review: https://reviews.llvm.org/D57485
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353720
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 11 Feb 2019 17:05:20 +0000 (17:05 +0000)]
GlobalISel: Add G_FCANONICALIZE instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353719
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Mon, 11 Feb 2019 16:28:42 +0000 (16:28 +0000)]
[AMDGPU] fix atomic_optimizations_buffer.ll test after DPP combiner was enabled by default.
Related commits: rL353691, rL353703.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353717
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 11 Feb 2019 16:16:09 +0000 (16:16 +0000)]
[X86] Regenerate insertelement tests
Add common X86/X64 prefixes (and use X86 instead of X32)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353716
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 11 Feb 2019 15:40:02 +0000 (15:40 +0000)]
Add recipes for migrating downstream branches of git mirrors
Add some common recipes for downstream users developing on top of the
existing git mirrors. These instructions show how to migrate local
branches to the monorepo.
Differential Revision: https://reviews.llvm.org/D56550
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353713
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 11 Feb 2019 15:16:21 +0000 (15:16 +0000)]
Move some classes into anonymous namespaces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353710
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 11 Feb 2019 14:53:04 +0000 (14:53 +0000)]
[MCA] Return a mask of busy resources from method ResourceManager::checkAvailability(). NFCI
In case of bottlenecks caused by pipeline pressure, we want to be able to
correctly report the set of problematic pipelines. This is a first step towards
adding support for bottleneck hints in llvm-mca (see PR37494). No functional
change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353706
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 11 Feb 2019 14:49:54 +0000 (14:49 +0000)]
[AMDGPU] Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353704
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Henning [Mon, 11 Feb 2019 14:44:14 +0000 (14:44 +0000)]
[AMDGPU] Fix DPP sequence in atomic optimizer.
This commit fixes the DPP sequence in the atomic optimizer (which was
previously missing the row_shr:3 step), and works around a read_register
exec bug by using a ballot instead.
Differential Revision: https://reviews.llvm.org/D57737
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353703
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam McCall [Mon, 11 Feb 2019 14:05:36 +0000 (14:05 +0000)]
Revert "[X86][SSE] Generalize X86ISD::BLENDI support to more value types"
This reverts commit r353610.
It causes a miscompile visible in macro expansion in a bootstrapped clang.
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20190211/626590.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353699
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Mon, 11 Feb 2019 12:58:18 +0000 (12:58 +0000)]
[TEST] Add missing opportunity test for PR39673
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353693
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 11 Feb 2019 11:35:42 +0000 (11:35 +0000)]
[ARM] Add v8m.base pattern for add negative imm
The v8m.base ISA contains movw, which can operate on an unsigned
16-bit value. Add the pattern that converts an add with a negative
value, that could fit into 16-bits when negated, into a sub with that
positive value.
Differential Revision: https://reviews.llvm.org/D57942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353692
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Mon, 11 Feb 2019 11:15:03 +0000 (11:15 +0000)]
[AMDGPU] Enable DPP combiner pass by default.
Related revisions: https://reviews.llvm.org/D55444, https://reviews.llvm.org/D55314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353691
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 11 Feb 2019 10:52:49 +0000 (10:52 +0000)]
[NFC][ARM] Simplify loop-indexing codegen test
Remove unnecessary offset checks, CHECK-BASE checks and add some
extra -NOT checks and TODO comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353689
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Mon, 11 Feb 2019 10:44:57 +0000 (10:44 +0000)]
[TEST] Add failing test from PR40454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353688
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Mon, 11 Feb 2019 10:30:22 +0000 (10:30 +0000)]
test-release.sh: Add option to use ninja
Allow the use of ninja instead of make. This is useful on some
platforms where we'd like to be able to limit the number of link jobs
without slowing down the other steps of the release.
This patch adds a -use-ninja command line option, which sets the
generator to Ninja both for LLVM and the test-suite. It also deals with
some differences between make and ninja:
* DESTDIR handling - ninja doesn't like this to be listed after the
target, but both make and ninja can handle it before the command
* Verbose mode - ninja uses -v, make uses VERBOSE=1
* Keep going mode - make has a -k mode, which builds as much as possible
even when failures are encountered; for ninja we need to set a hard
limit (we use 100 since most people won't look at 100 failures anyway)
I haven't tested with gmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353685
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Mon, 11 Feb 2019 10:17:17 +0000 (10:17 +0000)]
Attempt to fix buildbot after r353679 #2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353683
91177308-0d34-0410-b5e6-
96231b3b80d8
Carlos Alberto Enciso [Mon, 11 Feb 2019 10:16:38 +0000 (10:16 +0000)]
[DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.
Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.
As the test case involves a CFG transformation, move it to the correct location.
Differential Revision: https://reviews.llvm.org/D57444
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353682
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Mon, 11 Feb 2019 10:12:19 +0000 (10:12 +0000)]
Attempt to fix buildbot after r353679
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353681
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Mon, 11 Feb 2019 09:49:37 +0000 (09:49 +0000)]
Small refactoring of FileError. NFC.
Differential revision: https://reviews.llvm.org/D57945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353679
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Mon, 11 Feb 2019 09:37:42 +0000 (09:37 +0000)]
[ARM] LoadStoreOptimizer: reoder limit
The whole design of generating LDMs/STMs is fragile and unreliable: it depends on
rescheduling here in the LoadStoreOptimizer that isn't register pressure aware
and regalloc that isn't aware of generating LDMs/STMs.
This patch adds a (hidden) option to control the total number of instructions that
can be re-ordered. I appreciate this looks only a tiny bit better than a hard-coded
constant, but at least it allows more easy experimentation with different values
for now. Ideally we calculate this reorder limit based on some heuristics, and take
register pressure into account. I might be looking into that next.
Differential Revision: https://reviews.llvm.org/D57954
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353678
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 09:25:41 +0000 (09:25 +0000)]
Move CFLGraph and the AA summary code over to the new `CallBase`
instruction base class rather than the `CallSite` wrapper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353676
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Mon, 11 Feb 2019 09:07:07 +0000 (09:07 +0000)]
[llvm] [cmake] Use current directory in GenerateVersionFromVCS
Find dependent scripts of GenerateVersionFromVCS in current directory
rather than ../../cmake/modules. I do not see any reason why the former
would not work and The latter is incorrect when GenerateVersionFromVCS
is used from install directory (i.e. in stand-alone builds).
Differential Revision: https://reviews.llvm.org/D57996
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353674
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 09:03:32 +0000 (09:03 +0000)]
Remove `CallSite` from the CodeMetrics analysis, moving it to the new
`CallBase` and simpler APIs therein.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353673
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 09:03:26 +0000 (09:03 +0000)]
Remove a declaration that is dead, and not even implemented any longer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353672
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Mon, 11 Feb 2019 08:47:59 +0000 (08:47 +0000)]
[ARM] LoadStoreOptimizer: just a clean-up. NFC.
Differential Revision: https://reviews.llvm.org/D57955
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353670
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 08:25:56 +0000 (08:25 +0000)]
Update more files added with the old header to the new one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353667
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 08:25:19 +0000 (08:25 +0000)]
Update new files added to llvm-objcopy to use the new file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353666
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 08:07:38 +0000 (08:07 +0000)]
Update files that were mistakenly added with the old file header to the
new one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353665
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 08:07:32 +0000 (08:07 +0000)]
Update files that were mistakenly added with the old file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353664
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 07:54:10 +0000 (07:54 +0000)]
[CallSite removal] Port InstSimplify over to use `CallBase` both in its
interface and implementation.
Port code with: `cast<CallBase>(CS.getInstruction())`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353662
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 07:51:44 +0000 (07:51 +0000)]
[CallSite removal] Migrate ConstantFolding APIs and implementation to
`CallBase`.
Users have been updated. You can see how to update any out-of-tree
usages: pass `cast<CallBase>(CS.getInstruction())`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353661
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 11 Feb 2019 07:42:30 +0000 (07:42 +0000)]
[CallSite removal] Migrate the statepoint GC infrastructure to use the
`CallBase` class rather than `CallSite` wrappers.
I pushed this change down through most of the statepoint infrastructure,
completely removing the use of CallSite where I could reasonably do so.
I ended up making a couple of cut-points: generic call handling
(instcombine, TLI, SDAG). As soon as it hit truly generic handling with
users outside the immediate code, I simply transitioned into or out of
a `CallSite` to make this a reasonable sized chunk.
Differential Revision: https://reviews.llvm.org/D56122
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353660
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 11 Feb 2019 07:30:48 +0000 (07:30 +0000)]
[X86] Removed unused SDTypeProfile. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353659
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 11 Feb 2019 03:09:57 +0000 (03:09 +0000)]
gn build: Fix clang-tidy dep on ClangSACheckers.
Patch by Mirko Bonadei <mbonadei@webrtc.org>!
Differential Revision: https://reviews.llvm.org/D57998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353657
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 22:45:48 +0000 (22:45 +0000)]
[X86] EltsFromConsecutiveLoads - replace SmallBitVector with APInt (NFC).
Minor refactor to simplify some incoming patches to improve broadcast loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353655
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Sun, 10 Feb 2019 19:53:43 +0000 (19:53 +0000)]
[GlobalISel] Regex the opcodes in unit test to fix non-deterministic ordering
Differential Revision: https://reviews.llvm.org/D57988
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353652
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 10 Feb 2019 19:06:38 +0000 (19:06 +0000)]
[CodeGen][X86] Don't scalarize vector saturating add/sub
Now that we have vector support for [US](ADD|SUB)O we no longer
need to scalarize when expanding [US](ADD|SUB)SAT.
This matches what the cost model already does.
Differential Revision: https://reviews.llvm.org/D57348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353651
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 18:27:37 +0000 (18:27 +0000)]
[AArch64] Regenerate bswap tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353648
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 18:07:03 +0000 (18:07 +0000)]
[X86] Add basic bitreverse/bswap combine tests
Shows missing SimplifyDemandedBits support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353647
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 17:42:15 +0000 (17:42 +0000)]
[DAG] Add optional AllowUndefs to isNullOrNullSplat
No change in default behaviour (AllowUndefs = false)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353646
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 17:04:00 +0000 (17:04 +0000)]
[DAGCombine] Simplify funnel shifts with undef/zero args to bitshifts
Now that we have SimplifyDemandedBits support for funnel shifts (rL353539), we need to simplify funnel shifts back to bitshifts in cases where either argument has been folded to undef/zero.
Differential Revision: https://reviews.llvm.org/D58009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353645
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 15:46:32 +0000 (15:46 +0000)]
[X86] Add masked variable tests for funnel undef/zero argument combines
I've avoided 'modulo' masks as we'll SimplifyDemandedBits those in the future, and we just need to check that the shift variable is 'in range'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353644
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 10 Feb 2019 15:22:06 +0000 (15:22 +0000)]
[x86] narrow 256-bit horizontal ops via demanded elements
256-bit horizontal math ops are an x86 monstrosity (and thankfully have
not been extended to 512-bit AFAIK).
The two 128-bit halves operate on separate halves of the inputs. So if we
don't demand anything in the upper half of the result, we can extract the
low halves of the inputs, do the math, and then insert that result into a
256-bit output.
All of the extract/insert is free (ymm<-->xmm), so we're left with a
narrower (cheaper) version of the original op.
In the affected tests based on:
https://bugs.llvm.org/show_bug.cgi?id=33758
https://bugs.llvm.org/show_bug.cgi?id=38971
...we see that the h-op narrowing can result in further narrowing of other
math via existing generic transforms.
I originally drafted this patch as an exact pattern match starting from
extract_vector_elt, but I thought we might see diffs starting from
extract_subvector too, so I changed it to a more general demanded elements
solution. There are no extra existing regression test improvements from
that switch though, so we could go back.
Differential Revision: https://reviews.llvm.org/D57841
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353641
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 14:54:57 +0000 (14:54 +0000)]
[X86] Add additional tests for funnel undef/zero argument combines
As suggested on D58009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353640
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 10 Feb 2019 14:29:57 +0000 (14:29 +0000)]
[TargetLowering] refactor setcc folds to fix another miscompile (PR40657)
SimplifySetCC still has much room for improvement, but this should
fix the remaining problem examples from:
https://bugs.llvm.org/show_bug.cgi?id=40657
The initial fix for this problem was rL353615.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353639
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 10 Feb 2019 12:55:44 +0000 (12:55 +0000)]
[X86][SSE] Add SimplifyDemandedBits test for BLENDVPD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353638
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Sun, 10 Feb 2019 09:25:56 +0000 (09:25 +0000)]
[Local] Delete a redundant check. NFC
isInstructionTriviallyDead also performs the use_empty() check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353637
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sun, 10 Feb 2019 08:35:38 +0000 (08:35 +0000)]
[yaml2obj] - Fix .dynamic section entries writing for 32bit targets.
This was introduced by me in r353613.
I tried to fix Big-endian bot and replaced
uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>,
so it is always 8 bytes and that was obviously incorrect.
My intention was to use something like packed<uint> actually, which
size is target dependent.
Patch fixes this bug and adds a test case, since no bots seems reported this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353636
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 10 Feb 2019 02:34:31 +0000 (02:34 +0000)]
[X86] Move some vector InstAliases out from under unnecessary 'let Predicates'. NFCI
We don't have any assembler predicates for vector ISAs so this isn't necessary. It just adds extra lines and identation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353631
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 10 Feb 2019 02:21:29 +0000 (02:21 +0000)]
[InstCombine] Fix an unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353630
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 9 Feb 2019 22:21:09 +0000 (22:21 +0000)]
[X86] Add tests for funnel undef argument combines
If one of the shifted arguments is undef we should be folding to a regular shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353628
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 9 Feb 2019 20:34:59 +0000 (20:34 +0000)]
[X86] CombineOr - fold to generic funnel shifts
As discussed on D57389, this is a first step towards moving the SHLD/SHRD matching code to DAGCombiner using FSHL/FSHR instead.
There's a bit of work to do before I can do that, so this just folds to FSHL/FSHR in the existing code (handling the different SHRD/FSHR argument ordering), which fixes the issue we had with i16 shift amounts not being correctly masked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353626
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 9 Feb 2019 20:06:11 +0000 (20:06 +0000)]
[x86] add another test for setcc miscompile (PR40657); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353625
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Feb 2019 17:58:16 +0000 (17:58 +0000)]
gn build: Merge r353590
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353621
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Feb 2019 17:33:04 +0000 (17:33 +0000)]
llvm-lib: Implement /list flag
Differential Revision: https://reviews.llvm.org/D57952
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353620
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 9 Feb 2019 17:03:59 +0000 (17:03 +0000)]
[TargetLowering] add tests to show effect of setcc sub->shift; NFC
There's effectively no difference for the cases with variables.
We just trade a sub for an add on those. But the case with a
subtract from constant would require an extra move instruction
on x86, so this looks like a reasonable generic combine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353619
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 9 Feb 2019 16:41:20 +0000 (16:41 +0000)]
[x86] add test for setcc sub->shift transform; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353618
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 9 Feb 2019 16:27:19 +0000 (16:27 +0000)]
[X86] Regenerate test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353616
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 9 Feb 2019 15:59:02 +0000 (15:59 +0000)]
[TargetLowering] avoid miscompile in setcc transform (PR40657)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353615
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sat, 9 Feb 2019 15:18:52 +0000 (15:18 +0000)]
[yaml2elf.cpp] - Fix compilation under linux.
Fixes errors like:
/home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/llvm/tools/yaml2obj/yaml2elf.cpp:597:5: error: need ‘typename’ before ‘ELFT:: Xword’ because ‘ELFT’ is a dependent scope
ELFT::Xword Tag = (ELFT::Xword)DE.Tag;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353614
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sat, 9 Feb 2019 15:03:19 +0000 (15:03 +0000)]
[yaml2elf] - An attemp to fix s390x BB after r353607.
s390x is big-endian and seems r353607 had an issue with endianess,
Bot was unhappy:
http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/11168/steps/ninja%20check%201/logs/stdio
This should fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353613
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sat, 9 Feb 2019 13:54:02 +0000 (13:54 +0000)]
Revert "[SelectionDAG] Extract [US]MULO expansion into TL method; NFC"
This reverts commit r353611.
Triggers an assertion during the libcall expansion on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353612
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sat, 9 Feb 2019 13:29:22 +0000 (13:29 +0000)]
[SelectionDAG] Extract [US]MULO expansion into TL method; NFC
In preparation for supporting vector expansion.
Also drop a variant of ExpandLibCall, of which the MULO expansions
were the only user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353611
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 9 Feb 2019 13:13:59 +0000 (13:13 +0000)]
[X86][SSE] Generalize X86ISD::BLENDI support to more value types
D42042 introduced the ability for the ExecutionDomainFixPass to more easily change between BLENDPD/BLENDPS/PBLENDW as the domains required.
With this ability, we can avoid most bitcasts/scaling in the DAG that was occurring with X86ISD::BLENDI lowering/combining, blend with the vXi32/vXi64 vectors directly and use isel patterns to lower to the float vector equivalent vectors.
This helps the shuffle combining and SimplifyDemandedVectorElts be more aggressive as we lose track of fewer UNDEF elements than when we go up/down through bitcasts.
I've introduced a basic blend(bitcast(x),bitcast(y)) -> bitcast(blend(x,y)) fold, there are more generalizations I can do there (e.g. widening/scaling and handling the tricky v16i16 repeated mask case).
The vector-reduce-smin/smax regressions will be fixed in a future improvement to SimplifyDemandedBits to peek through bitcasts and support X86ISD::BLENDV.
Differential Revision: https://reviews.llvm.org/D57888
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353610
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sat, 9 Feb 2019 12:14:20 +0000 (12:14 +0000)]
[lib/ObjectYAML] - Fix BB after r353607 [2]. NFC.
The second and the last place it seems.
Error was:
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Error.cpp.o
/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:993:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353609
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sat, 9 Feb 2019 12:04:39 +0000 (12:04 +0000)]
[lib/ObjectYAML] - Fix BB after r353607. NFC.
Error was:
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:666:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
(http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/29920)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353608
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Sat, 9 Feb 2019 11:34:28 +0000 (11:34 +0000)]
[yaml2obj][obj2yaml] - Add support for dumping/parsing .dynamic sections.
This teaches the tools to parse and dump
the .dynamic section and its dynamic tags.
Differential revision: https://reviews.llvm.org/D57691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353606
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Sat, 9 Feb 2019 09:18:37 +0000 (09:18 +0000)]
[GlobalOpt] Simplify __cxa_atexit elimination
cxxDtorIsEmpty checks callers recursively to determine if the
__cxa_atexit-registered function is empty, and eliminates the
__cxa_atexit call accordingly.
This recursive check is unnecessary as redundant instructions and
function calls can be removed by early-cse and inliner. In addition,
cxxDtorIsEmpty does not mark visited function and it may visit a
function exponential times (multiplication principle).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353603
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Sat, 9 Feb 2019 03:06:56 +0000 (03:06 +0000)]
[CMake] Don't set <PROJECT>_STANDALONE_BUILD
We shouldn't be treating runtimes builds as standalone builds since
we have enough of the context loaded into the runtimes environment.
Differential Revision: https://reviews.llvm.org/D57992
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353601
91177308-0d34-0410-b5e6-
96231b3b80d8
Hubert Tong [Sat, 9 Feb 2019 02:11:51 +0000 (02:11 +0000)]
[MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI
Summary:
Take care of some missing clean-ups that belong with r249548 and some
other copy/paste that had happened. In particular, the destructors are
no longer vtable anchors after r249548; and `setSectionName` in
`MCSectionWasm` is private and unused since r313058 culled its only
caller. The destructors are now implicitly defined, and the unused
function is removed.
Reviewers: nemanjai, jasonliu, grosbach
Reviewed By: nemanjai
Subscribers: sbc100, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57182
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353597
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Buella [Sat, 9 Feb 2019 01:44:28 +0000 (01:44 +0000)]
Extra processing for BitCast + PHI in InstCombine
For some specific cases with bitcast A->B->A with intervening PHI nodes InstCombiner::optimizeBitCastFromPhi transformation creates extra PHI nodes, which are actually a copy of already created PHI or in another words, they are redundant. These extra PHI nodes could lead to extra move instructions generated after DeSSA transformation. This happens when several conditions are met
- SROA kicks in and creates new alloca;
- there is a simple assignment L = R, which falls under 'canonicalize loads' done by combineLoadToOperationType (this transformation is by default). Exactly this transformation is the reason of bitcasts generated;
- the alloca is then used in A->B->A + PHI chain;
- there is a loop unrolling.
As a result optimizeBitCastFromPhi creates as many of PHI nodes for each new SROA alloca as loop unrolling factor is. These new extra PHI nodes are redundant actually except of one and should not be created. Moreover the idea of optimizeBitCastFromPhi is to get rid of the cast (when possible) but that doesn't happen in these conditions.
The proposed fix is to do the cast replacement for the whole calculated/accumulated PHI closure not for one cast only, which is an argument to the optimizeBitCastFromPhi. These will help to accomplish several things: 1) avoid extra PHI nodes generated as all casts which may trigger optimizeBitCastFromPhi transformation will be replaced, 3) bitcasts will be replaced, and 3) create more opportunities to remove dead code, which appears after the replacement.
A new test case shows that it's possible to get rid of all bitcasts completely and get quite good code reduction.
Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>
Reviewed By: Carrot
Differential Revision: https://reviews.llvm.org/D57053
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353595
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Sat, 9 Feb 2019 01:02:28 +0000 (01:02 +0000)]
[AMDGPU] Split idot4/8 signed and unsigned tests. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353593
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail R. Gadelha [Sat, 9 Feb 2019 00:46:12 +0000 (00:46 +0000)]
This reverts commit
1440a848a635849b97f7a5cfa0ecc40d37451f5b.
and commit
a1853e834c65751f92521f7481b15cf0365e796b.
They broke arm and aarch64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353590
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Sat, 9 Feb 2019 00:37:31 +0000 (00:37 +0000)]
Recommit "[GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR""
After r353586, we won't fail on the AMDGPU floor pattern that was killing the
importer before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353589
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Sat, 9 Feb 2019 00:34:21 +0000 (00:34 +0000)]
[AMDGPU] Split dot-insts feature
Differential Revision: https://reviews.llvm.org/D57971
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353587
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Sat, 9 Feb 2019 00:29:13 +0000 (00:29 +0000)]
[GlobalISel] Skip patterns that define complex suboperands twice instead of dying
If we run into a pattern that looks like this:
add
(complex $x, $y)
(complex $x, $z)
We should skip the pattern instead of asserting/doing something unpredictable.
This makes us return an Error in that case, and adds a testcase for skipped
patterns.
Differential Revision: https://reviews.llvm.org/D57980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353586
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 9 Feb 2019 00:21:06 +0000 (00:21 +0000)]
gn build: Merge r353566
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353585
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergey Dmitriev [Fri, 8 Feb 2019 23:52:15 +0000 (23:52 +0000)]
[NFC] Avoid passing blocks vector to the OutlineRegionInfo constructor by value.
Reviewers: vsk, fhahn, davidxl
Reviewed By: vsk
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353582
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 8 Feb 2019 23:34:57 +0000 (23:34 +0000)]
[x86] add test for miscompiling setcc transform (PR40657); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353580
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 8 Feb 2019 23:34:11 +0000 (23:34 +0000)]
Re-apply r353553 "[GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilder"
With a fix after r353563 that adds some more opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353579
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 8 Feb 2019 22:49:43 +0000 (22:49 +0000)]
Revert r353553 "[GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilder"
This reverts commit r353553.
This breaks CodeGen/AArch64/GlobalISel/legalize-ext-csedebug-output.mir:
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/57963/console
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353575
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Feb 2019 21:09:33 +0000 (21:09 +0000)]
[Docs] Use code-block:: text for part of the callbr documentation to attempt to make the bot happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353567
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Feb 2019 20:50:09 +0000 (20:50 +0000)]
[X86] Add FPCW as an implicit use on floating point load instructions.
These instructions can generate a stack overflow exception so technically they read the stack overflow exception mask bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353564
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 8 Feb 2019 20:48:56 +0000 (20:48 +0000)]
Implementation of asm-goto support in LLVM
This patch accompanies the RFC posted here:
http://lists.llvm.org/pipermail/llvm-dev/2018-October/127239.html
This patch adds a new CallBr IR instruction to support asm-goto
inline assembly like gcc as used by the linux kernel. This
instruction is both a call instruction and a terminator
instruction with multiple successors. Only inline assembly
usage is supported today.
This also adds a new INLINEASM_BR opcode to SelectionDAG and
MachineIR to represent an INLINEASM block that is also
considered a terminator instruction.
There will likely be more bug fixes and optimizations to follow
this, but we felt it had reached a point where we would like to
switch to an incremental development model.
Patch by Craig Topper, Alexander Ivchenko, Mikhail Dvoretckii
Differential Revision: https://reviews.llvm.org/D53765
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353563
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 8 Feb 2019 20:48:04 +0000 (20:48 +0000)]
[CodeExtractor] Restore outputs after creating exit stubs
When CodeExtractor saves the result of InvokeInst at the first insertion
point of the 'normal destination' basic block, this block can be omitted
in the outlined region, so store is placed outside of the function. The
suggested solution is to process saving outputs after creating exit
stubs for new function, and stores will be placed in that blocks before
return in this case.
Patch by Sergei Kachkov!
Fixes llvm.org/PR40455.
Differential Revision: https://reviews.llvm.org/D57919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353562
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 8 Feb 2019 19:59:39 +0000 (19:59 +0000)]
AMDGPU/GlobalISel: Fix broken tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353559
91177308-0d34-0410-b5e6-
96231b3b80d8