]> granicus.if.org Git - llvm/log
llvm
5 years ago[X86] Fix some cppcheck "Local variable name shadows outer variable" warnings. NFCI.
Simon Pilgrim [Sun, 5 May 2019 12:00:14 +0000 (12:00 +0000)]
[X86] Fix some cppcheck "Local variable name shadows outer variable" warnings. NFCI.

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

5 years ago[SLPVectorizer] Make getSpillCost() const. NFCI.
Simon Pilgrim [Sun, 5 May 2019 10:37:38 +0000 (10:37 +0000)]
[SLPVectorizer] Make getSpillCost() const. NFCI.

Ideally getTreeCost() should be const as well but non-const Type creation would need to be addressed first.

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

5 years ago[SelectionDAG] Use any_of/all_of where possible. NFCI.
Simon Pilgrim [Sun, 5 May 2019 10:30:04 +0000 (10:30 +0000)]
[SelectionDAG] Use any_of/all_of where possible. NFCI.

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

5 years agoMove Value *RHSCIOp def into the scope where its actually used. NFCI.
Simon Pilgrim [Sun, 5 May 2019 10:27:45 +0000 (10:27 +0000)]
Move Value *RHSCIOp def into the scope where its actually used. NFCI.

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

5 years agoAdd InstCombine tests for FNeg instruction.
Cameron McInally [Sat, 4 May 2019 14:56:08 +0000 (14:56 +0000)]
Add InstCombine tests for FNeg instruction.

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

5 years ago[CodeGenPrepare] limit overflow intrinsic matching to a single basic block (2nd try)
Sanjay Patel [Sat, 4 May 2019 12:46:32 +0000 (12:46 +0000)]
[CodeGenPrepare] limit overflow intrinsic matching to a single basic block (2nd try)

This is a subset of the original commit from rL359879
which was reverted because it could crash when using the 'RemovedInstructions'
structure that enables delayed deletion of dead instructions. The motivating
compile-time win does not require that change though. We should get most of
that win from this change alone.

Using/updating a dominator tree to match math overflow patterns may be very
expensive in compile-time (because of the way CGP uses a DT), so just handle
the single-block case.

See post-commit thread for rL354298 for more details:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190422/646276.html

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

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

5 years ago[llvm-nm] Convert weak.test to use yaml2obj and fix unntested 'v'
Fangrui Song [Sat, 4 May 2019 09:12:18 +0000 (09:12 +0000)]
[llvm-nm] Convert weak.test to use yaml2obj and fix unntested 'v'

This restores part of the good change reverted by r359830.

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

5 years ago[AMDGPU] Fixed asan error after D61536
Stanislav Mekhanoshin [Sat, 4 May 2019 06:40:20 +0000 (06:40 +0000)]
[AMDGPU] Fixed asan error after D61536

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

5 years agoAMDGPU] gfx1010 hazard recognizer
Stanislav Mekhanoshin [Sat, 4 May 2019 04:30:57 +0000 (04:30 +0000)]
AMDGPU] gfx1010 hazard recognizer

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

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

5 years ago[AMDGPU] gfx1010: use fmac instructions
Stanislav Mekhanoshin [Sat, 4 May 2019 04:20:37 +0000 (04:20 +0000)]
[AMDGPU] gfx1010: use fmac instructions

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

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

5 years ago[JITLink] Add two useful Section operations: find by name, get address range.
Lang Hames [Sat, 4 May 2019 00:23:09 +0000 (00:23 +0000)]
[JITLink] Add two useful Section operations: find by name, get address range.

These operations were already used in eh-frame registration, and are likely to
be used in other runtime registrations, so this commit moves them into a header
where they can be re-used.

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

5 years ago[x86] add tests for fneg IR with undef; NFC
Sanjay Patel [Fri, 3 May 2019 22:47:29 +0000 (22:47 +0000)]
[x86] add tests for fneg IR with undef; NFC

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

5 years ago[AArch64][GlobalISel] Use fcsel instead of csel for G_SELECT on FPRs
Jessica Paquette [Fri, 3 May 2019 22:37:46 +0000 (22:37 +0000)]
[AArch64][GlobalISel] Use fcsel instead of csel for G_SELECT on FPRs

This saves us some unnecessary copies.

If the inputs to a G_SELECT are floating point, we should use fcsel rather than
csel.

Changes here are...

- Teach selectCopy about s1-to-s1 copies across register banks.
- AArch64RegisterBankInfo about G_SELECT in general.
- Teach the instruction selector about the FCSEL instructions.

Also add two tests:

- select-select.mir to show that we get the expected FCSEL
- regbank-select.mir (unfortunately named) to show the register banks on
G_SELECT are properly preserved

And update fast-isel-select.ll to show that we do the same thing as other
instruction selectors in these cases.

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

5 years agoMake the git-llvm script work on older git versions that don't support git rev-parse...
Craig Topper [Fri, 3 May 2019 22:03:29 +0000 (22:03 +0000)]
Make the git-llvm script work on older git versions that don't support git rev-parse --git-common-dir.

Not all versions of git support git rev-parse --git-common-dir. Rather than erorr or print any kind of
useful error, they just print back '--git-common-dir' instead of a directory. The git-llvm script
ends up taking this '--git-common-dir' as a diretory name to use.

