1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Commit Graph

174468 Commits

Author SHA1 Message Date
Arnaud A. de Grandmaison
d40b976caf Remove no longer needed Arm specific LICENSE.TXT file.
As the codebase is now under the Apache 2.0 license with LLVM
Exceptions, and all Arm's contributions, past or future, are under that
new license, this Arm specific LICENSE.TXT is no longer needed, thus
removing it.

llvm-svn: 352376
2019-01-28 15:38:01 +00:00
Michal Gorny
af50a668bf [cmake] Fix get_llvm_lit_path() to respect LLVM_EXTERNAL_LIT always
Refactor the get_llvm_lit_path() logic to respect LLVM_EXTERNAL_LIT,
and require the fallback to be defined explicitly
as LLVM_DEFAULT_EXTERNAL_LIT. This fixes building libcxx standalone
after r346888.

The old logic was using LLVM_EXTERNAL_LIT both as user-defined cache
variable and an optional pre-definition of default value from caller
(e.g. libcxx). It included a hack to make this work by assigning
the value back and forth but it was fragile and stopped working
in libcxx.

The new logic is simpler and more transparent. Default value is
provided in a separate variable, and used only when user-specified
variable is empty (i.e. not overriden).

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

llvm-svn: 352374
2019-01-28 15:16:03 +00:00
George Rimar
f59166341c [obj2yaml] - Dump the sh_entsize section field.
I faced with the fact that obj2yaml does not dump the sh_entsize field.
A problem arose when I tried to dump ELF versioning sections.

This is close to what D50235 did, but D50235 did the change for yaml2obj, and now
I had to do the same for obj2yaml.

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

llvm-svn: 352373
2019-01-28 15:05:10 +00:00
Jordan Rupprecht
801060bf79 [llvm-objcopy] Fix crash when writing empty binary output
Summary: When using llvm-objcopy -O binary and the resulting file will be empty (e.g. removing the only section that would be written, or using --only-keep with a section that doesn't exist/isn't SHF_ALLOC), we crash because FileOutputBuffer expects Size > 0. Add a regression test, and change Buffer to open/truncate the output file in this case.

Reviewers: alexshap, jhenderson, jakehehrlich, espindola

Reviewed By: alexshap, jhenderson

Subscribers: jfb, llvm-commits, emaste, arichardson

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

llvm-svn: 352371
2019-01-28 15:02:40 +00:00
Aleksandar Beserminji
2bbbcf425f [mips] Support for +abs2008 attribute
Instruction abs.[ds] is not generating correct result when working
with NaNs for revisions prior mips32r6 and mips64r6.

To generate a sequence which always produce a correct result, but also
to allow user more control on how his code is compiled, attribute
+abs2008 is added, so user can choose legacy or 2008.

By default legacy mode is used on revisions prior R6. Mips32r6 and
mips64r6 use abs2008 mode by default.

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

llvm-svn: 352370
2019-01-28 14:59:30 +00:00
George Rimar
a09a70b235 [llvm-objdump] - Print LMAs when dumping section headers.
When --section-headers is used, GNU objdump prints both LMA and VMA for sections.
llvm-objdump does not do that what makes it's output be slightly inconsistent.

Patch teaches llvm-objdump to print LMA/VMA for ELF file formats.
The behavior for other formats remains unchanged.

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

llvm-svn: 352366
2019-01-28 14:11:35 +00:00
Tim Corringham
e49f9fd308 [AMDGPU] Add intrinsics for 16 bit interpolation
Summary:
Added the intrinsics llvm.amdgcn.interp.p1.f16() and
llvm.amdgcn.interp.p2.f16() and related LIT test.

The p1 intrinsic generates code appropriate for both 16 and 32
bank LDS.

Reviewers: #amdgpu, dstuttard, arsenm, tpr

Reviewed By: #amdgpu, arsenm

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

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

llvm-svn: 352357
2019-01-28 13:48:59 +00:00
James Y Knight
288214597d [opaque pointer types] Remove GraphTraits specialization for Type.
The only caller has been deleted in r352076, and I'd like to minimize
the amount of code walking Type hierarchies generically, to make it
easier to identify code depending on pointee types.

