]> granicus.if.org Git - llvm/log
llvm
5 years ago[Tests] Start consolidating lftr tests into a single file
Philip Reames [Thu, 16 May 2019 20:33:41 +0000 (20:33 +0000)]
[Tests] Start consolidating lftr tests into a single file

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

5 years ago[Tests] Autogen the last lftr test
Philip Reames [Thu, 16 May 2019 20:24:57 +0000 (20:24 +0000)]
[Tests] Autogen the last lftr test

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

5 years ago[Tests] Autogen a few more lftr tests for readability
Philip Reames [Thu, 16 May 2019 20:19:02 +0000 (20:19 +0000)]
[Tests] Autogen a few more lftr tests for readability

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

5 years ago[Tests] Autogen a few lftr test in preparation for merging
Philip Reames [Thu, 16 May 2019 20:15:25 +0000 (20:15 +0000)]
[Tests] Autogen a few lftr test in preparation for merging

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

5 years ago[NFC][InstSimplify] Update fast-math.ll tests I botched in r360808.
Cameron McInally [Thu, 16 May 2019 19:00:57 +0000 (19:00 +0000)]
[NFC][InstSimplify] Update fast-math.ll tests I botched in r360808.

These were new tests I added in r360808. I made a mistake while converting the exisiting binary FNeg test into the new unary FNeg tests. Correct that.

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

5 years ago[ORC] Change handling for SymbolStringPtr tombstones and empty keys.
Lang Hames [Thu, 16 May 2019 18:29:34 +0000 (18:29 +0000)]
[ORC] Change handling for SymbolStringPtr tombstones and empty keys.

SymbolStringPtr used to use nullptr as its empty value and (since it performed
ref-count operations on any non-nullptr) a pointer to a special pool-entry
instance as its tombstone.

This commit changes the scheme to use two invalid pointer values as the empty
and tombstone values, and broadens the ref-count guard to prevent ref-counting
operations from being performed on these pointers. This should improve the
performance of SymbolStringPtrs used in DenseMaps/DenseSets, as ref counting
operations will no longer be performed on the tombstone.

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

5 years ago[InstCombine] add tests for shuffle of insert subvectors; NFC
Sanjay Patel [Thu, 16 May 2019 18:09:47 +0000 (18:09 +0000)]
[InstCombine] add tests for shuffle of insert subvectors; NFC

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

5 years agoFix typos in comment.
Joerg Sonnenberger [Thu, 16 May 2019 18:01:57 +0000 (18:01 +0000)]
Fix typos in comment.

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

5 years ago[ORC] Use inline friend definitions for SymbolStringPtr operators.
Lang Hames [Thu, 16 May 2019 17:20:17 +0000 (17:20 +0000)]
[ORC] Use inline friend definitions for SymbolStringPtr operators.

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

5 years ago[X86] Use 0x9 instead of 0x1 as the immediate in some masked floor pattern. Similarly...
Craig Topper [Thu, 16 May 2019 16:53:50 +0000 (16:53 +0000)]
[X86] Use 0x9 instead of 0x1 as the immediate in some masked floor pattern. Similarly change 0x2 to 0xA for ceil.

This suppresses exceptions which is what we should be doing for ceil and floor. We already use the correct immediate
in patterns without masking.

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

5 years ago[CommandLine] Don't allow duplicate categories.
Don Hinton [Thu, 16 May 2019 16:25:13 +0000 (16:25 +0000)]
[CommandLine] Don't allow duplicate categories.

Summary:
This is a fix to D61574, r360179, that allowed duplicate
OptionCategory's.  This change adds a check to make sure a category can
only be added once even if the user passes it twice.

Reviewed By: MaskRay

Tags: #llvm

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

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

5 years ago[llvm-objdump]Move test code missed in r360904
James Henderson [Thu, 16 May 2019 15:20:08 +0000 (15:20 +0000)]
[llvm-objdump]Move test code missed in r360904

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

5 years agoMinidump: Add support for the MemoryList stream
Pavel Labath [Thu, 16 May 2019 15:17:30 +0000 (15:17 +0000)]
Minidump: Add support for the MemoryList stream

Summary:
the stream format is exactly the same as for ThreadList and ModuleList
streams, only the entry types are slightly different, so the changes in
this patch are just straight-forward applications of established
patterns.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: markmentovai, lldb-commits, llvm-commits

Tags: #llvm

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

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

5 years agoAMDGPU: Introduce TokenFactor for ABI register copies in call sequence
Matt Arsenault [Thu, 16 May 2019 15:10:27 +0000 (15:10 +0000)]
AMDGPU: Introduce TokenFactor for ABI register copies in call sequence

The call was missing chain dependencies on the pre-call copies. I
don't think this was causing any real issues however.

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