Not sure exactly what happens after that, but the end result is that the 'git llvm push' ends up
looking like it pushed your commits, but really did nothing.

This patch makes the script detect the bogus directory name for --git-common-dir and falls back to using --git-dir instead.

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

5 years ago[AMDGPU] gfx1010 wait count insertion
Stanislav Mekhanoshin [Fri, 3 May 2019 21:53:53 +0000 (21:53 +0000)]
[AMDGPU] gfx1010 wait count insertion

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

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

5 years ago[AMDGPU] gfx1010 s_code_end generation
Stanislav Mekhanoshin [Fri, 3 May 2019 21:26:39 +0000 (21:26 +0000)]
[AMDGPU] gfx1010 s_code_end generation

Also add some missing metadata in the streamer.

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

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

5 years agoUpdate PatternMatcher for FNeg
Cameron McInally [Fri, 3 May 2019 21:19:12 +0000 (21:19 +0000)]
Update PatternMatcher for FNeg

Match both FNeg(X) and FSub(+-0.0, X) in FNeg_match

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

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

5 years ago[AMDGPU] gfx1010 loop alignment
Stanislav Mekhanoshin [Fri, 3 May 2019 21:17:29 +0000 (21:17 +0000)]
[AMDGPU] gfx1010 loop alignment

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

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

5 years ago[COFF, ARM64] Fix ABI implementation of struct returns
Mandeep Singh Grang [Fri, 3 May 2019 21:12:36 +0000 (21:12 +0000)]
[COFF, ARM64] Fix ABI implementation of struct returns

Summary:
Refer the ABI doc at: https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#return-values

Related clang patch: D60349

Reviewers: rnk, efriedma, TomTan, ssijaric

Reviewed By: rnk, efriedma

Subscribers: mstorsjo, javed.absar, kristof.beyls, llvm-commits

Tags: #llvm

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

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

5 years agoReapply r359906, "RegAllocFast: Add heuristic to detect values not live-out of a...
Matt Arsenault [Fri, 3 May 2019 19:06:57 +0000 (19:06 +0000)]
Reapply r359906, "RegAllocFast: Add heuristic to detect values not live-out of a block"

This reverts commit r359912.

This should pass now, since the clang test was made less fragile in
r359918.

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

5 years ago[CommandLine] Enable Grouping for short options by default. Part 4 of 5
Don Hinton [Fri, 3 May 2019 18:56:25 +0000 (18:56 +0000)]
[CommandLine] Enable Grouping for short options by default.  Part 4 of 5

Summary:
This change enables `cl::Grouping` for short options --
options with names of a single character.  This is consistent with GNU
getopt behavior.

Reviewers: rnk, MaskRay

Reviewed By: MaskRay

Subscribers: thopre, cfe-commits, MaskRay, rupprecht, hiraditya, llvm-commits

Tags: #llvm, #clang

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

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

5 years ago[DAGCombine] Remove repeated variables. NFCI.
Simon Pilgrim [Fri, 3 May 2019 18:20:28 +0000 (18:20 +0000)]
[DAGCombine] Remove repeated variables. NFCI.

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

5 years agoRevert r359906, "RegAllocFast: Add heuristic to detect values not live-out of a block"
Nico Weber [Fri, 3 May 2019 18:08:03 +0000 (18:08 +0000)]
Revert r359906, "RegAllocFast: Add heuristic to detect values not live-out of a block"

Makes clang/test/Misc/backend-stack-frame-diagnostics-fallback.cpp fail.

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

5 years ago[TargetLowering] SimplifySetCC - remove repeated variable. NFCI.
Simon Pilgrim [Fri, 3 May 2019 18:02:33 +0000 (18:02 +0000)]
[TargetLowering] SimplifySetCC - remove repeated variable. NFCI.

Also reduce scope of Temp variable.

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

5 years ago[CommandLine] Change help output to prefix long options with `--` instead of `-`...
Don Hinton [Fri, 3 May 2019 17:47:29 +0000 (17:47 +0000)]
[CommandLine] Change help output to prefix long options with `--` instead of `-`. NFC . Part 3 of 5

Summary:
By default, `parseCommandLineOptions()` will accept either a
`-` or `--` prefix for long options -- options with names longer than
a single character.

While this change does not affect behavior, it will be helpful with a
subsequent change that requires long options use the `--` prefix.

Reviewers: rnk, thopre

Reviewed By: thopre

Subscribers: thopre, cfe-commits, hiraditya, llvm-commits

Tags: #llvm, #clang

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

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

5 years agoRevert "[CodeGenPrepare] limit overflow intrinsic matching to a single basic block"
Evgeniy Stepanov [Fri, 3 May 2019 17:31:49 +0000 (17:31 +0000)]
Revert "[CodeGenPrepare] limit overflow intrinsic matching to a single basic block"

This reverts commit r359879, which introduced a compiler crash.

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

5 years agoRegAllocFast: Add heuristic to detect values not live-out of a block
Matt Arsenault [Fri, 3 May 2019 17:03:24 +0000 (17:03 +0000)]
RegAllocFast: Add heuristic to detect values not live-out of a block

