OSDN Git Service
Vlad Tsyrklevich [Mon, 25 Jun 2018 21:28:35 +0000 (21:28 +0000)]
UBSan blacklist workaround for bot timeouts
Summary: Workaround for PR37929
Reviewers: eugenis, vitalybuka
Reviewed By: eugenis
Subscribers: llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D48566
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335525
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Mon, 25 Jun 2018 20:55:26 +0000 (20:55 +0000)]
Revert r335513: [SCEVExp] Advance found insertion point
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335522
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 20:45:45 +0000 (20:45 +0000)]
[LoopIdiomRecognize] Fix a couple places where it appears we were unintenionally making copies of DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335521
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Mon, 25 Jun 2018 20:40:50 +0000 (20:40 +0000)]
Force vector width for scev-expander-debug.ll test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335520
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 20:27:46 +0000 (20:27 +0000)]
[X86] Simplify intrinsic table binary search to not require a temporary struct.
std::lower_bound doesn't require the thing to search for to be the same type as the table entries. We just need to define an appropriate comparison function that can take an table entry and an intrinsic number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335518
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 20:11:16 +0000 (20:11 +0000)]
[X86] Add comment about the sorting of the memory folding tables added in r335501.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335517
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 25 Jun 2018 19:40:08 +0000 (19:40 +0000)]
[docs] Update doc after split of -gen-intrinsic in r335407
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335515
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Mon, 25 Jun 2018 19:28:27 +0000 (19:28 +0000)]
[PowerPC] Fix incorrectly encoded wait instruction
Encoding for the wait instruction was wrong. Fix according to ISA 3.0.
Differential Revision: https://reviews.llvm.org/D48550
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335514
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Mon, 25 Jun 2018 19:17:29 +0000 (19:17 +0000)]
[SCEVExp] Advance found insertion point until we find a non-dbg instruction.
This avoids creating unnecessary casts if the IP used to be a dbg info
intrinsic. Fixes PR37727.
Reviewers: vsk, aprantl, sanjoy, efriedma
Reviewed By: vsk, efriedma
Differential Revision: https://reviews.llvm.org/D47874
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335513
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 25 Jun 2018 18:51:21 +0000 (18:51 +0000)]
[InstSimplify] fold div/rem of zexted bool
I was looking at an unrelated fold and noticed that
we don't have this simplification (because the other
fold would break existing tests).
Name: zext udiv
%z = zext i1 %x to i32
%r = udiv i32 %y, %z
=>
%r = %y
Name: zext urem
%z = zext i1 %x to i32
%r = urem i32 %y, %z
=>
%r = 0
Name: zext sdiv
%z = zext i1 %x to i32
%r = sdiv i32 %y, %z
=>
%r = %y
Name: zext srem
%z = zext i1 %x to i32
%r = srem i32 %y, %z
=>
%r = 0
https://rise4fun.com/Alive/LZ9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335512
91177308-0d34-0410-b5e6-
96231b3b80d8
Kamil Rytarowski [Mon, 25 Jun 2018 18:49:13 +0000 (18:49 +0000)]
Handle NetBSD specific path in findDebugBinary()
Summary:
The NetBSD Operating System installs debuginfo
files into /usr/libdata/debug, rather than other path
like in some other popular distribution.
This change makes llvm-symbolizer functional with
the basesystem executables.
Reviewers: joerg, vitalybuka
Reviewed By: vitalybuka
Subscribers: JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D48525
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335511
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 25 Jun 2018 18:27:14 +0000 (18:27 +0000)]
[InstSimplify] add tests for div/rem with bool divisor; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335509
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 25 Jun 2018 18:16:27 +0000 (18:16 +0000)]
Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code models"
The large code model allows code and data segments to exceed 2GB, which
means that some symbol references may require a displacement that cannot
be encoded as a displacement from RIP. The large PIC model even relaxes
the assumption that the GOT itself is within 2GB of all code. Therefore,
we need a special code sequence to materialize it:
.LtmpN:
leaq .LtmpN(%rip), %rbx
movabsq $_GLOBAL_OFFSET_TABLE_-.LtmpN, %rax # Scratch
addq %rax, %rbx # GOT base reg
From that, non-local references go through the GOT base register instead
of being PC-relative loads. Local references typically use GOTOFF
symbols, like this:
movq extern_gv@GOT(%rbx), %rax
movq local_gv@GOTOFF(%rbx), %rax
All calls end up being indirect:
movabsq $local_fn@GOTOFF, %rax
addq %rbx, %rax
callq *%rax
The medium code model retains the assumption that the code segment is
less than 2GB, so calls are once again direct, and the RIP-relative
loads can be used to access the GOT. Materializing the GOT is easy:
leaq _GLOBAL_OFFSET_TABLE_(%rip), %rbx # GOT base reg
DSO local data accesses will use it:
movq local_gv@GOTOFF(%rbx), %rax
Non-local data accesses will use RIP-relative addressing, which means we
may not always need to materialize the GOT base:
movq extern_gv@GOTPCREL(%rip), %rax
Direct calls are basically the same as they are in the small code model:
They use direct, PC-relative addressing, and the PLT is used for calls
to non-local functions.
This patch adds reasonably comprehensive testing of LEA, but there are
lots of interesting folding opportunities that are unimplemented.
I restricted the MCJIT/eh-lg-pic.ll test to Linux, since the large PIC
code model is not implemented for MachO yet.
Differential Revision: https://reviews.llvm.org/D47211
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335508
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 25 Jun 2018 17:52:10 +0000 (17:52 +0000)]
[InstCombine] add tests for add-of-sext-bool; NFC
We canonicalize to select with a zext-add and either zext-sub or sext-sub,
so this shows a pattern that's not conforming to the general trend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335506
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Mon, 25 Jun 2018 17:48:48 +0000 (17:48 +0000)]
[GISel]: Update the end of GISel Opcode namespace.
G_ADDRSPACE_CAST was added at the end, but PRE_ISEL_GENERIC_OPCODE_END
is still pointing incorrectly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335505
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 17:26:56 +0000 (17:26 +0000)]
[X86] Sort the static memory folding tables by reg opcode. Remove the reg->mem DenseMaps in favor of binary search.
With the static tables sorted we can binary search them directly for reg->mem lookups. This removes 6 DenseMaps that had to be created when X86InstrInfo is constructed.
We still have one Mem->Reg DenseMap for the reverse direction. This is created just as before by walking the reg->mem arrays to populate it.
Differential Revision: https://reviews.llvm.org/D48527
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335501
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 17:26:51 +0000 (17:26 +0000)]
[X86] Allow base and index for gather instructions to appear in other order for Intel syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335500
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 25 Jun 2018 17:06:18 +0000 (17:06 +0000)]
[SelectionDAG] Remove debug locations from ConstantSD(FP)Nodes
This removes debug locations from ConstantSDNode and ConstantSDFPNode.
When this kind of node is materialized we no longer create a line table
entry which jumps back to the constant's first point of use. This makes
single-stepping behavior smoother, and it matches the model used by IR,
where Constants have no locations. See this thread for more context:
http://lists.llvm.org/pipermail/llvm-dev/2018-June/124164.html
I'd like to handle constant BuildVectorSDNodes and to try to eliminate
passing SDLocs to SelectionDAG::getConstant*() in follow-up commits.
Differential Revision: https://reviews.llvm.org/D48468
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335497
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Mon, 25 Jun 2018 16:53:00 +0000 (16:53 +0000)]
[llvm-mca] Rename Backend to Pipeline. NFC.
Summary:
This change renames the Backend and BackendPrinter to Pipeline and PipelinePrinter respectively.
Variables and comments have also been updated to reflect this change.
The reason for this rename, is to be slightly more correct about what MCA is modeling. MCA models a Pipeline, which implies some logical sequence of stages.
Reviewers: andreadb, courbet, RKSimon
Reviewed By: andreadb, courbet
Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits
Differential Revision: https://reviews.llvm.org/D48496
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335496
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Richardson [Mon, 25 Jun 2018 16:49:20 +0000 (16:49 +0000)]
Add Triple::isMIPS()/isMIPS32()/isMIPS64(). NFC
There are quite a few if statements that enumerate all these cases. It gets
even worse in our fork of LLVM where we also have a Triple::cheri (which
is mips64 + CHERI instructions) and we had to update all if statements that
check for Triple::mips64 to also handle Triple::cheri. This patch helps to
reduce our diff to upstream and should also make some checks more readable.
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D48548
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335493
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jun 2018 16:17:48 +0000 (16:17 +0000)]
AMDGPU/GlobalISel: Add support for llvm.amdgcn.kernarg.segment.ptr
Note a normal select test is not currently possible because this
relies on input registers tracked in SIMachineFunctionInfo which
are not currently serializable in MIR, but this does work end-to-end
from the IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335490
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jun 2018 16:05:55 +0000 (16:05 +0000)]
StackSlotColoring: Decide colors per stack ID
I thought I fixed this in r308673, but that fix was
very broken. The assumption that any frame index can be used
in place of another was more widespread than I realized.
Even when stack slot sharing was disabled, this was still
replacing frame index uses with a different ID with a different
stack slot.
Really fix this by doing the coloring per-stack ID, so all of
the coloring logically done in a separate namespace. This is a lot
simpler than trying to figure out how to change the color if
the stack ID is different.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335488
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jun 2018 15:42:20 +0000 (15:42 +0000)]
AMDGPU: Remove commented out code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335486
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jun 2018 15:42:12 +0000 (15:42 +0000)]
AMDGPU/GlobalISel: Fix G_IMPLICIT_DEF for pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335485
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Mon, 25 Jun 2018 15:40:31 +0000 (15:40 +0000)]
[SampleFDO] Add an option to turn on/off warning about samples unused.
If a function has sample to use, but cannot use them because of no debug
information, currently a warning will be issued to inform the missing
opportunity.
This warning assumes the binary generating the profile and the binary using
the profile are similar enough. It is not always the case. Sometimes even
if the binaries are not quite similar, we may still get some benefit by
using sampleFDO. In those cases, we may still want to apply sampleFDO but
not want to see a lot of such warnings pop up.
The patch adds an option for the warning.
Differential Revision: https://reviews.llvm.org/D48510
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335484
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Mon, 25 Jun 2018 15:13:26 +0000 (15:13 +0000)]
[DA] Delinearise AddRecs if we can prove they don't wrap
We can prove that some delinearized subscripts do not wrap around to become
negative by the fact that they are from inbound geps of load/store locations.
This helps improve the delinearisation in cases where we can't prove that they
are non-negative from SCEV alone.
Differential Revision: https://reviews.llvm.org/D48481
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335481
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jun 2018 14:29:04 +0000 (14:29 +0000)]
AMDGPU: Respect align argument parameter
This should avoid relying on the pointee type
to get the alignment, particularly since pointee
types are supposed to be removed at some point.
Also fixes not getting the alignment for unsized types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335478
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 25 Jun 2018 13:51:11 +0000 (13:51 +0000)]
SafepointIRVerifier should ignore dead blocks and dead edges
Not only should SafepointIRVerifier ignore unreachable blocks (as suggested in https://reviews.llvm.org/D47011) but it also has to ignore dead blocks.
In @test2 (see the new tests):
br i1 true, label %right, label %left
left:
...
right:
...
merge:
%val = phi i8 addrspace(1)* [ ..., %left ], [ ..., %right ]
use %val
both left and right branches are reachable.
If they collide then SafepointIRVerifier reports an error.
Because of the foldable branch condition GVN finds the left branch dead and removes the phi node entry that merges values from right and left. Then the use comes from the right branch. This results in no collision.
So, SafepointIRVerifier ends up in different results depending on either GVN is run or not.
To solve this issue this patch adds Dead Block detection to SafepointIRVerifier which can ignore dead blocks while validating IR. The Dead Block detection algorithm is taken from GVN but modified to not split critical edges. That is needed to keep CFG unchanged by SafepointIRVerifier.
Patch by Yevgeny Rouban.
Reviewed By: anna, apilipenko, DaniilSuchkov
Differential Revision: https://reviews.llvm.org/D47441
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335473
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 25 Jun 2018 13:46:41 +0000 (13:46 +0000)]
Improve handling of COPY instructions with identical value numbers
Testcases provided by Tim Renouf.
Differential Revision: https://reviews.llvm.org/D48102
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335472
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 25 Jun 2018 13:44:27 +0000 (13:44 +0000)]
[llvm-exegesis][NFC] Remove unnecessary member variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335470
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 25 Jun 2018 13:40:54 +0000 (13:40 +0000)]
[IR] avoid -Wdocumentation spew about HTML tags
There's probably a better solution, but adding spaces
in the IR vector examples sidesteps the problem without
uglifying the plain text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335468
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 25 Jun 2018 13:39:50 +0000 (13:39 +0000)]
[llvm-exegesis] Fix warning in r22752: Initialize IsSnippetSetupComplete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335467
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 25 Jun 2018 13:12:02 +0000 (13:12 +0000)]
[llvm-exegesis] Generate snippet setup code.
Summary:
This ensures that the snippet always sees the same values for registers,
making measurements reproducible.
This will also allow exploring different values.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D48542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335465
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 25 Jun 2018 12:58:13 +0000 (12:58 +0000)]
Revert change 335077 "[InlineSpiller] Fix a crash due to lack of forward progress from remat specifically for STATEPOINT"
This change caused widespread assertion failures in our downstream testing:
lib/CodeGen/LiveInterval.cpp:409: bool llvm::LiveRange::overlapsFrom(const llvm::LiveRange&, llvm::LiveRange::const_iterator) const: Assertion `!empty() && "empty range"' failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335462
91177308-0d34-0410-b5e6-
96231b3b80d8
Artur Pilipenko [Mon, 25 Jun 2018 12:55:58 +0000 (12:55 +0000)]
Revert change 335091.
It adds extra test for the change 335077, which is also to be reverted as it causes test failures in downstream testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335461
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 25 Jun 2018 11:46:24 +0000 (11:46 +0000)]
Use APInt[] bit access to avoid "32-bit shift implicitly converted to 64 bits" MSVC warning (again). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335457
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 25 Jun 2018 11:44:29 +0000 (11:44 +0000)]
[llvm-exegesis][NFC] Simplify BenchmarkRunner ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335456
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 25 Jun 2018 11:38:27 +0000 (11:38 +0000)]
Use APInt[] bit access to avoid "32-bit shift implicitly converted to 64 bits" MSVC warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335454
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 25 Jun 2018 11:22:23 +0000 (11:22 +0000)]
[llvm-exegesis][NFC] clang-format
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335452
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 25 Jun 2018 11:19:05 +0000 (11:19 +0000)]
Fix -Wparentheses gcc warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335451
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 25 Jun 2018 11:12:30 +0000 (11:12 +0000)]
[llvm-exegesis][NFC] Fix `Operand` class comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335450
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 06:05:37 +0000 (06:05 +0000)]
[X86] Block commuting operand 1 of FMA*_Int instructions in findThreeSrcCommutedOpIndices. Remove uncommutable returns from getThreeSrcCommuteCase/getFMA3OpcodeToCommuteOperands.
We should be blocking the operand while we are in the routine that tries to find commutable operand indices. Doing it later means we might have missed out on another valid set of operands we could have commuted.
The intrinsic case was the only case that could really prevent commuting in getFMA3OpcodeToCommuteOperands. All the other cases in getThreeSrcCommuteCase were not reachable conditions as they were protected by findThreeSrcCommutedOpIndices.
With that abort case pushed earlier, we can remove all the abort checks and replace with asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335446
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Mon, 25 Jun 2018 05:30:36 +0000 (05:30 +0000)]
[MSSA] Add domination number verifier; NFC
It's easy for domination numbers to get out-of-date, and this is no more
costly than any of the other verifiers we already have, so it seems nice
to have.
A stage3 build with this Works On My Machine, so this hasn't caught any
bugs... yet. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335444
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 25 Jun 2018 04:38:03 +0000 (04:38 +0000)]
One more build fix for non MSVC compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335443
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 25 Jun 2018 04:35:35 +0000 (04:35 +0000)]
Try to fix build error on non MSVC compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335442
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 25 Jun 2018 03:13:27 +0000 (03:13 +0000)]
Fix CRLF line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335441
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 25 Jun 2018 03:13:09 +0000 (03:13 +0000)]
Add a TaskQueue that can serialize work on a ThreadPool.
We have ThreadPool, which can execute work asynchronously on N
background threads, but sometimes you need to make sure the work
is executed asynchronously but also serially. That is, if task
B is enqueued after task A, then task B should not begin until
task A has completed. This patch adds such a class.
Differential Revision: https://reviews.llvm.org/D48240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335440
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Mon, 25 Jun 2018 01:20:21 +0000 (01:20 +0000)]
[WebAssembly] Add WebAssemblyException information analysis
Summary:
A WebAssemblyException object contains BBs that belong to a 'catch' part
of the try-catch-end structure. Because CFGSort requires all the BBs
within a catch part to be sorted together as it does for loops, this
pass calculates the nesting structure of catch part of exceptions in a
function. Now this assumes the use of Windows EH instructions.
Reviewers: dschuff, majnemer
Subscribers: jfb, mgorny, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D44134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335439
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Mon, 25 Jun 2018 01:07:11 +0000 (01:07 +0000)]
[WebAssembly] Add WebAssemblyLateEHPrepare pass
Summary:
Add WebAssemblyLateEHPrepare pass that does several small jobs for
exception handling. This runs before CFGSort, and is different from
WasmEHPrepare pass that runs before ISel, even though the names are
similar.
Reviewers: dschuff, majnemer
Subscribers: sbc100, jgravelle-google, sunfish, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D46803
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335438
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 01:01:47 +0000 (01:01 +0000)]
[X86] Simplify some code by using isOneConstant. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335437
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 00:21:53 +0000 (00:21 +0000)]
[X86] Remove the changes to combineScalarToVector made in r335037.
They appear to be untested other than the test case for p37879.ll and I believe we should be using SimplifyDemandedElts here to handle these cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335436
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jun 2018 00:05:09 +0000 (00:05 +0000)]
[X86] Reduce the number of patterns needed for masked scalar ceil/floor isel.
The scalar to vector on the mask register should not be part of the patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335435
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Sun, 24 Jun 2018 15:44:47 +0000 (15:44 +0000)]
[mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.
Reviewers: atanasyan
Differential Review: https://reviews.llvm.org/D31557
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335434
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 24 Jun 2018 14:37:30 +0000 (14:37 +0000)]
[DAGCombiner] eliminate setcc bool math when input is low-bit of some value
This patch has the same motivating example as D48466:
define void @foo(i64 %x, i32 %c.0282.in, i32 %d.0280, i32* %ptr0, i32* %ptr1) {
%c.0282 = and i32 %c.0282.in,
268435455
%a16 = lshr i64 32508, %x
%a17 = and i64 %a16, 1
%tobool = icmp eq i64 %a17, 0
%. = select i1 %tobool, i32 1, i32 2
%.286 = select i1 %tobool, i32 27, i32 26
%shr97 = lshr i32 %c.0282, %.
%shl98 = shl i32 %c.0282.in, %.286
%or99 = or i32 %shr97, %shl98
%shr100 = lshr i32 %d.0280, %.
%shl101 = shl i32 %d.0280, %.286
%or102 = or i32 %shr100, %shl101
store i32 %or99, i32* %ptr0
store i32 %or102, i32* %ptr1
ret void
}
...but I'm trying to kill the setcc bool math sooner rather than later.
By matching a larger pattern that includes both the low-bit mask and the trailing add/sub,
we can create a universally good fold because we always eliminate the condition code
intermediate value.
Here are Alive proofs for these (currently instcombine folds the 'add' variants, but
misses the 'sub' patterns):
https://rise4fun.com/Alive/Gsyp
Name: sub of zext cmp mask
%a = and i8 %x, 1
%c = icmp eq i8 %a, 0
%z = zext i1 %c to i32
%r = sub i32 C1, %z
=>
%optional_cast = zext i8 %a to i32
%r = add i32 %optional_cast, C1-1
Name: add of zext cmp mask
%a = and i32 %x, 1
%c = icmp eq i32 %a, 0
%z = zext i1 %c to i8
%r = add i8 %z, C1
=>
%optional_cast = trunc i32 %a to i8
%r = sub i8 C1+1, %optional_cast
All of the tests look like improvements or neutral to me. But it is possible that x86
test+set+bitop is better than what we now show here. I suspect we could do better by
adding another fold for the 'sub' variants.
We start with select-of-constant in IR in the larger motivating test, so that's why I
included tests with selects. Proofs for those variants:
https://rise4fun.com/Alive/Bx1
Name: true const is bigger
Pre: C2 == (C1 + 1)
%a = and i8 %x, 1
%c = icmp eq i8 %a, 0
%r = select i1 %c, i64 C2, i64 C1
=>
%z = zext i8 %a to i64
%r = sub i64 C2, %z
Name: false const is bigger
Pre: C2 == (C1 + 1)
%a = and i8 %x, 1
%c = icmp eq i8 %a, 0
%r = select i1 %c, i64 C1, i64 C2
=>
%z = zext i8 %a to i64
%r = add i64 C1, %z
Differential Revision: https://reviews.llvm.org/D48466
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335433
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2018 06:56:49 +0000 (06:56 +0000)]
[X86] Regroup some isel patterns. NFC
For some reason the 64-bit patterns were separated from their 8/16/32-bit friends, but only for add/sub/mul. For and/or/xor they were together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335429
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jun 2018 06:29:50 +0000 (06:29 +0000)]
[X86] Rename VFPCLASSSS and VFPCLASSSD internal instruction names to include a Z to match other EVEX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335428
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 24 Jun 2018 01:48:25 +0000 (01:48 +0000)]
Also forward declare BitScanReverse.
With the removal of intrin.h in an earlier patch, the intrinsics
that we were actually using were manually re-declared, however
several of them were missed leading to compilation failures with
MSVC. Fix those.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335427
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Sat, 23 Jun 2018 22:02:59 +0000 (22:02 +0000)]
Add OpenBSD support to the Threading code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335426
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Sat, 23 Jun 2018 21:43:27 +0000 (21:43 +0000)]
[CMake] Do not use --gc-sections on OpenBSD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335425
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Sat, 23 Jun 2018 21:26:44 +0000 (21:26 +0000)]
[CMake] Support building shared library for OpenBSD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335424
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Sat, 23 Jun 2018 19:04:10 +0000 (19:04 +0000)]
[llc] Fix sanitizer failure.
Store the string on the stack rather than just the StringRef.
Fix sanitizer bots:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/19948
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/5500
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335423
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 23 Jun 2018 18:39:44 +0000 (18:39 +0000)]
ADT: Use EBO to shrink SmallVector size 1
SmallVectorStorage is empty when its size is 1; use inheritance so that
the empty base class optimization kicks in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335421
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Sat, 23 Jun 2018 16:51:10 +0000 (16:51 +0000)]
[llc] Use WithColor for printing errors/warnings
Use the WithColor helper from support to print errors and warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335418
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Sat, 23 Jun 2018 16:50:09 +0000 (16:50 +0000)]
[llvm-config] Use WithColor for printing errors.
Use the WithColor helper from support to print errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335417
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Sat, 23 Jun 2018 16:49:07 +0000 (16:49 +0000)]
[llvm-mt] Use WithColor for printing errors.
Use the WithColor helper from support to print errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335416
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Sat, 23 Jun 2018 16:48:03 +0000 (16:48 +0000)]
[TableGen] Use WithColor for printing errors/warnings
Use the WithColor helper from support to print errors and warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335415
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2018 06:15:04 +0000 (06:15 +0000)]
[X86] Make %eiz usage in 64-bit mode, force a 0x67 address size prefix. Fix some test CHECK lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335414
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2018 06:03:48 +0000 (06:03 +0000)]
[X86] Teach disassembler to use %eip instead of %rip when 0x67 prefix is used on a rip-relative address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335413
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2018 05:53:00 +0000 (05:53 +0000)]
[X86][AsmParser] Improve base/index register checks.
-Ensure EIP isn't used with an index reigster.
-Ensure EIP isn't used as index register.
-Ensure base register isn't a vector register.
-Ensure eiz/riz usage matches the size of their base register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335412
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Sat, 23 Jun 2018 04:01:28 +0000 (04:01 +0000)]
Fix invariant fdiv hoisting in LICM
FDiv is replaced with multiplication by reciprocal and invariant
reciprocal is hoisted out of the loop, while multiplication remains
even if invariant.
Switch checks for all invariant operands and only invariant
denominator to fix the issue.
Differential Revision: https://reviews.llvm.org/D48447
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335411
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 23 Jun 2018 03:05:39 +0000 (03:05 +0000)]
[AMDGPU] Update includes for intrinsic changes :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335409
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 23 Jun 2018 02:22:10 +0000 (02:22 +0000)]
[ORC] Fix formatting and list pending queries in VSO::dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335408
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 23 Jun 2018 02:02:38 +0000 (02:02 +0000)]
[IR] Split Intrinsics.inc into enums and implementations
Implements PR34259
Intrinsics.h is a very popular header. Most LLVM TUs care about things
like dbg_value, but they don't care how they are implemented. After I
split these out, IntrinsicImpl.inc is 1.7 MB, so this saves each LLVM TU
from scanning 1.7 MB of source that gets pre-processed away.
It also means we can modify intrinsic properties without triggering a
full rebuild, but that's probably less of a win.
I think the next best thing to do would be to split out the target
intrinsics into their own header. Very, very few TUs care about
target-specific intrinsics. It's very hard to split up the target
independent intrinsics like llvm.expect, assume, and dbg.value, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335407
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 23 Jun 2018 01:19:49 +0000 (01:19 +0000)]
Avoid including intrin.h from MathExtras.h
This is repeatably worth 0.3s compile time on MathExtras.cpp. This is a
very popular header, and it basically pulls all Intel intrinsics into
every LLVM TU. Let's not do that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335406
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Sat, 23 Jun 2018 00:15:33 +0000 (00:15 +0000)]
[ELF] Change isSectionData to exclude SHF_EXECINSTR
Summary:
This affects what sections are displayed as "DATA" in llvm-objdump.
The other user llvm-size is unaffected.
Before, a "TEXT" section is also "DATA", which seems weird.
The sh_flags condition matches that of bfd's SEC_DATA but the sh_type
condition uses (== SHF_PROGBITS) instead of bfd's (!= SHT_NOBITS).
bfd's SEC_DATA is not appealing as so many sections will be shown as DATA.
Reviewers: jyknight, Bigcheese
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335405
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jun 2018 00:03:20 +0000 (00:03 +0000)]
[X86][AsmParser] Rework that allows (%dx) to be used in place of %dx with in/out instructions.
Previously, to support (%dx) we left a wide open hole in our 16-bit memory address checking. This let this address value be used with any instruction without error in the parser. It would later fail in the encoder with an assertion failure on debug builds and who knows what on release builds.
This patch passes the mnemonic down to the memory operand parsing function so we can allow the (%dx) form only on specific instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335403
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 22 Jun 2018 23:53:22 +0000 (23:53 +0000)]
[RuntimeDyld] Implement the ELF PIC large code model relocations
Prerequisite for https://reviews.llvm.org/D47211 which improves our ELF
large PIC codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335402
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 22 Jun 2018 22:58:55 +0000 (22:58 +0000)]
[LoopReroll] Rewrite induction variable rewriting.
This gets rid of a bunch of weird special cases; instead, just use SCEV
rewriting for everything. In addition to being simpler, this fixes a
bug where we would use the wrong stride in certain edge cases.
The one bit I'm not quite sure about is the trip count handling,
specifically the FIXME about overflow. In general, I think we need to
widen the exit condition, but that's probably not profitable if the new
type isn't legal, so we probably need a check somewhere. That said, I
don't think I'm making the existing problem any worse.
As a followup to this, a bunch of IV-related code in root-finding could
be cleaned up; with SCEV-based rewriting, there isn't any reason to
assume a loop will have exactly one or two PHI nodes.
Differential Revision: https://reviews.llvm.org/D45191
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335400
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Fri, 22 Jun 2018 22:34:07 +0000 (22:34 +0000)]
[MSSA] Remove incorrect comment + `auto`ify dyn_cast results; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335399
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 22:28:39 +0000 (22:28 +0000)]
[X86][AsmParser] Keep track of whether an explicit scale was specified while parsing an address in Intel syntax. Use it for improved error checking.
This allows us to check these:
-16-bit addressing doesn't support scale so we should error if we find one there.
-Multiplying ESP/RSP by a scale even if the scale is 1 should be an error because ESP/RSP can't be an index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335398
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 22 Jun 2018 22:20:10 +0000 (22:20 +0000)]
[llvm-size] Make global variables static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335397
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jun 2018 22:07:26 +0000 (22:07 +0000)]
[x86] add more tests for bit hacking opportunities with setcc; NFC
Missed cases where the input and output are the same size in rL335391.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335396
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jun 2018 22:06:33 +0000 (22:06 +0000)]
[PowerPC] add more tests for bit hacking opportunities with setcc; NFC
Missed cases where the input and output are the same size in rL335390.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335395
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 21:57:24 +0000 (21:57 +0000)]
[X86][AsmParser] In Intel syntax make sure we support ESP/RSP being the second register in memory expressions like [EAX+ESP].
By default, the second register gets assigned to the index register slot. But ESP can't be an index register so we need to swap it with the other register.
There's still a slight bug that we allow [EAX+ESP*1]. The existence of the multiply even though its with 1 should force ESP to the index register and trigger an error, but it doesn't currently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335394
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Fri, 22 Jun 2018 21:35:26 +0000 (21:35 +0000)]
[llvm-mca] Remove unnecessary include and forward decl in RCU. NFC.
The DispatchUnit is no longer a dependency of RCU, so this patch removes a
stale include and forward decl. This patch also cleans up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335392
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jun 2018 21:16:54 +0000 (21:16 +0000)]
[x86] add tests for bit hacking opportunities with setcc; NFC
We likely gave up on folding some select-of-constants patterns in
IR with rL331486, and we need to recover those in the DAG.
The tests without select are based on our current DAGCombiner
optimizations for select-of-constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335391
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 22 Jun 2018 21:16:29 +0000 (21:16 +0000)]
[PowerPC] add tests for bit hacking opportunities with setcc; NFC
We likely gave up on folding some select-of-constants patterns in
IR with rL331486, and we need to recover those in the DAG.
The tests without select are based on our current DAGCombiner
optimizations for select-of-constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335390
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 21:09:31 +0000 (21:09 +0000)]
[X86] Add test cases showing missed select simplifcation for MCU when icmp is in a slightly different form.
These test cases show that the "(select (and (x , 0x1) == 0), y, (z ^ y) ) -> (-(and (x , 0x1)) & z ) ^ y" doesn't work if the select condition is changed to (and (x, 0x1) != 1)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335389
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Fri, 22 Jun 2018 20:58:51 +0000 (20:58 +0000)]
[GISel]: Add G_ADDRSPACE_CAST Opcode
Added IRTranslator support for addrspacecast.
https://reviews.llvm.org/D48469
reviewed by: volkan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335388
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 22 Jun 2018 20:29:42 +0000 (20:29 +0000)]
[gdb] Use Latin-1 to decode StringRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335387
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Edler von Koch [Fri, 22 Jun 2018 20:23:21 +0000 (20:23 +0000)]
Re-land "[LTO] Enable module summary emission by default for regular LTO"
Since we are now producing a summary also for regular LTO builds, we
need to run the NameAnonGlobals pass in those cases as well (the
summary cannot handle anonymous globals).
See https://reviews.llvm.org/D34156 for details on the original change.
This reverts commit
6c9ee4a4a438a8059aacc809b2dd57128fccd6b3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335385
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 20:20:38 +0000 (20:20 +0000)]
[X86] Don't accept (%si,%bp) 16-bit address expressions.
The second register is the index register and should only be %si or %di if used with a base register. And in that case the base register should be %bp or %bx.
This makes us compatible with gas.
We do still need to support both orders with Intel syntax which uses [bp+si] and [si+bp]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335384
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 19:42:21 +0000 (19:42 +0000)]
[X86][AsmParser] Allow (%bp,%si) and (%bp,%di) to be encoded without using a zero displacement.
(%bp) can't be encoded without a displacement. The encoding is instead used for displacement alone. So a 1 byte displacement of 0 must be used. But if there is an index register we can encode without a displacement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335379
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Fri, 22 Jun 2018 19:23:18 +0000 (19:23 +0000)]
AMDHSA: Put old assembler docs back
Until we switch to code object v3 by default.
Follow up for https://reviews.llvm.org/D47736.
Differential Revision: https://reviews.llvm.org/D48497
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335378
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 22 Jun 2018 18:31:57 +0000 (18:31 +0000)]
[X86][SSE] Add sdiv by (nonuniform) minus one tests (PR37119)
Test cases from D45806
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335376
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 17:50:40 +0000 (17:50 +0000)]
[X86][AsmParser] Check for invalid 16-bit base register in Intel syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335373
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 22 Jun 2018 17:15:58 +0000 (17:15 +0000)]
[X86] Don't allow ESP/RSP to be used as an index register in assembly.
Fixes PR37892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335370
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Fri, 22 Jun 2018 17:14:35 +0000 (17:14 +0000)]
[LoopUnswitch]Fix comparison for DomTree updates.
Summary:
In LoopUnswitch when replacing a branch Parent -> Succ with a conditional
branch Parent -> True & Parent->False, the DomTree updates should insert an edge for
each of True/False if True/False are different than Succ, and delete Parent->Succ edge
if both are different. The comparison with Succ appears to be incorect,
it's comparing with Parent instead.
There is no test failing either before or after this change, but it seems to me this is
the right way to do the update.
Reviewers: chandlerc, kuhar
Subscribers: sanjoy, jlebar, llvm-commits
Differential Revision: https://reviews.llvm.org/D48457
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335369
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 22 Jun 2018 17:03:40 +0000 (17:03 +0000)]
[llvm-mca] Remove redundant call. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335368
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Fri, 22 Jun 2018 17:01:13 +0000 (17:01 +0000)]
[X86] Add a test to show missed opportunity to generate vfnmadd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335367
91177308-0d34-0410-b5e6-
96231b3b80d8