OSDN Git Service
Daniel Sanders [Mon, 4 Dec 2017 21:14:34 +0000 (21:14 +0000)]
[globalisel][tablegen] Tests for r319691
I forgot to 'svn add' the test files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319698
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 4 Dec 2017 20:48:50 +0000 (20:48 +0000)]
DAG: Follow-up to r319692 check the truncates inputs have the same type
MatchRotate assumes the types of the types of LHS and RHS are equal,
which is always the case then they come from an OR node, but here
we're getting them from two different TRUNC nodes, so we have to check
the types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319695
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 4 Dec 2017 20:39:57 +0000 (20:39 +0000)]
DAG: Match truncated rotation (PR35487)
If the truncation has been pushed past the or-node, look through it and
truncate afterwards.
Differential revision: https://reviews.llvm.org/D40792
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319692
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 4 Dec 2017 20:39:32 +0000 (20:39 +0000)]
[globalisel][tablegen] Split atomic load/store into separate opcode and enable for AArch64.
This patch splits atomics out of the generic G_LOAD/G_STORE and into their own
G_ATOMIC_LOAD/G_ATOMIC_STORE. This is a pragmatic decision rather than a
necessary one. Atomic load/store has little in implementation in common with
non-atomic load/store. They tend to be handled very differently throughout the
backend. It also has the nice side-effect of slightly improving the common-case
performance at ISel since there's no longer a need for an atomicity check in the
matcher table.
All targets have been updated to remove the atomic load/store check from the
G_LOAD/G_STORE path. AArch64 has also been updated to mark
G_ATOMIC_LOAD/G_ATOMIC_STORE legal.
There is one issue with this patch though which also affects the extending loads
and truncating stores. The rules only match when an appropriate G_ANYEXT is
present in the MIR. For example,
(G_ATOMIC_STORE (G_TRUNC:s16 (G_ANYEXT:s32 (G_ATOMIC_LOAD:s16 X))))
will match but:
(G_ATOMIC_STORE (G_ATOMIC_LOAD:s16 X))
will not. This shouldn't be a problem at the moment, but as we get better at
eliminating extends/truncates we'll likely start failing to match in some
cases. The current plan is to fix this in a patch that changes the
representation of extending-load/truncating-store to allow the MMO to describe
a different type to the operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319691
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Mon, 4 Dec 2017 20:36:01 +0000 (20:36 +0000)]
Move splitIndirectCriticalEdges() to BasicBlockUtils.h.
Summary:
Move splitIndirectCriticalEdges() from CodeGenPrepare to BasicBlockUtils.h so
that it can be called from other places.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40750
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319689
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 4 Dec 2017 20:08:28 +0000 (20:08 +0000)]
Add missing triple args to tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319686
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 4 Dec 2017 19:56:33 +0000 (19:56 +0000)]
[ConstantFold] Support vector index when factoring out GEP index into preceding dimensions
Follow-up of r316824. This patch supports the vector type for both current and
previous index when factoring out the current one into the previous one.
Differential Revision: https://reviews.llvm.org/D39556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319683
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 4 Dec 2017 19:22:01 +0000 (19:22 +0000)]
[SCEV] Use a "Discovered" set instead of a "Visited" set; NFC
Suggested by Max Kazantsev in https://reviews.llvm.org/D39361
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319679
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 4 Dec 2017 19:22:00 +0000 (19:22 +0000)]
[SCEV] A different fix for PR33494
Summary:
I don't think rL309080 is the right fix for PR33494 -- caching ExitLimit only
hides the problem[0]. The real issue is that because of how we forget SCEV
expressions ScalarEvolution::getBackedgeTakenInfo, in the test case for PR33494
computing the backedge for any loop invalidates the trip count for every other
loop. This effectively makes the SCEV cache useless.
I've instead made the SCEV expression invalidation in
ScalarEvolution::getBackedgeTakenInfo less aggressive to fix this issue.
[0]: One way to think about this is that rL309080 essentially augmented the
backedge-taken-count cache with another equivalent exit-limit cache. The bug
went away because we were explicitly not clearing the exit-limit cache in
getBackedgeTakenInfo. But instead of doing all of that, we can just avoid
clearing the backedge-taken-count cache.
Reviewers: mkazantsev, mzolotukhin
Subscribers: mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D39361
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319678
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 4 Dec 2017 19:21:58 +0000 (19:21 +0000)]
[BypassSlowDivision] Improve our handling of divisions by constants
(This reapplies r314253. r314253 was reverted on r314482 because of a
correctness regression on P100, but that regression was identified to be
something else.)
Summary:
Don't bail out on constant divisors for divisions that can be narrowed without
introducing control flow . This gives us a 32 bit multiply instead of an
emulated 64 bit multiply in the generated PTX assembly.
Reviewers: jlebar
Subscribers: jholewinski, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D38265
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319677
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 4 Dec 2017 18:57:48 +0000 (18:57 +0000)]
MachineVerifier: undef phi arg doesn't need to be live-out from predecessor
Differential Revision: https://reviews.llvm.org/D40756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319674
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Mon, 4 Dec 2017 17:18:51 +0000 (17:18 +0000)]
[CodeGen] Unify MBB reference format in both MIR and debug output
As part of the unification of the debug format and the MIR format, print
MBB references as '%bb.5'.
The MIR printer prints the IR name of a MBB only for block definitions.
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g'
* find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g'
* find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g'
* grep -nr 'BB#' and fix
Differential Revision: https://reviews.llvm.org/D40422
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319665
91177308-0d34-0410-b5e6-
96231b3b80d8
Pablo Barrio [Mon, 4 Dec 2017 16:55:49 +0000 (16:55 +0000)]
Fix function pointer tail calls in armv8-M.base
Summary:
The compiler fails with the following error message:
fatal error: error in backend: ran out of registers during
register allocation
Tail call optimization for Armv8-M.base fails to meet all the required
constraints when handling calls to function pointers where the
arguments take up r0-r3. This is because the pointer to the
function to be called can only be stored in r0-r3, but these are
all occupied by arguments. This patch makes sure that tail call
optimization does not try to handle this type of calls.
Reviewers: chill, MatzeB, olista01, rengolin, efriedma
Reviewed By: olista01, efriedma
Subscribers: efriedma, aemerson, javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D40706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319664
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Mon, 4 Dec 2017 16:46:20 +0000 (16:46 +0000)]
Revert "[cmake] Enable zlib support on windows"
This reverts commit r319533 as it broke llvm-config --system-libs output
and everything that depends on it (which is mostly out of tree or
downstream folks, but includes a couple of llvm buildbots as well).
I think I have a fix for this in D40779, but I want someone to look
review it first. In the mean time, I am reverting this change, as it
seems to break a lot of people.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319663
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Kolton [Mon, 4 Dec 2017 16:22:32 +0000 (16:22 +0000)]
[AMDGPU] SDWA: add support for PRESERVE into SDWA peephole.
Summary:
Reviewers: arsenm, vpykhtin, rampitec
Subscribers: kzhuravl, wdng, nhaehnle, mgorny, yaxunl, dstuttard, tpr, t-tye
Differential Revision: https://reviews.llvm.org/D37817
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319662
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 4 Dec 2017 15:14:59 +0000 (15:14 +0000)]
[ARM] CodeGen test
Add another and + load DAG combine test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319660
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Mon, 4 Dec 2017 15:11:48 +0000 (15:11 +0000)]
[Loop Predication] Teach LP about reverse loops
Summary:
Currently, we only support predication for forward loops with step
of 1. This patch enables loop predication for reverse or
countdownLoops, which satisfy the following conditions:
1. The step of the IV is -1.
2. The loop has a singe latch as B(X) = X <pred>
latchLimit with pred as s> or u>
3. The IV of the guard is the decrement
IV of the latch condition (Guard is: G(X) = X-1 u< guardLimit).
This patch was downstream for a while and is the last series of patches
that's from our LP implementation downstream.
Reviewers: apilipenko, mkazantsev, sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40353
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319659
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Hahnfeld [Mon, 4 Dec 2017 14:19:33 +0000 (14:19 +0000)]
[NVPTX] Assign valid global names
PTX requires that identifiers consist only of [a-zA-Z0-9_$]. The
existing pass already ensured this for globals and this patch adds
the cleanup for functions with local linkage.
However, there was a different problem in the case of collisions
of the adjusted name: The ValueSymbolTable then automatically
appended ".N" with increasing Ns to get a unique name while helping
the ABI demangling. Special case this behavior to omit the dots and
append N directly. This will always give us legal names according
to the PTX requirements.
Differential Revision: https://reviews.llvm.org/D40573
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319657
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Mon, 4 Dec 2017 14:01:34 +0000 (14:01 +0000)]
[NFC][lit] Use proper semantic versioning names for variables
The variable named `minor` was actually pointing to the patch part of
the version. While I was changing this I also made the check for Apple
clang more robust by checking both patch and minor rather than just
minor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319656
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 4 Dec 2017 13:42:22 +0000 (13:42 +0000)]
Revert r319649 - [Asm, ARM] Add fallback diag for multiple invalid operands
This is causing a failure in the llvm-clang-x86_64-expensive-checks-win
buildbot, and I can't reproduce it locally, so reverting until I can work out
what is wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319654
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam McCall [Mon, 4 Dec 2017 12:51:49 +0000 (12:51 +0000)]
Revert "[ValueTracking] Pass only a single lambda to computeKnownBitsFromShiftOperator by using KnownBits struct instead of separate APInts. NFCI"
This reverts commit r319624, which seems to cause a miscompile (breaks the
multistage PPC buildbots)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319652
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Corringham [Mon, 4 Dec 2017 12:30:49 +0000 (12:30 +0000)]
AMDGPU: fix missing s_waitcnt
Summary:
The pass that inserts s_waitcnt instructions where needed propagated
info used to track dependencies for each block by iterating over the
predecessor blocks. The iteration was terminated when a predecessor
that had not yet been processed was encountered. Any info in blocks
later in the list was therefore not processed, leading to the
possiblility of a required s_waitcnt not being inserted.
The fix is simply to change the "break" to "continue" for the
relevant loops, so that all visited blocks are processed. This
is likely what was intended when the code was written.
There is no test case provided for this fix because:
1) the only example that reproduces this is large and resistant to
being reduced
2) the change is trivial
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye
Differential Revision: https://reviews.llvm.org/D40544
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319651
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 4 Dec 2017 12:02:32 +0000 (12:02 +0000)]
[Asm, ARM] Add fallback diag for multiple invalid operands
This adds a "invalid operands for instruction" diagnostic for
instructions where there is an instruction encoding with the correct
mnemonic and which is available for this target, but where multiple
operands do not match those which were provided. This makes it clear
that there is some combination of operands that is valid for the current
target, which the default diagnostic of "invalid instruction" does not.
Since this is a very general error, we only emit it if we don't have a
more specific error.
Differential revision: https://reviews.llvm.org/D36747
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319649
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Mon, 4 Dec 2017 10:03:14 +0000 (10:03 +0000)]
[TwoAddressInstructionPass] Bugfix in handling of sunk instructions.
An instruction returned by TII->convertToThreeAddress() may contain a %noreg
(undef) operand, which is not expected by tryInstructionTransform(). So if
this MI is sunk to a lower point in MBB, it must be skipped when later
encountered.
A new set SunkInstrs is used for this purpose.
Note: there is no test supplied here, as this was triggered on SystemZ while
working on a review of instruction flags. A test case for this bugfix will be
included in the upcoming SystemZ commit.
Review: Quentin Colombet
https://reviews.llvm.org/D40711
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319646
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 4 Dec 2017 09:48:26 +0000 (09:48 +0000)]
[DAGCombine] Remove isAndLoadExtLoad arguments
Both LoadedVT and NarrowLoad are passed as references and neither
of them are used by any of its callers.
Differential Revision: https://reviews.llvm.org/D40713
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319645
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 4 Dec 2017 09:09:04 +0000 (09:09 +0000)]
[AArch64] Allow using emulated tls on platforms other than ELF
This matches how it is done on X86.
This allows using emulated tls on windows; in MinGW environments,
native tls isn't supported at the moment.
Set the right Data*bitsDirective for windows to match the existing
tests for other platforms. Make parts of the existing tests a regex,
to allow matching .section .rdata for windows, to avoid having to
duplicate the rest of the tests for windows.
Differential Revision: https://reviews.llvm.org/D40770
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319644
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 4 Dec 2017 09:08:55 +0000 (09:08 +0000)]
[ARM] Allow using emulated tls on platforms other than ELF
This matches how it is done on X86.
This allows using emulated tls on windows; in MinGW environments,
native tls isn't supported at the moment.
Differential Revision: https://reviews.llvm.org/D40769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319643
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 4 Dec 2017 07:21:01 +0000 (07:21 +0000)]
[X86] Allow VPMAXUQ/VPMAXSQ/VPMINUQ/VPMINSQ to be used with 128/256 bit vectors when AVX512 is enabled.
These instructions can be used by widening to 512-bits and extracting back to 128/256. We do similar to several other instructions already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319641
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 4 Dec 2017 05:38:44 +0000 (05:38 +0000)]
[X86] Don't turn UINT_TO_FP into SINT_TO_FP during lowering.
We already do this as a DAG combine. The version during lowering can only trigger if known bits changes something that improves known bits analysis. But this means we should be improving known bits analysis to work on the unlowered form instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319640
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 4 Dec 2017 05:38:42 +0000 (05:38 +0000)]
[SelectionDAG] Teach computeKnownBits some improvements to ISD::SRL with a non-splat constant shift amount.
If we have a non-splat constant shift amount, the minimum shift amount can be used to infer the number of zero upper bits of the result. There's probably a lot more that we can do here, but this
fixes a case where I wanted to infer the sign bit as zero when all the shift amounts are non-zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319639
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 3 Dec 2017 21:43:54 +0000 (21:43 +0000)]
[X86][AVX512] Tag PH2PS/PS2PH conversion instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319637
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 3 Dec 2017 21:16:12 +0000 (21:16 +0000)]
[X86][AVX512] Tag packed F2I/I2F/F2F conversion instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319636
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 3 Dec 2017 21:07:36 +0000 (21:07 +0000)]
[X86][AVX512] Regenerate schedule tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319635
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 3 Dec 2017 20:57:04 +0000 (20:57 +0000)]
[X86][SSE] Remove unused IIC_SSE_CVT_PI2PS_RR/IIC_SSE_CVT_PI2PS_RM itineraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319634
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Sun, 3 Dec 2017 03:31:45 +0000 (03:31 +0000)]
CodeGen: Fix SelectionDAGISel::LowerArguments for sret addr space
SelectionDAGISel::LowerArguments assumes sret addr space is 0, which is
not true for amdgcn---amdgiz target.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D40255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319630
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 3 Dec 2017 03:07:09 +0000 (03:07 +0000)]
[SelectionDAG] Use the inlined APInt shift methods since we've already bounds checked the shift.
The version that takes APInt is out of line. The 'unsigned' version optimizes for the common case of single word APInts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319628
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Sun, 3 Dec 2017 01:19:23 +0000 (01:19 +0000)]
Reland "[WebAssembly] Add visibility flag to Wasm symbol flags""
Original change was rL319488.
This was reverted rL319602 due to a gcc 7.1 warning.
Differential Revision: https://reviews.llvm.org/D40772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319626
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 3 Dec 2017 00:03:01 +0000 (00:03 +0000)]
Fix typo in emitted attribute name
Fixes build when using this attribute combination
on an intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319625
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 2 Dec 2017 23:42:17 +0000 (23:42 +0000)]
[ValueTracking] Pass only a single lambda to computeKnownBitsFromShiftOperator by using KnownBits struct instead of separate APInts. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319624
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Sat, 2 Dec 2017 22:13:22 +0000 (22:13 +0000)]
CodeGen: Fix pointer info in SplitVecOp_EXTRACT_VECTOR_ELT/SplitVecRes_INSERT_VECTOR_ELT
Two issues found when doing codegen for splitting vector with non-zero alloca addr space:
DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT/SplitVecOp_EXTRACT_VECTOR_ELT uses dummy pointer info for creating
SDStore. Since one pointer operand contains multiply and add, InferPointerInfo is unable to
infer the correct pointer info, which ends up with a dummy pointer info for the target to lower
store and results in isel failure. The fix is to introduce MachinePointerInfo::getUnknownStack to
represent MachinePointerInfo which is known in alloca address space but without other information.
TargetLowering::getVectorElementPointer uses value type of pointer in addr space 0 for
multiplication of index and then add it to the pointer. However the pointer may be in an addr
space which has different size than addr space 0. The fix is to use the pointer value type for
index multiplication.
Differential Revision: https://reviews.llvm.org/D39758
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319622
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Sat, 2 Dec 2017 19:12:38 +0000 (19:12 +0000)]
[cmake] Re-commit: Remove redundant call to cmake when building host tools.
Also pass CMAKE_(C|CXX)_COMPILER to add_custom_command.
Summary:
Remove the redundant, config-time call to cmake when
building host tools for cross compiles or optimized tablegen..
The config-time call to cmake is redundant because it will always get
called again when the CONFIGURE_LLVM_${target_name} target fires at
build-time. This speeds up initial configuration, but has no affect
on build behavior.
Differential Revision: https://reviews.llvm.org/D40229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319620
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 2 Dec 2017 13:06:40 +0000 (13:06 +0000)]
[llvm-readobj] Remove redundant local variables to reduce the code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319617
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 2 Dec 2017 13:06:35 +0000 (13:06 +0000)]
[llvm-readobj] Print static MIPS GOT
If a linked binary file contains a dynamic section, the GOT layout
defined by the dynamic section entries. In a statically linked file
the GOT is just a series of entries. This change teaches `llvm-readobj`
to print the GOT in that case. That provides a feature parity with GNU
`readelf`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319616
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 2 Dec 2017 13:06:27 +0000 (13:06 +0000)]
[llvm-readobj] Delete unused method argument. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319615
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 2 Dec 2017 12:27:44 +0000 (12:27 +0000)]
[X86][SSE] Cleanup float/int conversion scheduler itinerary classes
Makes it easier to grok where each is supposed to be used, mainly useful for adding to the AVX512 instructions but hopefully can be used more in SSE/AVX as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319614
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 2 Dec 2017 08:39:02 +0000 (08:39 +0000)]
[X86] Fix copy paste mistake in test case for r319612.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319613
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 2 Dec 2017 08:27:46 +0000 (08:27 +0000)]
[X86] Teach the assembler to support %db8-%db15 as aliases for %dr8-%dr15.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319612
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 2 Dec 2017 08:27:45 +0000 (08:27 +0000)]
[X86] Support %dr8-%dr15 in the assembler.
Apparently I failed to make this work when I fixed it in the disassembler way back in r224862.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319611
91177308-0d34-0410-b5e6-
96231b3b80d8
Martell Malone [Sat, 2 Dec 2017 07:17:01 +0000 (07:17 +0000)]
CMAKE: help CheckAtomic find check_library_exists
lldb fails to build standalone on x86
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
CMake Error at CheckAtomic.cmake:66 (check_library_exists):
Unknown CMake command "check_library_exists".
Call Stack (most recent call first):
LLDBStandalone.cmake:90 (include)
CMakeLists.txt:3 (include)
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D40220
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319610
91177308-0d34-0410-b5e6-
96231b3b80d8
Tatyana Krasnukha [Sat, 2 Dec 2017 05:25:17 +0000 (05:25 +0000)]
[ARC] Add instruction subset for the ARC backend.
Reviewers: petecoup, kparzysz
Reviewed By: petecoup
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D37983
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319609
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Sat, 2 Dec 2017 04:01:26 +0000 (04:01 +0000)]
[DAG][AArch64] Disable post-legalization store
Disable post-legalization store for AArch64 backend which is causing
errors out-of-tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319607
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Sat, 2 Dec 2017 02:05:06 +0000 (02:05 +0000)]
[WebAssembly] Revert r319488 "Add visibility flag to Wasm symbol flags"
This patch reportedly broke one of LLVM bots (ubuntu-gcc7.1-werror).
See http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/3369 for
details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319602
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Morehouse [Fri, 1 Dec 2017 22:20:26 +0000 (22:20 +0000)]
Revert "[X86] Improvement in CodeGen instruction selection for LEAs."
This reverts r319543, due to ASan bot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319591
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 1 Dec 2017 22:12:04 +0000 (22:12 +0000)]
[libFuzzer] add a flag -malloc_limit_mb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319590
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Fri, 1 Dec 2017 21:56:56 +0000 (21:56 +0000)]
[MachineOutliner] NFC: Throw out self-intersections on candidates early
Currently, the outliner considers candidates that intersect with themselves in
the candidate pruning step. That is, candidates of the form "AA" in ranges like
"AAAAAA". In that range, it looks like there are 5 instances of "AA" that could
possibly be outlined, and that's considered in the benefit calculation.
However, only at most 3 instances of "AA" could ever be outlined in "AAAAAA".
Thus, it's possible to pass through "AA" to the candidate selection step even
though it's *never* the case that "AA" could be outlined. This makes it so that
when we find candidates, we consider only non-overlapping occurrences of that
candidate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319588
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Fri, 1 Dec 2017 21:55:47 +0000 (21:55 +0000)]
[DAG][ARM] Revert "Reenable post-legalize store merge"
due to failures in AArch and ARM code gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319587
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Fri, 1 Dec 2017 21:44:27 +0000 (21:44 +0000)]
[MC] Handle unknown literal register numbers in .cfi_* directives
r230670 introduced a step to map EH register numbers to standard
DWARF register numbers. This failed to consider the case when a
user .cfi_* directive uses an integer literal rather than a
register name, to specify a DWARF register number that has no
corresponding LLVM register number (e.g. a special register that
the compiler and assembler have no name for).
Fixes PR34028.
Patch by Roland McGrath
Differential Revision: https://reviews.llvm.org/D36493
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319586
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 1 Dec 2017 20:57:19 +0000 (20:57 +0000)]
[IndVars] Fix a bug introduced in r317012
Turns out we can have comparisons which are indirect users of the induction variable that we can make invariant. In this case, there is no loop invariant value contributing and we'd fail an assert.
The test case was found by a java fuzzer and reduced. It's a real cornercase. You have to have a static loop which we've already proven only executes once, but haven't broken the backedge on, and an inner phi whose result can be constant folded by SCEV using exit count reasoning but not proven by isKnownPredicate. To my knowledge, only the fuzzer has hit this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319583
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Fri, 1 Dec 2017 20:46:45 +0000 (20:46 +0000)]
[cmake] Revert (rL319574): Resubmit Remove redundant call to cmake when building host tools.
Still fails for some bots.
Differential Revision: https://reviews.llvm.org/D40229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319582
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 1 Dec 2017 20:41:38 +0000 (20:41 +0000)]
[opt-remarks] If hotness threshold is set, ignore remarks without hotness
These are blocks that haven't not been executed during training. For large
projects this could make a significant difference. For the project, I was
looking at, I got an order of magnitude decrease in the size of the total YAML
files with this and r319235.
Differential Revision: https://reviews.llvm.org/D40678
Re-commit after fixing the failing testcase in rL319576, rL319577 and
rL319578.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319581
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Fri, 1 Dec 2017 19:35:56 +0000 (19:35 +0000)]
[cmake] Resubmit Remove redundant call to cmake when building host tools.
Only pass Native to LLVM_TARGETS_TO_BUILD.
Summary:
Remove the redundant, config-time call to cmake when
building host tools for cross compiles or optimized tablegen..
The config-time call to cmake is redundant because it will always get
called again when the CONFIGURE_LLVM_${target_name} target fires at
build-time. This speeds up initial configuration, but has no affect
on build behavior.
Differential Revision: https://reviews.llvm.org/D40229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319574
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 1 Dec 2017 19:33:56 +0000 (19:33 +0000)]
[DAGCombine] Simplify ISD::AND handling in ReduceLoadWidth
Followup to D39595. Removes a bunch of redundant checks.
Differential Revision: https://reviews.llvm.org/D40667
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319573
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 18:40:32 +0000 (18:40 +0000)]
[X86][AVX512] Tag subvector extract/insert instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319568
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Dec 2017 18:39:58 +0000 (18:39 +0000)]
[IR] Avoid dangling else warning. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319567
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Fri, 1 Dec 2017 18:33:58 +0000 (18:33 +0000)]
IR printing improvement for loop passes - handle -print-module-scope
Summary:
Adding support for -print-module-scope similar to how it is
being done for function passes. This option causes loop-pass printer
to emit a whole-module IR instead of just a loop itself.
Reviewers: sanjoy, silvas, weimingz
Reviewed By: sanjoy
Subscribers: apilipenko, skatkov, llvm-commits
Differential Revision: https://reviews.llvm.org/D40247
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319566
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Fri, 1 Dec 2017 18:25:30 +0000 (18:25 +0000)]
[DebugInfo] Bail out if making no progress dumping line tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319564
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 1 Dec 2017 18:12:29 +0000 (18:12 +0000)]
Revert "[opt-remarks] If hotness threshold is set, ignore remarks without hotness"
This reverts commit r319556.
Something is not working with this when used with sample-based profiling.
Investigating...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319562
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Fri, 1 Dec 2017 17:42:46 +0000 (17:42 +0000)]
IR printing improvement for function passes - introducing -print-module-scope
Summary:
When debugging function passes it happens to be rather useful to dump
the whole module before the transformation and then use this dump
to analyze this single transformation by running it separately
on that particular module state.
Introducing
-print-module-scope
debugging option that forces all the function-level IR dumps
to become whole-module dumps.
This option builds on top of normal dumping controls like
-print-before/after
-filter-print-funcs
The plan is to eventually extend this option to cover other local passes
(at least loop passes) but that should go as a separate change.
Reviewers: sanjoy, weimingz, silvas, fedor.sergeev
Reviewed By: weimingz
Subscribers: apilipenko, skatkov, llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D40245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319561
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 17:24:15 +0000 (17:24 +0000)]
Fix line endings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319559
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 17:23:06 +0000 (17:23 +0000)]
[X86][AVX512] Tag VPERM2I/VPERM2T instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319558
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 1 Dec 2017 17:02:04 +0000 (17:02 +0000)]
[opt-remarks] If hotness threshold is set, ignore remarks without hotness
These are blocks that haven't not been executed during training. For large
projects this could make a significant difference. For the project, I was
looking at, I got an order of magnitude decrease in the size of the total YAML
files with this and r319235.
Differential Revision: https://reviews.llvm.org/D40678
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319556
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 16:51:48 +0000 (16:51 +0000)]
[X86][AVX512] Tag VFPCLASS instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319554
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 16:35:57 +0000 (16:35 +0000)]
[X86][AVX512] Tag VPSHUFBITQMB instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319553
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 16:20:03 +0000 (16:20 +0000)]
[X86][AVX512] Tag VPCOMRESS/VPEXPAND instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319551
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 1 Dec 2017 16:17:24 +0000 (16:17 +0000)]
Revert r319531 "[SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops."
It causes builds to fail with "Instruction does not dominate all uses" (PR35497).
> Patch tries to improve vectorization of the following code:
>
> void add1(int * __restrict dst, const int * __restrict src) {
> *dst++ = *src++;
> *dst++ = *src++ + 1;
> *dst++ = *src++ + 2;
> *dst++ = *src++ + 3;
> }
> Allows to vectorize even if the very first operation is not a binary add, but just a load.
>
> Fixed issues related to previous commit.
>
> Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev
>
> Reviewed By: ABataev, RKSimon
>
> Subscribers: llvm-commits, RKSimon
>
> Differential Revision: https://reviews.llvm.org/D28907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319550
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Fri, 1 Dec 2017 15:31:41 +0000 (15:31 +0000)]
[ARM] and + load combine tests
Add a few more tests cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319548
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Fri, 1 Dec 2017 14:49:26 +0000 (14:49 +0000)]
[ARM][DAG] Reenable post-legalize store merge
Summary: Reenable post-legalize stores with constant merging computation and cofrresponding test case.
Reviewers: eastig, efriedma
Subscribers: aemerson, javed.absar, kristof.beyls, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D40701
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319547
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Fri, 1 Dec 2017 14:27:11 +0000 (14:27 +0000)]
Add more triples to llc_test_checks.py
Added some commonly used Arm triples to the script, with and without
the -eabi suffix.
Differential Revision: https://reviews.llvm.org/D40708
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319545
91177308-0d34-0410-b5e6-
96231b3b80d8
Jatin Bhateja [Fri, 1 Dec 2017 14:07:38 +0000 (14:07 +0000)]
[X86] Improvement in CodeGen instruction selection for LEAs.
Summary:
1/ Operand folding during complex pattern matching for LEAs has been extended, such that it promotes Scale to
accommodate similar operand appearing in the DAG e.g.
T1 = A + B
T2 = T1 + 10
T3 = T2 + A
For above DAG rooted at T3, X86AddressMode will now look like
Base = B , Index = A , Scale = 2 , Disp = 10
2/ During OptimizeLEAPass down the pipeline factorization is now performed over LEAs so that if there is an opportunity
then complex LEAs (having 3 operands) could be factored out e.g.
leal 1(%rax,%rcx,1), %rdx
leal 1(%rax,%rcx,2), %rcx
will be factored as following
leal 1(%rax,%rcx,1), %rdx
leal (%rdx,%rcx) , %edx
3/ Aggressive operand folding for AM based selection for LEAs is sensitive to loops, thus avoiding creation of any complex LEAs within a loop.
4/ Simplify LEA converts (lea (BASE,1,INDEX,0) --> add (BASE, INDEX) which offers better through put.
PR32755 will be taken care of by this pathc.
Previous patch revisions : r313343 , r314886
Reviewers: lsaba, RKSimon, craig.topper, qcolombet, jmolloy, jbhateja
Reviewed By: lsaba, RKSimon, jbhateja
Subscribers: jmolloy, spatel, igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D35014
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319543
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Fri, 1 Dec 2017 13:42:39 +0000 (13:42 +0000)]
[ARM] and + load combine tests
Adding autogenerated tests for narrow load combines.
Differential Revision: https://reviews.llvm.org/D40709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319542
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Dec 2017 13:25:54 +0000 (13:25 +0000)]
[X86][AVX512] Tag vshift/vpermv/pshufd/pshufb instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319540
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Fri, 1 Dec 2017 13:11:39 +0000 (13:11 +0000)]
Revert r319537: Bail out of a SimplifyCFG switch table opt at undef values.
Broke build bots so reverting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319539
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 1 Dec 2017 12:34:16 +0000 (12:34 +0000)]
[InstSimplify] More fcmp cases when comparing against negative constants.
Summary:
For known positive non-zero value X:
fcmp uge X, -C => true
fcmp ugt X, -C => true
fcmp une X, -C => true
fcmp oeq X, -C => false
fcmp ole X, -C => false
fcmp olt X, -C => false
Patch by Paul Walker.
Reviewers: majnemer, t.p.northover, spatel, RKSimon
Reviewed By: spatel
Subscribers: fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D40012
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319538
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Fri, 1 Dec 2017 12:30:49 +0000 (12:30 +0000)]
Bail out of a SimplifyCFG switch table opt at undef values.
Summary:
A true or false result is expected from a comparison, but it seems the possibility of undef was overlooked, which could lead to a failed assert. This is fixed by this patch by bailing out if we encounter undef.
The bug is old and the assert has been there since the end of 2014, so it seems this is unusual enough to forego optimization.
Patch by: JesperAntonsson
Reviewers: spatel, eeckstein, hans
Reviewed By: hans
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40639
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319537
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Fri, 1 Dec 2017 12:02:59 +0000 (12:02 +0000)]
Follow-up to r319434 to turn the pass on by default
Now that the patch has gone through the buildbot cycle,
turn it on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319535
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Timofeev [Fri, 1 Dec 2017 11:56:34 +0000 (11:56 +0000)]
[AMDGPU] SiFixSGPRCopies should not modify non-divergent PHI
Differential revision: https://reviews.llvm.org/D40556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319534
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Fri, 1 Dec 2017 11:41:07 +0000 (11:41 +0000)]
[cmake] Enable zlib support on windows
Summary:
zlib support was hard-wired to off for (non-cygwin) windows targets.
This disables some features, such as reading debug info from compressed
dwarf sections.
This has been this way since zlib support was added in 2013 (r180083),
but there is no obvious reason for that. Zlib is perfectly capable of
being compiled for windows (it even has a cmake file that works out of
the box).
This enables one to turn on zlib support on windows, if one has zlib
avaliable.
Reviewers: rnk, beanz
Subscribers: mgorny, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D40655
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319533
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinar Temirbulatov [Fri, 1 Dec 2017 11:10:47 +0000 (11:10 +0000)]
[SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops.
Patch tries to improve vectorization of the following code:
void add1(int * __restrict dst, const int * __restrict src) {
*dst++ = *src++;
*dst++ = *src++ + 1;
*dst++ = *src++ + 2;
*dst++ = *src++ + 3;
}
Allows to vectorize even if the very first operation is not a binary add, but just a load.
Fixed issues related to previous commit.
Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev
Reviewed By: ABataev, RKSimon
Subscribers: llvm-commits, RKSimon
Differential Revision: https://reviews.llvm.org/D28907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319531
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Fri, 1 Dec 2017 10:49:47 +0000 (10:49 +0000)]
[lit] Don't enable LSan on Darwin for Apple clang 9.0.0
The latest clang that ships with Xcode (clang 900 or 9.0.0) does not
support LSan. This fixes the lit configuration to reflect that.
Differential revision: https://reviews.llvm.org/D40672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319530
91177308-0d34-0410-b5e6-
96231b3b80d8
Ying Yi [Fri, 1 Dec 2017 09:54:27 +0000 (09:54 +0000)]
[lit] Implement non-pipelined ‘mkdir’, ‘diff’ and ‘rm’ commands internally
Summary:
The internal shell already supports 'cd', ‘export’ and ‘echo’ commands.
This patch adds implementation of non-pipelined ‘mkdir’, ‘diff’ and ‘rm’
commands as the internal shell builtins.
Reviewed by: Zachary Turner, Reid Kleckner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39567
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319528
91177308-0d34-0410-b5e6-
96231b3b80d8
Volkan Keles [Fri, 1 Dec 2017 08:19:10 +0000 (08:19 +0000)]
GlobalISel: Enable the legalization of G_MERGE_VALUES and G_UNMERGE_VALUES
Summary: LegalizerInfo assumes all G_MERGE_VALUES and G_UNMERGE_VALUES instructions are legal, so it is not possible to legalize vector operations on illegal vector types. This patch fixes the problem by removing the related check and adding default actions for G_MERGE_VALUES and G_UNMERGE_VALUES.
Reviewers: qcolombet, ab, dsanders, aditya_nandakumar, t.p.northover, kristof.beyls
Reviewed By: dsanders
Subscribers: rovka, javed.absar, igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D39823
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319524
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Fri, 1 Dec 2017 06:05:05 +0000 (06:05 +0000)]
Recommit rL319407: [SROA] enable splitting for non-whole-alloca loads and stores
Recommiting once reverted patch rL319407 after adding a check for bit vector size to avoid failures in some build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319522
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 1 Dec 2017 06:02:02 +0000 (06:02 +0000)]
[X86] Custom legalize v2i32 gathers via widening rather than promoting.
The default legalization for v2i32 is promotion to v2i64. This results in a gather that reads 64-bit elements rather than 32. If one of the elements is near a page boundary this can cause an illegal access that can fault.
We also miscalculate the scale for the gather which is an even worse problem, but we probably could have found a separate way to fix that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319521
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 1 Dec 2017 06:02:00 +0000 (06:02 +0000)]
[X86][SelectionDAG] Make sure we explicitly sign extend the index when type promoting the index of scatter and gather.
Type promotion makes no guarantee about the contents of the promoted bits. Since the gather/scatter instruction will use the bits to calculate addresses, we need to ensure they aren't garbage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319520
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 1 Dec 2017 06:01:59 +0000 (06:01 +0000)]
[X86] Add another v2i32 gather test case with v2i64 index that wasn't sign extended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319519
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 1 Dec 2017 02:49:07 +0000 (02:49 +0000)]
[X86] Add a DAG combine to simplify masks for AVX2 gather instructions.
AVX2 gathers only use the upper bit of the mask allowing us to simplify sign_extend_inreg to a shift left.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319514
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 1 Dec 2017 01:44:26 +0000 (01:44 +0000)]
[cmake] Expose opt-viewer availability
This will be used in https://github.com/apple/swift/pull/12938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319511
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Fri, 1 Dec 2017 01:18:47 +0000 (01:18 +0000)]
[WebAssembly] Update MC tests now that hidden attr is supported
Summary:
Support was added in rL319488 but these tests were not
updated.
Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish
Differential Revision: https://reviews.llvm.org/D40693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319510
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Fri, 1 Dec 2017 00:54:28 +0000 (00:54 +0000)]
Add flag to ArchiveWriter to test GNU64 format more efficiently
Even with the sparse file optimizations the SYM64 test can still be painfully
slow. This unnecessarily slows down devs. It's critical that we test that the
switch to the SYM64 format occurs at 4GB but there isn't any better of a way to
fake the size of the file than sparse files. This change introduces a flag that
allows the cutoff to be arbitrarily set to whatever power of two is desired.
The flag is hidden as it really isn't meant to be used outside this one test.
This is unfortunate but appears necessary, at least until the average hard
drive is much faster.
The changes to the test require some explanation. Prior to this change we knew
that the SYM64 format was being used because the file was simply too large to
have validly handled this case if the SYM64 format were not used. To ensure
that the SYM64 format is still being used I am grepping the file for "SYM64".
Without changing the filename however this would be pointless because "SYM64"
would occur in the file either way. So the filename of the test is also changed
in order to avoid this issue.
Differential Revision: https://reviews.llvm.org/D40632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319507
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 1 Dec 2017 00:53:10 +0000 (00:53 +0000)]
Mark all library options as hidden.
These command line options are not intended for public use, and often
don't even make sense in the context of a particular tool anyway. About
90% of them are already hidden, but when people add new options they
forget to hide them, so if you were to make a brand new tool today, link
against one of LLVM's libraries, and run tool -help you would get a
bunch of junk that doesn't make sense for the tool you're writing.
This patch hides these options. The real solution is to not have
libraries defining command line options, but that's a much larger effort
and not something I'm prepared to take on.
Differential Revision: https://reviews.llvm.org/D40674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319505
91177308-0d34-0410-b5e6-
96231b3b80d8