Add an improved/new heuristic to catch more cases when values are not
live out of a basic block.

Patch by Matthias Braun

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

5 years ago[hexagon] change AsmParser assertion to error
Brian Cain [Fri, 3 May 2019 16:50:38 +0000 (16:50 +0000)]
[hexagon] change AsmParser assertion to error

For immediates that can't be evaluated in assembler-mapped instructions, we
should return 'invalid operand' instead of assert.

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

5 years ago[Docs][CodeGenerator][eBPF] Correct the values for BPF_X and BPF_K
Yonghong Song [Fri, 3 May 2019 16:40:16 +0000 (16:40 +0000)]
[Docs][CodeGenerator][eBPF] Correct the values for BPF_X and BPF_K

Fix the values of BPF_X and BPF_K according to BPFInstrFormats.td:
"
def BPF_K : BPFSrcType<0x0>;
def BPF_X : BPFSrcType<0x1>;
"

The right value for BPF_X is 0x1, and the right value for BPF_K is 0x0.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Differential Revision: https://reviews.llvm.org/D61512

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

5 years ago[X86] Allow assembly parser to accept x/y/z suffixes on non-memory vfpclassps/pd...
Craig Topper [Fri, 3 May 2019 16:15:15 +0000 (16:15 +0000)]
[X86] Allow assembly parser to accept x/y/z suffixes on non-memory vfpclassps/pd and on memory forms in intel syntax

The x/y/z suffix is needed to disambiguate the memory form in at&t syntax since no xmm/ymm/zmm register is mentioned.

But we should also allow it for the register and broadcast forms where its not needed for consistency. This matches gas.

The printing code will still only use the suffix for the memory form where it is needed.

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

5 years ago[llvm] Revert r231274: "Devirtualize ~parser<T> by making it protected in base classe...
Don Hinton [Fri, 3 May 2019 16:15:13 +0000 (16:15 +0000)]
[llvm] Revert r231274: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"

Summary: This patch was previously applied in r231221, and reverted in
r231254 because it broke self-hosting.  It was subsequently fixed and
reapplied in r231274.  Unfortunately, making the `parser<T>` classes
final prevents inheritance which makes it impossible to implement
custom parsers.

Reverting r231221 restores the ability to customize parsers.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: craig.topper, llvm-commits

Tags: #llvm

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

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

5 years ago[X86] LowerToHorizontalOp - Tidyup calls to getHopForBuildVector. NFCI.
Simon Pilgrim [Fri, 3 May 2019 15:56:06 +0000 (15:56 +0000)]
[X86] LowerToHorizontalOp - Tidyup calls to getHopForBuildVector. NFCI.

Merge the if() tests for the various HADD/SUB + Subtarget tests

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

5 years ago[SelectionDAG] CreateTopologicalOrder - don't use iterator
Simon Pilgrim [Fri, 3 May 2019 15:50:37 +0000 (15:50 +0000)]
[SelectionDAG] CreateTopologicalOrder - don't use iterator

We shouldn't use an iterator to loop across a std::vector when the same loop is adding elements to that std::vector

Found by cppcheck

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

5 years agoAMDGPU: Select VOP3 form of sub
Matt Arsenault [Fri, 3 May 2019 15:37:07 +0000 (15:37 +0000)]
AMDGPU: Select VOP3 form of sub

The VOP3 form should always be the preferred selection form to be
shrunk later.

The r600 sub test needs to be split out because it asserts on the
arguments in the new test during the calling convention lowering.

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

5 years agoAMDGPU: Support shrinking add with FI in SIFoldOperands
Matt Arsenault [Fri, 3 May 2019 15:21:53 +0000 (15:21 +0000)]
AMDGPU: Support shrinking add with FI in SIFoldOperands

Avoids test regression in a future patch

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

5 years agoRevert r359549 - incorrect update of test checks. NFC
Robert Lougher [Fri, 3 May 2019 15:14:19 +0000 (15:14 +0000)]
Revert r359549 - incorrect update of test checks. NFC

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

5 years ago[x86] add tests for fneg with undefs; NFC
Sanjay Patel [Fri, 3 May 2019 15:09:53 +0000 (15:09 +0000)]
[x86] add tests for fneg with undefs; NFC

This was originally part of D61419.

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

5 years agoAMDGPU: Remove redundant patterns for shifts
Matt Arsenault [Fri, 3 May 2019 15:08:36 +0000 (15:08 +0000)]
AMDGPU: Remove redundant patterns for shifts

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

5 years agoAMDGPU: Remove redundant patterns for sub
Matt Arsenault [Fri, 3 May 2019 15:08:35 +0000 (15:08 +0000)]
AMDGPU: Remove redundant patterns for sub

There were 2 patterns for sub, one selecting to sub and one to
subrev. Only one of these will succeed, so remove the reversed one.

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

5 years agoAMDGPU: Add baseline test for future patch
Matt Arsenault [Fri, 3 May 2019 14:54:38 +0000 (14:54 +0000)]
AMDGPU: Add baseline test for future patch

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

5 years agoAMDGPU: Replace shrunk instruction with dummy implicit_def
Matt Arsenault [Fri, 3 May 2019 14:40:10 +0000 (14:40 +0000)]
AMDGPU: Replace shrunk instruction with dummy implicit_def