llvm-svn: 352353
2019-01-28 13:25:57 +00:00
Petar Avramovic
f2aa5201c3 [MIPS GlobalISel] Select sub
Lower G_USUBO and G_USUBE. Add narrowScalar for G_SUB.
Legalize and select G_SUB for MIPS 32.

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

llvm-svn: 352351
2019-01-28 12:10:17 +00:00
Jeremy Morse
a34c28f735 [DebugInfo][DAG] Avoid re-ordering of DBG_VALUEs
This patch improves the placement of DBG_VALUEs when by SelectionDAG, which
as documented in PR40427 can go very wrong. At the core of this is
ProcessSourceNode, which assumes the last instruction in a BB is the start
of the last processed IR instruction, which isn't always true.

Instead, use a helper function to call InstrEmitter::EmitNode, that records
before-and-after iterators and determines the first of any new instruction
created during emission. This is passed to ProcessSourceNode, which can
then make more elightened decisions about ordering for DBG_VALUE placement.

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

llvm-svn: 352350
2019-01-28 12:08:31 +00:00
George Rimar
7493a6e926 [llvm-objdump] - Fix comment. NFC.
This was mentioned by James Henderson
in review for https://reviews.llvm.org/D57051.

llvm-svn: 352348
2019-01-28 10:48:54 +00:00
George Rimar
305a977c94 [llvm-objdump] - Implement the --adjust-vma option.
GNU objdump's help says: "--adjust-vma: Add OFFSET to all displayed section addresses"
In real life what it does is a bit more complicated
(and IMO not always reasonable. For example, GNU objdump prints not only VMA, but also LMA
for sections. And with --adjust-vma it adjusts LMA, but only when a section has relocations.
llvm-objsump does not seem to support printing LMAs yet, but GNU's logic anyways does not
make sense for me here).

This patch tries to adjust VMA. I tried to implement a reasonable approach.
I am not adjusting sections that are not allocatable. As, for example, adjusting debug sections
VA's and rel[a] sections VA's should not make sense. This behavior seems to be GNU compatible.

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

llvm-svn: 352347
2019-01-28 10:44:01 +00:00
Diana Picus
b774c8714b [ARM GlobalISel] Support integer division for Thumb2
Support G_SDIV, G_UDIV, G_SREM and G_UREM.

The only significant difference between arm and thumb mode is that we
need to check a different subtarget feature.

llvm-svn: 352346
2019-01-28 10:37:30 +00:00
Craig Topper
ddc3eff12a [X86] Add new variadic avx512 compress/expand intrinsics that use vXi1 types for the mask argument.
Remove and autoupgrade the old intrinsics

llvm-svn: 352343
2019-01-28 07:03:03 +00:00
Craig Topper
d56f082196 [X86] Add vbmi2 compressstore and expandload tests that aren't fast-isel tests.
These got removed when we autoupgraded to target independent intrinsics, but we didn't have coverage anywhere else. The avx512f/avx512vl versions do have coverage.

Also move some tests back from the upgrade file that aren't really upgraded.

llvm-svn: 352342
2019-01-28 05:42:39 +00:00
Petr Hosek
c41fc9e5f7 [CMake] Use __libc_start_main rather than fopen when checking for C library
The check_library_exists CMake uses a custom symbol definition. This
is a problem when checking for C library symbols because Clang
recognizes many of them as builtins, and returns the
-Wbuiltin-requires-header (or -Wincompatible-library-redeclaration)
error. When building with -Werror which is the default, this causes
the check_library_exists check fail making the build think that C
library isn't available.

To avoid this issue, we should use a symbol that isn't recognized by
Clang and wouldn't cause the same issue. __libc_start_main seems like
reasonable choice that fits the bill.

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

llvm-svn: 352341
2019-01-28 04:12:54 +00:00
Amara Emerson
c61a90aead [AArch64][GlobalISel] Teach RBS about G_FNEG default mapping.
llvm-svn: 352340
2019-01-28 03:21:14 +00:00
Amara Emerson
5ebce2e19a [AArch64][GlobalISel] Add some missing vector support for FP arithmetic ops.
Moved the fneg lowering legalization test from AArch64 to X86, as we want to
specify that it's already legal.