5 years ago[InstSimplify] add tests for fcmp of maxnum with constants; NFC
Sanjay Patel [Thu, 16 May 2019 15:00:11 +0000 (15:00 +0000)]
[InstSimplify] add tests for fcmp of maxnum with constants; NFC

Sibling tests for rL360899 (D61691).

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

5 years ago[llvm-objdump]Split section-filter.test in two to remove X86 dependency
James Henderson [Thu, 16 May 2019 14:49:10 +0000 (14:49 +0000)]
[llvm-objdump]Split section-filter.test in two to remove X86 dependency

This allows the generic parts of section-filter.test to be tested on all
targets. The X86-specific parts have been moved to another test.

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

5 years agoAMDGPU: Assume xnack is enabled by default
Matt Arsenault [Thu, 16 May 2019 14:48:34 +0000 (14:48 +0000)]
AMDGPU: Assume xnack is enabled by default

This is the conservatively correct default. It is always safe to
assume xnack is enabled, but not the converse.

Introduce a feature to blacklist targets where xnack can never be
meaningfully enabled. I'm not sure the targets this is applied to is
100% correct.

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

5 years agoResubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_conver...
Stephen Tozer [Thu, 16 May 2019 14:41:01 +0000 (14:41 +0000)]
Resubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed

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

Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop casts
impossible. With the recent addition of DW_OP_LLVM_convert this salvaging is
now possible, and so can be used to fix the attached bug as well as any cases
where SExt instruction results are lost in the debugging metadata. This patch
introduces this fix by expanding the salvage debug info method to cover these
cases using the new operator.

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

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

5 years ago[llvm-objdump] Add "REQUIES: x86-registered-target" to section-filter.test after...
Fangrui Song [Thu, 16 May 2019 14:40:31 +0000 (14:40 +0000)]
[llvm-objdump] Add "REQUIES: x86-registered-target" to section-filter.test after rL360893

Appease the hexagon buildbot that doesn't build X86. Disassemblers
require Target/X86 support.

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

5 years ago[InstSimplify] fold fcmp (minnum, X, C1), C2
Sanjay Patel [Thu, 16 May 2019 14:03:10 +0000 (14:03 +0000)]
[InstSimplify] fold fcmp (minnum, X, C1), C2
   minnum(X, LesserC) == C --> false
   minnum(X, LesserC) >= C --> false
   minnum(X, LesserC) >  C --> false
   minnum(X, LesserC) != C --> true
   minnum(X, LesserC) <= C --> true
   minnum(X, LesserC) <  C --> true

maxnum siblings will follow if there are no problems here.

We should be able to perform some other combines when the constants
are equal or greater-than too, but that would go in instcombine.

We might also generalize this by creating an FP ConstantRange
(similar to what we do for integers).

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

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

5 years agoFixes for builds that require strict X/Open and POSIX compatiblity
Xing Xue [Thu, 16 May 2019 14:02:13 +0000 (14:02 +0000)]
Fixes for builds that require strict X/Open and POSIX compatiblity