This was broken if the original operand was killed. The kill flag
would appear on both instructions, and fail the verifier. Keep the
kill flag, but remove the operands from the old instruction. This has
an added benefit of really reducing the use count for future folds.

Ideally the pass would be structured more like what PeepholeOptimizer
does to avoid this hack to avoid breaking instruction iterators.

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

5 years ago[TargetLowering] ShrinkDemandedConstant - reduce scope of TLO.DAG variable. NFCI.
Simon Pilgrim [Fri, 3 May 2019 14:38:24 +0000 (14:38 +0000)]
[TargetLowering] ShrinkDemandedConstant - reduce scope of TLO.DAG variable. NFCI.

Only ever used in one block

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

5 years ago[X86] Remove repeated variables. NFCI.
Simon Pilgrim [Fri, 3 May 2019 14:37:00 +0000 (14:37 +0000)]
[X86] Remove repeated variables. NFCI.

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

5 years agogn build: Merge r359878
Nico Weber [Fri, 3 May 2019 14:27:12 +0000 (14:27 +0000)]
gn build: Merge r359878

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

5 years agoLet --discard-all imply --strip-debug.
Sid Manning [Fri, 3 May 2019 14:14:01 +0000 (14:14 +0000)]
Let --discard-all imply --strip-debug.

This will match gnu strip's behavior.

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

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

5 years ago[X86] Add X64 common prefixes and regenerate mul i64 tests
Simon Pilgrim [Fri, 3 May 2019 14:07:38 +0000 (14:07 +0000)]
[X86] Add X64 common prefixes and regenerate mul i64 tests

Noticed while reviewing D61472

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

5 years agoAMDGPU: Forgot to commit test file for r358890
Matt Arsenault [Fri, 3 May 2019 13:55:40 +0000 (13:55 +0000)]
AMDGPU: Forgot to commit test file for r358890

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

5 years agoAvoid cppcheck operator precedence warnings. NFCI.
Simon Pilgrim [Fri, 3 May 2019 13:50:38 +0000 (13:50 +0000)]
Avoid cppcheck operator precedence warnings. NFCI.

Prefer ((X & Y) ? A : B) to (X & Y ? A : B)

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

5 years agoAMDGPU: Fix incorrect commute with sub when folding immediates
Matt Arsenault [Fri, 3 May 2019 13:42:56 +0000 (13:42 +0000)]
AMDGPU: Fix incorrect commute with sub when folding immediates

When a fold of an immediate into a sub/subrev required shrinking the
instruction, the wrong VOP2 opcode was used. This was using the VOP2
equivalent of the original instruction, not the commuted instruction
with the inverted opcode.

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

5 years agoAMDGPU: Fix test verification
Matt Arsenault [Fri, 3 May 2019 13:42:55 +0000 (13:42 +0000)]
AMDGPU: Fix test verification

This should run the verifier, and needs to enable trackRegLiveness.

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

5 years ago[LICM] auto-generate complete test checks; NFC
Sanjay Patel [Fri, 3 May 2019 13:25:06 +0000 (13:25 +0000)]
[LICM] auto-generate complete test checks; NFC

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

5 years ago[CodeGenPrepare] limit overflow intrinsic matching to a single basic block
Sanjay Patel [Fri, 3 May 2019 13:09:18 +0000 (13:09 +0000)]
[CodeGenPrepare] limit overflow intrinsic matching to a single basic block

Using/updating a dominator tree to match math overflow patterns may be very
expensive in compile-time (because of the way CGP uses a DT), so just handle
the single-block case.

Also, we were restarting the iterator loops when doing the overflow intrinsic
transforms by marking the dominator tree for update. That was done to prevent
iterating over a removed instruction. But we can postpone the deletion using
the existing "RemovedInsts" structure, and that means we don't need to update
the DT.

See post-commit thread for rL354298 for more details:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190422/646276.html

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

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

5 years ago[Object][XCOFF] Add an XCOFF dumper for llvm-readobj.
Sean Fertile [Fri, 3 May 2019 12:57:07 +0000 (12:57 +0000)]
[Object][XCOFF] Add an XCOFF dumper for llvm-readobj.

Patch adds support for dumping of file headers with llvm-readobj. XCOFF
object files are added to test dumping a well formed file, and dumping
both negative timestamps and negative symbol counts, both of which are
allowed in the XCOFF definition.

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

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

5 years ago[TargetLowering] expandUnalignedStore - cleanup EVT variables. NFCI.
Simon Pilgrim [Fri, 3 May 2019 12:55:25 +0000 (12:55 +0000)]
[TargetLowering] expandUnalignedStore - cleanup EVT variables. NFCI.

Avoid duplicated EVTs and rename Store/Load VTs to avoid -Wshadow warnings.

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

5 years agoRevert "[MIR] Add simple PRE pass to MachineCSE"
Anton Afanasyev [Fri, 3 May 2019 12:36:22 +0000 (12:36 +0000)]
Revert "[MIR] Add simple PRE pass to MachineCSE"

This reverts commit 9c20156de39b377190d7a91783d61877b303fe35.
It breaks stage 2 of clang-ppc64be-linux-multistage.

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