llvm-svn: 352338
2019-01-28 02:28:22 +00:00
Amara Emerson
ba9fd8068d [AArch64][GlobalISel] Add some vector support for fp <-> int conversions.
Some unrelated, but benign, test changes as well due to the test update script.

llvm-svn: 352337
2019-01-28 02:27:59 +00:00
Matt Arsenault
b5f68065fb GlobalISel: Don't reduce elements for atomic load/store
This is invalid for the same reason as in the narrowScalar handling
for load.

llvm-svn: 352334
2019-01-27 22:36:24 +00:00
Sanjay Patel
1354ae7126 [x86] add restriction for lowering to vpermps
This transform was added with rL351346, and we had
an escape for shufps, but we also want one for
unpckps vs. vpermps because vpermps doesn't take
an immediate shuffle index operand.

llvm-svn: 352333
2019-01-27 21:53:33 +00:00
Matt Arsenault
8179d28529 GlobalISel: Factor fewerElementVectors into separate functions
llvm-svn: 352332
2019-01-27 21:53:09 +00:00
Sanjay Patel
089d63e6a8 [x86] add tests for extract/extract/unpack; NFC
llvm-svn: 352331
2019-01-27 21:34:51 +00:00
Simon Pilgrim
7d37da70a3 [X86][SSE] Add UNDEF handling to combineSelect ISD::USUBSAT matching (PR40083)
llvm-svn: 352330
2019-01-27 21:01:23 +00:00
Simon Pilgrim
9e14b05715 [X86][SSE] Add UNDEF test case for combineSelect ISD::USUBSAT matching (PR40083)
llvm-svn: 352329
2019-01-27 20:52:34 +00:00
Simon Pilgrim
a756150c73 [X86][SSE] Permit UNDEFs in combineAddToSUBUS matching (PR40083)
llvm-svn: 352328
2019-01-27 20:36:37 +00:00
Sanjay Patel
a8c57ef82a [x86] add more tests for lowerShuffleWithUndefHalf; NFC
Some other transform is creating the opposite form and causing 
an infinite loop if we try to split some of these.

llvm-svn: 352327
2019-01-27 20:17:02 +00:00
Simon Pilgrim
99c913c2c6 [X86][SSE] Add PSUBUS undef element test case (PR40083)
llvm-svn: 352326
2019-01-27 20:09:30 +00:00
Martin Storsjo
89e64a0ead [COFF] Add new relocation types.
Differential Revision: https://reviews.llvm.org/D57291

llvm-svn: 352324
2019-01-27 19:53:36 +00:00
Alexandre Ganea
a14613de97 Fix some warnings on MSVC
Differential Revision: https://reviews.llvm.org/D56329

llvm-svn: 352322
2019-01-27 18:41:40 +00:00
Simon Pilgrim
7f2d8b8b2f [X86] Add test cases for PR36721 (unnecessary andl for %cl when shifting)
llvm-svn: 352321
2019-01-27 18:31:33 +00:00
Sanjay Patel
c0f3912d9d [x86] refactor logic in lowerShuffleWithUndefHalf
Although this is longer code, this is no-functional-change-intended.
The goal is to untangle the conditions under which we bail out, so 
that's easier to adjust.

llvm-svn: 352320
2019-01-27 18:12:03 +00:00
Matt Arsenault
48adfa706e GlobalISel: Verify load/store has a pointer input
I expected this to be automatically verified, but it seems
nothing uses that the type index was declared as a "ptype"

llvm-svn: 352319
2019-01-27 15:57:23 +00:00
Roman Lebedev
1aca5f694d [X86][NFC] Replace "<%s" with "< %s" in run-lines.
While i have no intention of actually commiting regeneration
of the check lines in these test files with update_llc_test_checks,
lack of that whitespace breaks that util, which is mildly inconvenient.