Summary:
- Use alternative to MAP_ANONYMOUS for allocating mapped memory if it isn't available
- Use strtok_r instead of strsep as part of getting program path
- Don't try to find the width of a terminal using "struct winsize" and TIOCGWINSZ on POSIX builds. These aren't defined under POSIX (even though some platforms make them available when they shouldn't), so just check if we are doing a X/Open or POSIX compliant build first.

Author: daltenty

Reviewers: hubert.reinterpretcast, xingxue, andusy

Reviewed By: hubert.reinterpretcast

Subscribers: MaskRay, jsji, hiraditya, kristina, llvm-commits

Tags: #llvm

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

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

5 years ago[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV
Alex Bradbury [Thu, 16 May 2019 13:56:23 +0000 (13:56 +0000)]
[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV

This is in preparation for emitting CFI directives.

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

5 years ago[tests][go]Add -stdlib=libc++ to build GO test if LLVM is built with libc++
Xing Xue [Thu, 16 May 2019 13:32:55 +0000 (13:32 +0000)]
[tests][go]Add -stdlib=libc++ to build GO test if LLVM is built with libc++

When libc++ is used to build LLVM libraries, these libraries have dependencies on libc++ and C++ STL signatures in these libraries are corresponding to libc++ implementation. Therefore, -stdlib=libc++ is required on the C++ compiler command for building GO tests that link with these LLVM libraries.

Reviewers: hubert.reinterpretcast, sfertile, amyk, EricWF

Reviewed By: sfertile, hubert.reinterpretcast

Subscribers: jsji, llvm-commits

Tags: #llvm

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

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

5 years ago[AArch64] Handle ISD::LROUND and ISD::LLROUND
Adhemerval Zanella [Thu, 16 May 2019 13:30:18 +0000 (13:30 +0000)]
[AArch64] Handle ISD::LROUND and ISD::LLROUND

This patch optimizes ISD::LROUND and ISD::LLROUND to fcvtas
instruction. It currently only handles the scalar version.

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

5 years ago[llvm-objdump]Improve testing of some switches #1
James Henderson [Thu, 16 May 2019 13:28:36 +0000 (13:28 +0000)]
[llvm-objdump]Improve testing of some switches #1

This is the first in a set of patches I have to improve testing of
llvm-objdump. This patch targets --all-headers, --section, and
--full-contents. In the --section case, it deletes a pre-canned binary
which is only used by the one test and replaces it with yaml.

Reviewed by: grimar, MaskRay

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

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

5 years agoRecommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef>
Fangrui Song [Thu, 16 May 2019 13:24:04 +0000 (13:24 +0000)]
Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef>

r360876 didn't fix 2 call sites in clang.

Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.

Follow-up of D61781.

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

5 years ago[CodeGen] Add lround/llround builtins
Adhemerval Zanella [Thu, 16 May 2019 13:15:27 +0000 (13:15 +0000)]
[CodeGen] Add lround/llround builtins

This patch add the ISD::LROUND and ISD::LLROUND along with new
intrinsics.  The changes are straightforward as for other
floating-point rounding functions, with just some adjustments
required to handle the return value being an interger.

The idea is to optimize lround/llround generation for AArch64
in a subsequent patch.  Current semantic is just route it to libm
symbol.

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

5 years agoGlobalISel: Add buildFMA to MachineIRBuilder
Matt Arsenault [Thu, 16 May 2019 13:04:20 +0000 (13:04 +0000)]
GlobalISel: Add buildFMA to MachineIRBuilder

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

5 years agoRegAllocFast: Improve hinting heuristic
Matt Arsenault [Thu, 16 May 2019 12:50:39 +0000 (12:50 +0000)]
RegAllocFast: Improve hinting heuristic

Trace through multiple COPYs when looking for a physreg source. Add
hinting for vregs that will be copied into physregs (we only hinted
for vregs getting copied to a physreg previously).  Give hinted a
register a bonus when deciding which value to spill.  This is part of
my rewrite regallocfast series. In fact this one doesn't even have an
effect unless you also flip the allocation to happen from back to
front of a basic block. Nonetheless it helps to split this up to ease
review of D52010

Patch by Matthias Braun

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

5 years ago[DominatorTree] Print roots unconditionally in `print()`.
Clement Courbet [Thu, 16 May 2019 12:48:56 +0000 (12:48 +0000)]
[DominatorTree] Print roots unconditionally in `print()`.

Summary:
This came up in a debugging session. I was failing to update the root of
the tree, and got during verification:

```
DominatorTree is different than a freshly computed one!
        Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]

        Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]
```

We now print:

```
DominatorTree is different than a freshly computed one!
        Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]
Roots: <badref>

        Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
  [1] %"entry+land.rhs.i" {4294967295,4294967295} [0]
    [2] %opeq1.exit {4294967295,4294967295} [1]
Roots: %"entry+land.rhs.i"
```

Reviewers: kuhar, asbirlea

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[NFC] Fixup FileCheck option name in tests added in rL360881
Roman Lebedev [Thu, 16 May 2019 12:39:34 +0000 (12:39 +0000)]
[NFC] Fixup FileCheck option name in tests added in rL360881

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

5 years ago[NFC][CodeGen] Add some more tests for pulling binops through shifts
Roman Lebedev [Thu, 16 May 2019 12:26:53 +0000 (12:26 +0000)]
[NFC][CodeGen] Add some more tests for pulling binops through shifts

The ashr variant may see relaxation in https://reviews.llvm.org/D61918

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

5 years agoGlobalISel: Add buildXor/buildNot
Matt Arsenault [Thu, 16 May 2019 12:23:04 +0000 (12:23 +0000)]
GlobalISel: Add buildXor/buildNot

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

5 years agoGlobalISel: Add DstOp version of buildIntrinsic
Matt Arsenault [Thu, 16 May 2019 12:22:56 +0000 (12:22 +0000)]
GlobalISel: Add DstOp version of buildIntrinsic

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

5 years agoRevert r360876 "[Object] Change object::SectionRef::getContents() to return Expected...
Hans Wennborg [Thu, 16 May 2019 12:08:34 +0000 (12:08 +0000)]
Revert r360876 "[Object] Change object::SectionRef::getContents() to return Expected<StringRef>"

It broke the Clang build, see llvm-commits thread.

> Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
>
> Follow-up of D61781.

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

5 years agoAMDGPU/GlobalISel: Correct regbank for 1-bit and/or/xor
Matt Arsenault [Thu, 16 May 2019 12:06:41 +0000 (12:06 +0000)]
AMDGPU/GlobalISel: Correct regbank for 1-bit and/or/xor

Bool values should use the scc/vcc regbank since r350611.

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

5 years ago[Object] Change object::SectionRef::getContents() to return Expected<StringRef>
Fangrui Song [Thu, 16 May 2019 11:33:48 +0000 (11:33 +0000)]
[Object] Change object::SectionRef::getContents() to return Expected<StringRef>

Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.

Follow-up of D61781.

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

5 years ago[AArch64][SVE2] Asm: implement CMLA/SQRDCMLAH instructions
Cullen Rhodes [Thu, 16 May 2019 09:42:22 +0000 (09:42 +0000)]
[AArch64][SVE2] Asm: implement CMLA/SQRDCMLAH instructions

Summary:
This patch adds support for the indexed and unpredicated vectors forms
of the CMLA and SQRDCMLAH instructions.

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer

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

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

5 years ago[AArch64][SVE2] Asm: implement CDOT instruction
Cullen Rhodes [Thu, 16 May 2019 09:33:44 +0000 (09:33 +0000)]
[AArch64][SVE2] Asm: implement CDOT instruction

Summary:
The complex DOT instructions perform a dot-product on quadtuplets from
two source vectors and the resuling wide real or wide imaginary is
accumulated into the destination register. The instructions come in two
forms:

Vector form, e.g.
  cdot z0.s, z1.b, z2.b, #90    - complex dot product on four 8-bit quad-tuplets,
                                  accumulating results in 32-bit elements. The
                                  complex numbers in the second source vector are
                                  rotated by 90 degrees.

  cdot z0.d, z1.h, z2.h, #180   - complex dot product on four 16-bit quad-tuplets,
                                  accumulating results in 64-bit elements.
                                  The complex numbers in the second source
                                  vector are rotated by 180 degrees.

Indexed form, e.g.
  cdot z0.s, z1.b, z2.b[3], #0  - complex dot product on four 8-bit quad-tuplets,
                                  with specified quadtuplet from second source vector,
                                  accumulating results in 32-bit elements.
  cdot z0.d, z1.h, z2.h[1], #0  - complex dot product on four 16-bit quad-tuplets,
                                  with specified quadtuplet from second source vector,
                                  accumulating results in 64-bit elements.

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer, rovka

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

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

5 years ago[AArch64][SVE2] Asm: add unpredicated integer multiply instructions
Cullen Rhodes [Thu, 16 May 2019 09:07:26 +0000 (09:07 +0000)]
[AArch64][SVE2] Asm: add unpredicated integer multiply instructions

Summary:
Add support for the following instructions:

  * MUL (indexed and unpredicated vectors forms)
  * SQDMULH (indexed and unpredicated vectors forms)
  * SQRDMULH (indexed and unpredicated vectors forms)
  * SMULH (unpredicated, predicated form added in SVE)
  * UMULH (unpredicated, predicated form added in SVE)
  * PMUL (unpredicated)

The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest

Reviewed By: SjoerdMeijer, rovka

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

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

5 years agoAdd Triple::isPPC64()
Fangrui Song [Thu, 16 May 2019 08:31:22 +0000 (08:31 +0000)]
Add Triple::isPPC64()

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

5 years ago[llvm-readobj] - Revert r360676 partially. NFC.
George Rimar [Thu, 16 May 2019 06:22:51 +0000 (06:22 +0000)]
[llvm-readobj] - Revert r360676 partially. NFC.

In the r360676 "Apply clang format. NFC" I applied clang-format
for whole ELFDumper.cpp. It caused a little discussion,
one of the points mentioned was that previously nicely lined up
tables are not so nice now.

This patch reverts them.

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

5 years agoReland r360771 "[MergeICmps] Simplify the code."
Clement Courbet [Thu, 16 May 2019 06:18:02 +0000 (06:18 +0000)]
Reland r360771 "[MergeICmps] Simplify the code."

This revision does not seem to be the culprit.

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

5 years ago[IRMover] Improve diagnostic messages for conflicting metadata
Igor Kudrin [Thu, 16 May 2019 05:23:13 +0000 (05:23 +0000)]
[IRMover] Improve diagnostic messages for conflicting metadata

This does the similar for error messages as rL344011 has done for warnings.

With llvm::lto::LTO, the error might appear when LTO::run() is executed.
In that case, the calling code cannot know which module causes the error
and, subsequently, cannot hint the user.

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

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

5 years agoGlobalISel: Add buildFConstant for APFloat
Matt Arsenault [Thu, 16 May 2019 04:09:06 +0000 (04:09 +0000)]
GlobalISel: Add buildFConstant for APFloat

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

5 years agoGlobalISel: Add some FP instructions to MachineIRBuilder
Matt Arsenault [Thu, 16 May 2019 04:08:55 +0000 (04:08 +0000)]
GlobalISel: Add some FP instructions to MachineIRBuilder

This makes FP legalization code more convenient.

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

5 years agoGlobalISel: Fix indentation
Matt Arsenault [Thu, 16 May 2019 04:08:46 +0000 (04:08 +0000)]
GlobalISel: Fix indentation

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

5 years agoGlobalISel: Add G_FCOPYSIGN
Matt Arsenault [Thu, 16 May 2019 04:08:39 +0000 (04:08 +0000)]
GlobalISel: Add G_FCOPYSIGN

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

5 years agoFix missing const
Matt Arsenault [Thu, 16 May 2019 04:08:25 +0000 (04:08 +0000)]
Fix missing const

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

5 years agoFix prof branch_weights in entry_counts_missing_dbginfo.ll test
Yevgeny Rouban [Thu, 16 May 2019 03:39:09 +0000 (03:39 +0000)]
Fix prof branch_weights in entry_counts_missing_dbginfo.ll test

Removed extra parameter from !prof branch_weights metadata of
a call instruction according to the spec.

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

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

5 years agoFix typo in comment of CSAction -> Action.
Eric Christopher [Thu, 16 May 2019 01:07:54 +0000 (01:07 +0000)]
Fix typo in comment of CSAction -> Action.

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

5 years ago[ORC] Modify DenseMap hashing for SymbolStringPtrs.
Lang Hames [Thu, 16 May 2019 00:21:10 +0000 (00:21 +0000)]
[ORC] Modify DenseMap hashing for SymbolStringPtrs.

Modifies the DenseMapInfo<SymbolStringPtr>::getHashValue method to take its
argument by const-ref rather than by value (to avoid unnecessary ref-counting
operations) and to defer to DenseMapInfo<void*> for the hash value computation
(since SymbolStringPtrs are just pointers under the hood).

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

5 years ago[JITLink][MachO] Use getSymbol64TableEntry for 64-bit MachO files.
Lang Hames [Thu, 16 May 2019 00:21:07 +0000 (00:21 +0000)]
[JITLink][MachO] Use getSymbol64TableEntry for 64-bit MachO files.

Fixes a think-o. No test case: The nlist and nlist64 data structures happen to
line up for this field, so there's no way to construct a failing test case.

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

5 years agoFix GN build
Vitaly Buka [Thu, 16 May 2019 00:19:37 +0000 (00:19 +0000)]
Fix GN build

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

5 years ago[X86] Delay creating index register negations during address matching until after...
Craig Topper [Wed, 15 May 2019 21:59:53 +0000 (21:59 +0000)]
[X86] Delay creating index register negations during address matching until after we know for sure the match will succeed

If we're trying to match an LEA, its possible the LEA match will be deemed unprofitable. In which case the negation we created in matchAddress would be left dangling in the SelectionDAG. This could artificially increase use counts for other nodes in the DAG. Though I don't have an example of that. But it just seems like bad form to have dangling nodes in isel.

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

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

5 years ago[codeview] Fix SDNode representation of annotation labels
Reid Kleckner [Wed, 15 May 2019 21:46:05 +0000 (21:46 +0000)]
[codeview] Fix SDNode representation of annotation labels

Before this change, they were erroneously constructed with the EH_LABEL
SDNode opcode, which caused other passes to interact with them in
incorrect ways. See the FIXME about fastisel that this addresses in the
existing test case.

Fixes PR41890

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

5 years ago[mips] Use range-based `for` loops. NFC
Simon Atanasyan [Wed, 15 May 2019 21:26:25 +0000 (21:26 +0000)]
[mips] Use range-based `for` loops. NFC

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

5 years ago[AArch64] only indicate CFI on Windows if we emitted CFI
Mandeep Singh Grang [Wed, 15 May 2019 21:23:41 +0000 (21:23 +0000)]
[AArch64] only indicate CFI on Windows if we emitted CFI

Summary:
Otherwise, we emit directives for CFI without any actual CFI opcodes to
go with them, which causes tools to malfunction.  The technique is
similar to what the x86 backend already does.

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

Patch by: froydnj (Nathan Froyd)

Reviewers: mstorsjo, eli.friedman, rnk, mgrang, ssijaric

Reviewed By: rnk

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

Tags: #llvm

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

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

5 years ago[X86] Strengthen type constraints on some specialized X86 ISD opcodes that don't...
Craig Topper [Wed, 15 May 2019 21:16:28 +0000 (21:16 +0000)]
[X86] Strengthen type constraints on some specialized X86 ISD opcodes that don't have any flexibility. NFC

These particular instructions only operate on 128-bit vectors and have no wider equivalents. And the
element size is always known.

One could argue that MOVSS/MOVSD could be merged, but that's probably disruptive to code in
X86ISelLowering and probably low value.

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

5 years ago[NFC][InstCombine] Add some more tests for pulling binops through shifts
Roman Lebedev [Wed, 15 May 2019 21:15:44 +0000 (21:15 +0000)]
[NFC][InstCombine] Add some more tests for pulling binops through shifts

The ashr variant may see relaxation in https://reviews.llvm.org/D61938

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

5 years ago[codeview] Finish support for reading and writing S_ANNOTATION records
Reid Kleckner [Wed, 15 May 2019 20:53:39 +0000 (20:53 +0000)]
[codeview] Finish support for reading and writing S_ANNOTATION records

Implement dumping via llvm-pdbutil and llvm-readobj.

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

5 years agoRevert llvm-svn: 360807
Cameron McInally [Wed, 15 May 2019 20:48:50 +0000 (20:48 +0000)]
Revert llvm-svn: 360807

Somehow submitted this patch twice.

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

5 years agoPre-commit unary fneg tests to InstSimplify
Cameron McInally [Wed, 15 May 2019 20:27:37 +0000 (20:27 +0000)]
Pre-commit unary fneg tests to InstSimplify

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

5 years agoAdd unary fneg to InstSimplify/fp-nan.ll
Cameron McInally [Wed, 15 May 2019 20:27:35 +0000 (20:27 +0000)]
Add unary fneg to InstSimplify/fp-nan.ll

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

5 years agoUncomment LLVM_FALLTHROUGH.
Pete Couperus [Wed, 15 May 2019 19:46:17 +0000 (19:46 +0000)]
Uncomment LLVM_FALLTHROUGH.

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

5 years agoAdd unary fneg to InstSimplify/fp-nan.ll
Cameron McInally [Wed, 15 May 2019 19:37:03 +0000 (19:37 +0000)]
Add unary fneg to InstSimplify/fp-nan.ll

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

5 years ago[PredicateInfo] Do not process unreachable operands.
Taewook Oh [Wed, 15 May 2019 19:35:38 +0000 (19:35 +0000)]
[PredicateInfo] Do not process unreachable operands.

Summary: We should excluded unreachable operands from processing as their DFS visitation order is undefined. When `renameUses` function sorts `OpsToRename` (https://fburl.com/d2wubn60), the comparator assumes that the parent block of the operand has a corresponding dominator tree node. This is not the case for unreachable operands and crashes the compiler.

Reviewers: dberlin, mgrang, davide

Subscribers: efriedma, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[MachineOperand] Add a ChangeToGA method
Nicolai Haehnle [Wed, 15 May 2019 17:48:10 +0000 (17:48 +0000)]
[MachineOperand] Add a ChangeToGA method

Summary:
Analogous to the other ChangeToXXX methods. See the next patch for a
use case.

Change-Id: I6548d614706834fb9109ab3c8fe915e9c6ece2a7

Reviewers: arsenm, kzhuravl

Subscribers: wdng, llvm-commits

Tags: #llvm

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

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

5 years agoRegAlloc: try to fail more gracefully when out of registers
Nicolai Haehnle [Wed, 15 May 2019 17:29:58 +0000 (17:29 +0000)]
RegAlloc: try to fail more gracefully when out of registers

Summary:
The emitError path allows the program to continue, unlike report_fatal_error.
This is friendlier to use cases where LLVM is embedded in a larger program,
because the caller may be able to deal with the error somewhat gracefully.

Change the number of requested NOP bytes in the AArch64 and PowerPC
test cases to avoid triggering an unrelated assertion. The compilation
still fails, as verified by the test.

Change-Id: Iafb9ca341002a597b82e59ddc7a1f13c78758e3d

Reviewers: arsenm, MatzeB

Subscribers: qcolombet, nemanjai, wdng, javed.absar, kristof.beyls, kbarton, jsji, llvm-commits

Tags: #llvm

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

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

5 years ago[FileCheck] Fix sphinx error: Make input be gas block
Thomas Preud'homme [Wed, 15 May 2019 15:20:45 +0000 (15:20 +0000)]
[FileCheck] Fix sphinx error: Make input be gas block

Summary:
Change example of input text from being llvm block to being gas block
since that text is made-up assembly.

Reviewers: jhenderson, jdenny, probinson, arichardson

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[JumpThreading] A bug fix for stale loop info after unfold select
Hiroshi Yamauchi [Wed, 15 May 2019 15:15:16 +0000 (15:15 +0000)]
[JumpThreading] A bug fix for stale loop info after unfold select

Summary:
The return value of a TryToUnfoldSelect call was not checked, which led to an
incorrectly preserved loop info and some crash.

The original crash was reported on https://reviews.llvm.org/D59514.

Reviewers: davidxl, amehsan

Reviewed By: davidxl

Subscribers: fhahn, brzycki, llvm-commits

Tags: #llvm

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

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

5 years ago[AMDGPU] Increases available SGPR for Calling Convention
Ryan Taylor [Wed, 15 May 2019 14:43:55 +0000 (14:43 +0000)]
[AMDGPU] Increases available SGPR for Calling Convention

Summary:
SGPR in CC can be either hw initialized or set by other chained shaders
and so this increases the SGPR count availalbe to CC to 105.

Change-Id: I3dfadc750fe4a3e2bd07117a2899fd13f3e2fef3

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

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

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

5 years agoTeach InstSimplify -X + X --> 0.0 about unary FNeg
Cameron McInally [Wed, 15 May 2019 14:31:33 +0000 (14:31 +0000)]
Teach InstSimplify -X + X --> 0.0 about unary FNeg

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

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

5 years agoRevert r360771 "[MergeICmps] Simplify the code."
Clement Courbet [Wed, 15 May 2019 14:21:59 +0000 (14:21 +0000)]
Revert r360771 "[MergeICmps] Simplify the code."

Breaks a bunch of builbdots.

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

5 years ago[MergeICmps] Fix r360771.
Clement Courbet [Wed, 15 May 2019 14:00:45 +0000 (14:00 +0000)]
[MergeICmps] Fix r360771.

Twine references a StringRef by reference, not value...

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

5 years agoRevert "[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert...
Stephen Tozer [Wed, 15 May 2019 13:41:44 +0000 (13:41 +0000)]
Revert "[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed"

This reverts r360772 due to build issues.
Reverted commit: 17dd4d7403770bd683675e45f5517e0cdb8f9b2b.

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

5 years ago[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where...
Stephen Tozer [Wed, 15 May 2019 13:15:48 +0000 (13:15 +0000)]
[Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed

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

Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop
casts impossible. With the recent addition of DW_OP_LLVM_convert this
salvaging is now possible, and so can be used to fix the attached bug as
well as any cases where SExt instruction results are lost in the
debugging metadata. This patch introduces this fix by expanding the
salvage debug info method to cover these cases using the new operator.

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

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

5 years ago[MergeICmps] Simplify the code.
Clement Courbet [Wed, 15 May 2019 13:04:24 +0000 (13:04 +0000)]
[MergeICmps] Simplify the code.

Instead of patching the original blocks, we now generate new blocks and
delete the old blocks. This results in simpler code with a less twisted
control flow (see the change in `entry-block-shuffled.ll`).

This will make https://reviews.llvm.org/D60318 simpler by making it more
obvious where control flow created and deleted.

Reviewers: gchatelet

Subscribers: hiraditya, llvm-commits, spatel

Tags: #llvm

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

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

5 years agoRevert rL360675 : [APFloat] APFloat::Storage::Storage - fix use after move
Simon Pilgrim [Wed, 15 May 2019 13:03:10 +0000 (13:03 +0000)]
Revert rL360675 : [APFloat] APFloat::Storage::Storage - fix use after move

This was mentioned both in https://www.viva64.com/en/b/0629/ and by scan-build checks
........
There's concerns this may just introduce a use-after-free instead.....

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

5 years ago[ARM] Don't use the Machine Scheduler for cortex-m at minsize
David Green [Wed, 15 May 2019 12:58:02 +0000 (12:58 +0000)]
[ARM] Don't use the Machine Scheduler for cortex-m at minsize

The new cortex-m schedule in rL360768 helps performance, but can increase the
amount of high-registers used. This, on average, ends up increasing the
codesize by a fair amount (because less instructions are converted from T2 to
T1). On cortex-m at -Oz, where we are quite size-paranoid, it is better to use
the existing DAG scheduler with the RegPressure scheduling preference (at least
until the issues around T2 vs T1 instructions can be improved).

I have also made sure that the Sched::RegPressure dag scheduler is always
chosen for MinSize.

The test shows one case where we increase the number of registers used.

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

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

5 years ago[ARM] Cortex-M4 schedule
David Green [Wed, 15 May 2019 12:41:58 +0000 (12:41 +0000)]
[ARM] Cortex-M4 schedule

This patch adds a simple Cortex-M4 schedule, renaming the existing M3
schedule to M4 and filling in the latencies as-per the Cortex-M4 TRM:
https://developer.arm.com/docs/ddi0439/latest

Most of these are 1, with the important exception being loads taking 2
cycles. A few others are also higher, but I don't believe they make a
large difference. I've repurposed the M3 schedule as the latencies are
mostly the same between the two cores, with the M4 having more FP and
DSP instructions. We also turn on MISched and UseAA for the cores that
now use this.

It also adds some schedule Write's to various instruction to make things
simpler.

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

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

5 years agogn build: Merge r360671
Nico Weber [Wed, 15 May 2019 12:08:45 +0000 (12:08 +0000)]
gn build: Merge r360671

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

5 years ago[mips] LLVM and GAS now use same instructions for CFA Definition. NFCI
Simon Atanasyan [Wed, 15 May 2019 12:05:27 +0000 (12:05 +0000)]
[mips] LLVM and GAS now use same instructions for CFA Definition. NFCI

LLVM previously used `DW_CFA_def_cfa` instruction in .eh_frame to set
the register and offset for current CFA rule. We change it to
`DW_CFA_def_cfa_register` which is the same one used by GAS that only
changes the register but keeping the old offset.

Patch by Mirko Brkusanin.

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

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

5 years agogn build: Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`
Nico Weber [Wed, 15 May 2019 12:03:10 +0000 (12:03 +0000)]
gn build: Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`

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

5 years agoarm64_32: add some unittests that were in the wrong commit.
Tim Northover [Wed, 15 May 2019 12:01:04 +0000 (12:01 +0000)]
arm64_32: add some unittests that were in the wrong commit.

Accidentally dropped them when committing the arm64_32 binutils support.
There's no change to real code.

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

5 years ago[NFC][InstCombine] Regenerate trunc.ll test
Roman Lebedev [Wed, 15 May 2019 10:24:38 +0000 (10:24 +0000)]
[NFC][InstCombine] Regenerate trunc.ll test

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

5 years ago[LV] Move getScalarizationOverhead and vector call cost computations to CM. (NFC)
Florian Hahn [Wed, 15 May 2019 10:05:49 +0000 (10:05 +0000)]
[LV] Move getScalarizationOverhead and vector call cost computations to CM. (NFC)

This reduces the number of parameters we need to pass in and they seem a
natural fit in LoopVectorizationCostModel. Also simplifies things for
D59995.

As a follow up refactoring, we could only expose a expose a
shouldUseVectorIntrinsic() helper in LoopVectorizationCostModel, instead
of calling getVectorCallCost/getVectorIntrinsicCost in
InnerLoopVectorizer/VPRecipeBuilder.

Reviewers: Ayal, hsaito, dcaballe, rengolin

Reviewed By: rengolin

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

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

5 years ago[[DAGCombiner][NFC] Add a comment.
Clement Courbet [Wed, 15 May 2019 08:21:18 +0000 (08:21 +0000)]
[[DAGCombiner][NFC] Add a comment.

As suggested in D61846.

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

5 years ago[X86] Use OR32mi8Locked instead of LOCK_OR32mi8 in emitLockedStackOp.
Craig Topper [Wed, 15 May 2019 04:15:46 +0000 (04:15 +0000)]
[X86] Use OR32mi8Locked instead of LOCK_OR32mi8 in emitLockedStackOp.

They encode the same way, but OR32mi8Locked sets hasUnmodeledSideEffects set
which should be stronger than the mayLoad/mayStore on LOCK_OR32mi8. I think
this makes sense since we are using it as a fence.

This also seems to hide the operation from the speculative load hardening pass
so I've reverted r360511.

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

5 years agoFix 2-field llvm.global_ctors `REQUIRES: asserts` tests after rL360742
Fangrui Song [Wed, 15 May 2019 03:08:21 +0000 (03:08 +0000)]
Fix 2-field llvm.global_ctors `REQUIRES: asserts` tests after rL360742

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

5 years ago[IR] Disallow llvm.global_ctors and llvm.global_dtors of the 2-field form in textual...
Fangrui Song [Wed, 15 May 2019 02:35:32 +0000 (02:35 +0000)]
[IR] Disallow llvm.global_ctors and llvm.global_dtors of the 2-field form in textual format

The 3-field form was introduced by D3499 in 2014 and the legacy 2-field
form was planned to be removed in LLVM 4.0

For the textual format, this patch migrates the existing 2-field form to
use the 3-field form and deletes the compatibility code.
test/Verifier/global-ctors-2.ll checks we have a friendly error message.

For bitcode, lib/IR/AutoUpgrade UpgradeGlobalVariables will upgrade the
2-field form (add i8* null as the third field).

Reviewed By: rnk, dexonsmith

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

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

5 years ago[NFC] Reuse a helper function to eliminate duplicate code
Philip Reames [Wed, 15 May 2019 01:39:07 +0000 (01:39 +0000)]
[NFC] Reuse a helper function to eliminate duplicate code

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

5 years ago[XCore] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 01:28:30 +0000 (01:28 +0000)]
[XCore] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[X86] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 01:17:58 +0000 (01:17 +0000)]
[X86] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[WebAssembly] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 01:03:00 +0000 (01:03 +0000)]
[WebAssembly] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[SystemZ] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 00:46:18 +0000 (00:46 +0000)]
[SystemZ] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[Sparc] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 00:35:37 +0000 (00:35 +0000)]
[Sparc] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[RISCV] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 00:24:15 +0000 (00:24 +0000)]
[RISCV] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[PowerPC] Create a TargetInfo header. NFC
Richard Trieu [Wed, 15 May 2019 00:09:58 +0000 (00:09 +0000)]
[PowerPC] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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

5 years ago[NVPTX] Create a TargetInfo header. NFC
Richard Trieu [Tue, 14 May 2019 23:56:18 +0000 (23:56 +0000)]
[NVPTX] Create a TargetInfo header.  NFC

Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header.
This fixes a layering problem.

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