5 years ago[SelectionDAG] Use INT_MIN as (1 << 31) is UB for signed integers. NFCI.
Simon Pilgrim [Fri, 3 May 2019 11:32:00 +0000 (11:32 +0000)]
[SelectionDAG] Use INT_MIN as (1 << 31) is UB for signed integers. NFCI.

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

5 years ago[SelectionDAG] computeKnownBits - remove some duplicate/shadow variables. NFCI.
Simon Pilgrim [Fri, 3 May 2019 11:11:03 +0000 (11:11 +0000)]
[SelectionDAG] computeKnownBits - remove some duplicate/shadow variables. NFCI.

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

5 years ago[X86] LowerMULH - remove unused Lo/Hi vector indices. NFCI.
Simon Pilgrim [Fri, 3 May 2019 10:32:07 +0000 (10:32 +0000)]
[X86] LowerMULH - remove unused Lo/Hi vector indices. NFCI.

Leftover from before we had the extract128BitVector helpers.

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

5 years ago[MIR] Add simple PRE pass to MachineCSE
Anton Afanasyev [Fri, 3 May 2019 10:30:59 +0000 (10:30 +0000)]
[MIR] Add simple PRE pass to MachineCSE

This is the second part of the commit fixing PR38917 (hoisting
partitially redundant machine instruction). Most of PRE (partitial
redundancy elimination) and CSE work is done on LLVM IR, but some of
redundancy arises during DAG legalization. Machine CSE is not enough
to deal with it. This simple PRE implementation works a little bit
intricately: it passes before CSE, looking for partitial redundancy
and transforming it to fully redundancy, anticipating that the next
CSE step will eliminate this created redundancy. If CSE doesn't
eliminate this, than created instruction will remain dead and eliminated
later by Remove Dead Machine Instructions pass.

The third part of the commit is supposed to refactor MachineCSE,
to make it more clear and to merge MachinePRE with MachineCSE,
so one need no rely on further Remove Dead pass to clear instrs
not eliminated by CSE.

First step: https://reviews.llvm.org/D54839

Fixes llvm.org/PR38917

Reviewers: RKSimon

Subscribers: hfinkel, llvm-commits

Tags: #llvm

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

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

5 years agoReduce variable scope to just the if() block its actually used in. NFCI.
Simon Pilgrim [Fri, 3 May 2019 10:13:41 +0000 (10:13 +0000)]
Reduce variable scope to just the if() block its actually used in. NFCI.

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

5 years ago[X86] Add more one checks to masked compare patterns that were missed in r358358.
Craig Topper [Fri, 3 May 2019 07:14:05 +0000 (07:14 +0000)]
[X86] Add more one checks to masked compare patterns that were missed in r358358.

This covers the patterns we use for widening 128/256 comparisons to 512-bit when
AVX512VL isn't supported.

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

5 years ago[docs] Add support for Markdown documentation when creating man pages
Igor Kudrin [Fri, 3 May 2019 05:11:48 +0000 (05:11 +0000)]
[docs] Add support for Markdown documentation when creating man pages

rL358749 added a documentation page in the Markdown format. Currently,
such pages are ignored in the configuration script for manual pages.
This patch fixes that.

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

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

5 years ago[IRTranslator] Use the alloc size instead of the store size when translating allocas
Quentin Colombet [Fri, 3 May 2019 01:23:56 +0000 (01:23 +0000)]
[IRTranslator] Use the alloc size instead of the store size when translating allocas

We use to incorrectly use the store size instead of the alloc size when
creating the stack slot for allocas.
On aarch64 this can be demonstrated by allocating weirdly sized types.

For instance, in the added test case, we use an alloca for i19. We used
to allocate a slot of size 24-bit (19 rounded up to the next byte),
whereas we really want to use a full 32-bit slot for this type.

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

5 years ago[AArch64][MC] Reject "add x0, x1, w2, lsl #1" etc.
Eli Friedman [Fri, 3 May 2019 00:59:52 +0000 (00:59 +0000)]
[AArch64][MC] Reject "add x0, x1, w2, lsl #1" etc.

Looks like just a minor oversight in the parsing code.

Fixes https://bugs.llvm.org/show_bug.cgi?id=41504.

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

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

5 years agoTidy up a comment, fix a typo, remove a comment that's obsolete.
Eric Christopher [Fri, 3 May 2019 00:15:23 +0000 (00:15 +0000)]
Tidy up a comment, fix a typo, remove a comment that's obsolete.

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

5 years ago[AArch64][Windows] Compute function length correctly in unwind tables.
Eli Friedman [Fri, 3 May 2019 00:10:45 +0000 (00:10 +0000)]
[AArch64][Windows] Compute function length correctly in unwind tables.

The primary fix here is to WinException.cpp: we need to exclude jump
tables when computing the length of a function, or else we fail to
correctly compute the length. (We can only compute the number of bytes
consumed by certain assembler directives after the entire file is
parsed. ".p2align" is one of those directives, and is used by jump table
generation.)

The secondary fix, to MCWin64EH, is to make sure we don't silently
miscompile if we hit a similar situation in the future.

It's possible we could extend ARM64EmitUnwindInfo so it allows function
bodies that contain assembler directives, but that's a lot more
complicated; see the FIXME in MCWin64EH.cpp.