llvm-svn: 352318
2019-01-27 15:36:35 +00:00
Roman Lebedev
0f33196fbc [NFC][MCA][X86][BdVer2] Cherry-pick int-to-ivec forwarding tests from BtVer2
llvm-svn: 352317
2019-01-27 14:35:54 +00:00
Simon Pilgrim
31322d5851 [X86] Add CGP tests for PR40486
llvm-svn: 352316
2019-01-27 14:04:45 +00:00
Simon Pilgrim
0187480789 [TTI] Add generic SADDSAT/SSUBSAT costs
Add generic costs calculation for SADDSAT/SSUBSAT intrinsics, this uses generic costs for sadd_with_overflow/ssub_with_overflow, an extra sign comparison + a selects based on the sign/overflow.

This completes PR40316

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

llvm-svn: 352315
2019-01-27 13:51:59 +00:00
Simon Pilgrim
4dd72c5280 [X86] Regenerate reverse branch test to explicitly show branching and condition codes.
llvm-svn: 352314
2019-01-27 12:39:38 +00:00
Simon Pilgrim
81f0064da2 [X86] Regenerate test to explicitly show branching and condition codes.
llvm-svn: 352313
2019-01-27 12:38:09 +00:00
Amara Emerson
46c59b2794 Re-apply "r351584: "GlobalISel: Verify g_zextload and g_sextload""
I reverted it originally due to a bot failing. The underlying bug has been fixed
as of r352311.

llvm-svn: 352312
2019-01-27 11:34:41 +00:00
Amara Emerson
f9d3a36d73 [AArch64][GlobalISel] Fix the G_EXTLOAD combiner creating non-extending illegal instructions.
This fixes loads like 's1 = load %p (load 1 from %p)' being combined with an
extend into an illegal 's8 = g_extload %p (load 1 from %p)' which doesn't do any
extension, by avoiding touching those < s8 size loads.

This bug was uncovered by a verifier update r351584, which I reverted it to keep
the bots green.

llvm-svn: 352311
2019-01-27 10:56:20 +00:00
Thomas Preud'homme
ebb7585889 Revert "Add support for prefix-only CLI options"
This reverts commit r351038.

llvm-svn: 352310
2019-01-27 09:02:46 +00:00
Thomas Preud'homme
308eaab173 Revert "Detect incorrect FileCheck variable CLI definition"
This reverts commit r351039.

llvm-svn: 352309
2019-01-27 09:02:19 +00:00
Thomas Preud'homme
35e95366ef Revert "Fix defines.txt"
This reverts commit r351042.

llvm-svn: 352308
2019-01-27 09:02:05 +00:00
Gabor Buella
6f4314fa38 [X86] Add some missing blsr patterns
The add+and sequence followed by a branch can
happen e.g. when looping over the set bits of an integer:

```
while (x != 0) {
   func(x & ~x);
   x &= x - 1;
}
```

Reviewed By: ctopper

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

llvm-svn: 352306
2019-01-27 06:15:39 +00:00
Gabor Buella
72dfe06ad1 [NFC][X86] Add a few more blsr test cases
llvm-svn: 352305
2019-01-27 06:05:40 +00:00
Craig Topper
d6f6e529e5 [X86] Add a pattern for (i64 (and (anyext def32:), 0x00000000FFFFFFFF)) to produce SUBREG_TO_REG
def32 here means the producing instruction zeroed bits 63:32. We already do this for zext, but it looks like we can get an and+anyext sometimes.

Spotted in the diffs from D33587.

llvm-svn: 352303
2019-01-27 03:37:05 +00:00
Matt Arsenault
a75dff824f GlobalISel: Fix typo in assert messages
llvm-svn: 352301
2019-01-27 00:53:54 +00:00
Matt Arsenault
f3e1caba88 GlobalISel: Implement narrowScalar for mul
llvm-svn: 352300
2019-01-27 00:52:51 +00:00
Matt Arsenault
c3c8febf0f GlobalISel: fewerElementsVector for intrinsic_trunc/intrinsic_round
llvm-svn: 352298
2019-01-27 00:12:21 +00:00