Fixes https://bugs.llvm.org/show_bug.cgi?id=41581 .

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

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

5 years ago[MemorySSA] Check that block is reachable when adding phis.
Alina Sbirlea [Thu, 2 May 2019 23:41:58 +0000 (23:41 +0000)]
[MemorySSA] Check that block is reachable when adding phis.

Summary:
Originally the insertDef method was only used when building MemorySSA, and was limiting the number of Phi nodes that it created.
Now it's used for updates as well, and it can create additional Phis needed for correctness.
Make sure no Phis are created in unreachable blocks (condition met during MSSA build), otherwise the renamePass will find a null DTNode.

Resolves PR41640.

Reviewers: george.burgess.iv

Subscribers: jlebar, Prazek, llvm-commits

Tags: #llvm

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

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

5 years ago[MemorySSA] Refactor removing multiple trivial phis [NFC].
Alina Sbirlea [Thu, 2 May 2019 23:12:49 +0000 (23:12 +0000)]
[MemorySSA] Refactor removing multiple trivial phis [NFC].

Summary: Create a method to clean up multiple potentially trivial phis, since we will need this often.

Reviewers: george.burgess.iv

Subscribers: jlebar, Prazek, llvm-commits

Tags: #llvm

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

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

5 years ago[X86] Remove LEA16r references from X86FixupLEAs. NFCI
Craig Topper [Thu, 2 May 2019 22:46:23 +0000 (22:46 +0000)]
[X86] Remove LEA16r references from X86FixupLEAs. NFCI

As far as I know, we never emit LEA16r

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

5 years ago[X86] Correct the register class for specific mask register constraints in getRegForI...
Craig Topper [Thu, 2 May 2019 22:26:40 +0000 (22:26 +0000)]
[X86] Correct the register class for specific mask register constraints in getRegForInlineAsmConstraint when the VT is a scalar type

The default impementation in the base class for TargetLowering::getRegForInlineAsmConstraint doesn't work for mask registers when the VT is a scalar type integer types since the only legal mask types are vXi1. So we end up just getting whatever the first register class that contains the register. Currently this appears to be VK1, but its really dependent on the order tablegen outputs the register classes.

Some code in the caller ends up looking up the type for this register class and find v1i1 then generates a copyfromreg from the physical k-register with the v1i1 type. Then it generates an any_extend from v1i1 to the scalar VT which isn't legal. This bad any_extend sticks around until isel where it selects a MOVZX32rr8 with a v1i1 input or maybe a i8 input. Not sure but eventually we pick up a copy from VK1 to GR8 in MachineIR which isn't supported. This leads to a failure in physical register copying.

This patch uses the scalar type to find a VK class of the right size. In the attached test case this will be VK16. This causes a bitcast from vk16 to i16 to be generated instead of an any_extend. This will be properly iseled to a VK16 to GR32 copy and a GR32->GR16 extract_subreg.

Fixes PR41678

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

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

5 years ago[SelectionDAG] Add asserts to verify the vectorness of input and output types of...
Craig Topper [Thu, 2 May 2019 22:26:26 +0000 (22:26 +0000)]
[SelectionDAG] Add asserts to verify the vectorness of input and output types of TRUNCATE/ZERO_EXTEND/ANY_EXTEND/SIGN_EXTEND agree

As a result of the underlying cause of PR41678 we created an ANY_EXTEND node with a scalar result type and v1i1 input type. Ideally we would have asserted for this instead of letting it go through to instruction selection and generate bad machine IR

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

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

5 years ago[AArch64] Update for Exynos
Evandro Menezes [Thu, 2 May 2019 22:01:39 +0000 (22:01 +0000)]
[AArch64] Update for Exynos

Fix the forwarding of multiplication results for Exynos M4.

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

5 years ago[X86] Remove string literal from an if. NFC
Craig Topper [Thu, 2 May 2019 21:57:18 +0000 (21:57 +0000)]
[X86] Remove string literal from an if. NFC

This if used to be an assert that got refactored into an if, but left the string literal behind.

Fixes PR41718

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

5 years agoRevert [ThinLTO] Fix X86/strong_non_prevailing.ll after llvm-nm 'r' change
Jordan Rupprecht [Thu, 2 May 2019 21:48:04 +0000 (21:48 +0000)]
Revert [ThinLTO] Fix X86/strong_non_prevailing.ll after llvm-nm 'r' change

This reverts r359314 (git commit 5015aa854dc043b2ae5d95e04e00d98518207ce5)

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

5 years agoRevert [llvm-nm] Fix handling of symbol types + [llvm-nm] Generalize symbol types
Jordan Rupprecht [Thu, 2 May 2019 21:42:46 +0000 (21:42 +0000)]
Revert [llvm-nm] Fix handling of symbol types + [llvm-nm] Generalize symbol types

This reverts r359311 and r359312 (git commit 0bf06a8f59b0074a60871865e828d92db8930c59 and 5f184f17800ea2ac27be5e4ab540cb94a46e80c7)

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

5 years agolld-link: Add /force:multipleres extension to make dupe resource diag non-fatal
Nico Weber [Thu, 2 May 2019 21:21:55 +0000 (21:21 +0000)]
lld-link: Add /force:multipleres extension to make dupe resource diag non-fatal

As a side benefit, lld-link now reports more than one duplicate resource
entry before exiting with an error even if the new flag is not passed.

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

5 years ago[gn] Include the missing BUILD.gn file for libcxxabi includes
Petr Hosek [Thu, 2 May 2019 21:20:08 +0000 (21:20 +0000)]
[gn] Include the missing BUILD.gn file for libcxxabi includes

This was omitted in r359805.

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

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

5 years ago[gn] Update the clangd test lit site configuration
Petr Hosek [Thu, 2 May 2019 20:34:54 +0000 (20:34 +0000)]
[gn] Update the clangd test lit site configuration

This reflects changes made in r359763.

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

5 years agoTypo Functino->Function.
Eric Christopher [Thu, 2 May 2019 19:49:35 +0000 (19:49 +0000)]
Typo Functino->Function.

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

5 years agobuild: add option to disable unwind tables
Saleem Abdulrasool [Thu, 2 May 2019 19:37:26 +0000 (19:37 +0000)]
build: add option to disable unwind tables

The unwind tables (`.eh_frame`, `.arm.extab`) add a significant chunk of data to
the final binaries.  These should not be needed normally, particularly when
exceptions are disabled.  This enables shrinking `lldb-server` by ~18% (3 MiB)
when built with gold.

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

5 years ago[yaml2obj] - Make interface of `NameToIdxMap` class be human friendly and fix users.
George Rimar [Thu, 2 May 2019 19:28:04 +0000 (19:28 +0000)]
[yaml2obj] - Make interface of `NameToIdxMap` class be human friendly and fix users.

This patch inverses the values returned by `addName` and
`lookup` methods of the class mentioned so that they
now return true on success and false on failure.
Also, it does minor code cleanup.

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

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

5 years ago[gn] Include libcxx configuration file
Petr Hosek [Thu, 2 May 2019 19:07:23 +0000 (19:07 +0000)]
[gn] Include libcxx configuration file

This was omitted in r359806 but is already referenced in the GN build.

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

5 years ago[gn] Support for building libc++
Petr Hosek [Thu, 2 May 2019 17:29:41 +0000 (17:29 +0000)]
[gn] Support for building libc++

This change introduces support for building libc++. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

We only support two stage build at the moment.

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

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

5 years ago[gn] Support for building libcxxabi
Petr Hosek [Thu, 2 May 2019 17:29:39 +0000 (17:29 +0000)]
[gn] Support for building libcxxabi

This change introduces support for building libcxxabi. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

We only support two stage build at the moment.

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

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

5 years ago[gn] Support for building libunwind
Petr Hosek [Thu, 2 May 2019 17:29:37 +0000 (17:29 +0000)]
[gn] Support for building libunwind

This change introduces support for building libuwind. The library
build should be complete, but not all CMake options have been
replicated in GN. We also don't support tests yet.

We only support two stage build at the moment.

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

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

5 years ago[DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try)
Sanjay Patel [Thu, 2 May 2019 15:02:08 +0000 (15:02 +0000)]
[DAGCombiner] try repeated fdiv divisor transform before building estimate (2nd try)

The original patch was committed at rL359398 and reverted at rL359695 because of
infinite looping.

This includes a fix to check for a vector splat of "1.0" to avoid the infinite loop.

Original commit message:

This was originally part of D61028, but it's an independent diff.

If we try the repeated divisor reciprocal transform before producing an estimate sequence,
then we have an opportunity to use scalar fdiv. On x86, the trade-off is 1 divss vs. 5
vector FP ops in the default estimate sequence. On recent chips (Skylake, Ryzen), the
full-precision division is only 3 cycle throughput, so that's probably the better perf
default option and avoids problems from x86's inaccurate estimates.

The last 2 tests show that users still have the option to override the defaults by using
the function attributes for reciprocal estimates, but those patterns are potentially made
faster by converting the vector ops (including ymm ops) to scalar math.

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

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

5 years ago[SelectionDAG] remove constant folding limitations based on FP exceptions
Sanjay Patel [Thu, 2 May 2019 14:47:59 +0000 (14:47 +0000)]
[SelectionDAG] remove constant folding limitations based on FP exceptions

We don't have FP exception limits in the IR constant folder for the binops (apart from strict ops),
so it does not make sense to have them here in the DAG either. Nothing else in the backend tries
to preserve exceptions (again outside of strict ops), so I don't see how this could have ever
worked for real code that cares about FP exceptions.

There are still cases (examples: unary opcodes in SDAG, FMA in IR) where we are trying (at least
partially) to preserve exceptions without even asking if the target supports FP exceptions. Those
should be corrected in subsequent patches.

Real support for FP exceptions requires several changes to handle the constrained/strict FP ops.

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

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

5 years ago[X86][SSE] lowerAddSubToHorizontalOp - enable ymm extraction+fold
Simon Pilgrim [Thu, 2 May 2019 14:00:55 +0000 (14:00 +0000)]
[X86][SSE] lowerAddSubToHorizontalOp - enable ymm extraction+fold

Limiting scalar hadd/hsub generation to the lowest xmm looks to be unnecessary - we will be extracting one upper xmm whatever, and we can remove a shuffle by using the hop which is inline with what shouldUseHorizontalOp expects to happen anyway.

Testing on btver2 (the main target for fast-hops) shows this is beneficial even for float ops where we have a 'shuffle' to extract the float result:
https://godbolt.org/z/0R-U-K

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

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

5 years ago[X86][SSE] Move shouldUseHorizontalOp inside isHorizontalBinOp. NFCI.
Simon Pilgrim [Thu, 2 May 2019 12:18:24 +0000 (12:18 +0000)]
[X86][SSE] Move shouldUseHorizontalOp inside isHorizontalBinOp. NFCI.

Matches what we do for lowerAddSubToHorizontalOp and will make it easier to peek through subvectors to help fix PR39921

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

5 years ago[llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default...
James Henderson [Thu, 2 May 2019 11:53:02 +0000 (11:53 +0000)]
[llvm-strip]Add --no-strip-all to disable --strip-all behaviour (including default stripping)

If certain switches are not specified, llvm-strip behaves as if
--strip-all were specified. This means that for testing, when we don't
want the stripping behaviour, we have to specify one of these switches,
which can be confusing. This change adds --no-strip-all to allow an
alternative way of suppressing the default stripping, in a less
confusing manner.

Reviewed by: jakehehrlich, MaskRay

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

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

5 years ago[LTO] Migrate typedef to using
Fangrui Song [Thu, 2 May 2019 10:52:34 +0000 (10:52 +0000)]
[LTO] Migrate typedef to using

using has been used in several places in the file. Migrate the rest for consistency.

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

5 years ago[llvm-readobj] Delete and inline relocAddressLess
Fangrui Song [Thu, 2 May 2019 10:49:27 +0000 (10:49 +0000)]
[llvm-readobj] Delete and inline relocAddressLess

It is used only once in COFFDumper.cpp. Deleting it from the public
interface seems better.

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

5 years ago[Object] Change getSectionName() to return Expected<StringRef>
Fangrui Song [Thu, 2 May 2019 10:32:03 +0000 (10:32 +0000)]
[Object] Change getSectionName() to return Expected<StringRef>

Summary:
It currently receives an output parameter and returns
std::error_code. Expected<StringRef> fits for this purpose perfectly.

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

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

5 years ago[ARM GlobalISel] Fixup r359768
Diana Picus [Thu, 2 May 2019 10:08:29 +0000 (10:08 +0000)]
[ARM GlobalISel] Fixup r359768

Get rid of local variable used only in assertion.

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

5 years ago[ARM GlobalISel] Select extensions to < 32 bits
Diana Picus [Thu, 2 May 2019 09:28:00 +0000 (09:28 +0000)]
[ARM GlobalISel] Select extensions to < 32 bits

Select G_SEXT and G_ZEXT with destination types smaller than 32 bits in
the exact same way as 32 bits. This overwrites the higher bits, but that
should be ok since all legal users of types smaller than 32 bits ignore
those bits anyway.

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

5 years ago[ARM GlobalISel] Rename some inst selector tests. NFC
Diana Picus [Thu, 2 May 2019 09:24:47 +0000 (09:24 +0000)]
[ARM GlobalISel] Rename some inst selector tests. NFC

Prepare to add support for extensions to types smaller than 32 bits.

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

5 years ago[ARM GlobalISel] Legalize extensions to < 32 bits
Diana Picus [Thu, 2 May 2019 09:21:46 +0000 (09:21 +0000)]
[ARM GlobalISel] Legalize extensions to < 32 bits

Make it legal to extend from e.g. s1 to s8 or s16.

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

5 years ago[NFC][PowerPC] Return early if the element type is not byte-sized in combineBVOfConse...
Kang Zhang [Thu, 2 May 2019 08:15:13 +0000 (08:15 +0000)]
[NFC][PowerPC] Return early if the element type is not byte-sized in combineBVOfConsecutiveLoads

Summary:
Based on the Eli Friedman's comments in https://reviews.llvm.org/D60811 , we'd better return early if the element type is not byte-sized in `combineBVOfConsecutiveLoads`.

Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D61076

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

5 years agoObject/Minidump: Add support for the ThreadList stream
Pavel Labath [Thu, 2 May 2019 07:45:42 +0000 (07:45 +0000)]
Object/Minidump: Add support for the ThreadList stream

Summary:
The stream contains the list of threads belonging to the process
described by the minidump. Its structure is the same as the ModuleList
stream, and in fact, I have generalized the ModuleList reading code to
handle this stream too.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: llvm-commits, lldb-commits, markmentovai, zturner

Tags: #llvm

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

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

5 years ago[Support] Don't check MAP_ANONYMOUS, just use MAP_ANON
Fangrui Song [Thu, 2 May 2019 05:58:09 +0000 (05:58 +0000)]
[Support] Don't check MAP_ANONYMOUS, just use MAP_ANON

Though being marked "deprecated" by the Linux man-pages project
(MAP_ANON is a synonym of MAP_ANONYMOUS), it is the mostly widely
available macro - many systems that don't provide MAP_ANONYMOUS have
MAP_ANON. MAP_ANON is also used here and there in compiler-rt.

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