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

197960 Commits

Author SHA1 Message Date
Matt Arsenault
f452018857 AMDGPU: Fix missing immarg on buffer.atomic.fadd intrinsic 2020-06-05 14:34:07 -04:00
Craig Topper
6ce905f28f [X86] Teach combineVectorShiftImm to constant fold undef elements to 0 not undef.
Shifts are supposed to always shift in zeros or sign bits regardless of their inputs. It's possible the input value may have been replaced with undef by SimplifyDemandedBits, but the shift in zeros are still demanded.

This issue was reported to me by ispc from 10.0. Unfortunately their failing test does not fail on trunk. Seems to be because the shl is optimized out earlier now and doesn't become VSHLI.

ispc bug https://github.com/ispc/ispc/issues/1771

Differential Revision: https://reviews.llvm.org/D81212
2020-06-05 11:29:55 -07:00
Marco Elver
4ecfccbd70 [KernelAddressSanitizer] Make globals constructors compatible with kernel
Summary:
This makes -fsanitize=kernel-address emit the correct globals
constructors for the kernel. We had to do the following:

- Disable generation of constructors that rely on linker features such
  as dead-global elimination.

- Only emit constructors for globals *not* in explicit sections. The
  kernel uses sections for special globals, which we should not touch.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203493

Tested:
1. With 'clang/test/CodeGen/asan-globals.cpp'.
2. With test_kasan.ko, we can see:

  	BUG: KASAN: global-out-of-bounds in kasan_global_oob+0xb3/0xba [test_kasan]

Reviewers: glider, andreyknvl

Reviewed By: glider

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

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D80805
2020-06-05 20:20:46 +02:00
Nikita Popov
c5a21124e0 [LiveDebugValues] Fix output stream (NFC)
This should dump to the provided Out, rather than dbgs(), though
they coincide in current usage.
2020-06-05 20:02:22 +02:00
Nikita Popov
b4ce0d5c90 [LiveDebugValues] Remove PendingInLocs (NFC)
PendingInLocs ends up having the same value as InLocs, just computed
a bit more indirectly. It is a leftover of a previous implementation
approach.

This patch drops PendingInLocs, as well as the Diff and Removed
calulations, which are no longer needed.

Differential Revision: https://reviews.llvm.org/D80868
2020-06-05 20:01:29 +02:00
Matt Arsenault
7151a002c6 AMDGPU/GlobalISel: Fix some broken YAML in MIR test
Different tools seem to be more or less strict with the markers
between different functions.
2020-06-05 13:59:46 -04:00
Matt Arsenault
054f1ce6da GlobalISel: Infer nofpexcept flag during selection for non-strict ops
Match SelectionDAG's behavior of adding nofpexcept to out instructions
that may raise fp exceptions that are selected from instructions that
do not.
2020-06-05 13:59:46 -04:00
Sameer Arora
17ff76fd0f [llvm-objcopy] Reorder --dump-section for MachO
Reorder `DumpSection` under `handleArgs` in file `MachOObjcopy.cpp`. The
operation to dump a section is now performed before both add and remove
section operations for MachO file format.

Change for the ELF format at D81097. Together fixes
https://bugs.llvm.org/show_bug.cgi?id=44283

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D81123
2020-06-05 10:49:22 -07:00
Sameer Arora
8c5b6feb6f [llvm-objcopy] Reorder --dump-section before --remove-section for ELF
Reorder `DumpSection` under `handleArgs` in file `ELFObjcopy.cpp`.
`DumpSection` is placed before `replaceAndRemoveSections` and is
therefore now the first operation under `handleArgs`. Thus, it is now
performed before both `add` and `remove` section operations.

Change for the MachO format at D81123. Together fixes https://bugs.llvm.org/show_bug.cgi?id=44283.

Reviewed By: alexshap, jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D81097
2020-06-05 10:45:51 -07:00
David Green
499648daa2 [ARM] VQMOVN demand bits analysis
Similar to VMOVN, a VQMOVN will only demand the top/bottom lanes of it's
first input. However unlike VMOVN it will need access to the entire
second argument, as that value is saturated not just moved in place.

Differential Revision: https://reviews.llvm.org/D80515
2020-06-05 18:41:02 +01:00
Sameer Arora
aadb0afb4a [llvm-ar] Update error messages and tests as per latest preferred style
It updates two error messages under `performOperation` in the file
llvm-ar.cpp. Furthermore, it also updates tests that print out these
error messages: `llvm/test/Object/ar-create.test` and
`llvm/test/tools/llvm-ar/print.test`.

Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D80846
2020-06-05 10:37:26 -07:00
Sameer Arora
c8c3d7d667 [llvm-ar] Add more tests for errors in opening archives
Add 2 more tests for the function performOperation under llvm-ar.cpp. It
tests the scenario when the archive could not be opened for reasons
other than `no_such_file_or_directory` In particular, it tests for the
cases `permission_denied` and `is_a_directory` for the target archive.

Reviewed By: alexshap, jhenderson, smeenai, MaskRay

Differential Revision: https://reviews.llvm.org/D80838
2020-06-05 10:36:58 -07:00
LLVM GN Syncbot
452b7f14a9 [gn build] Port 11d06b9511b 2020-06-05 17:22:19 +00:00
Sander de Smalen
31807863bb Reland D80640: [CodeGen][SVE] Calculate correct type legalization for scalable vectors.
This reverts commit 9bcef270d7a319c6c0fdffc6c80984a8f0a30ecb.
2020-06-05 18:09:31 +01:00
Louis Dionne
4a89be8e01 [CMake] Do not append -lm to CMAKE_REQUIRED_LIBRARIES on Apple
On Apple platforms, linking against libSystem.dylib is sufficient, and
some Apple platforms don't provide libm.dylib. On those platforms, adding
-lm to CMAKE_REQUIRED_LIBRARIES causes all subsequent compile-flag checks
to fail due to the missing library.

Differential Revision: https://reviews.llvm.org/D81265
2020-06-05 12:45:30 -04:00
Simon Pilgrim
d0fce43dbc ScalarEvolutionNormalization.h - reduce ScalarEvolutionExpressions.h include to forward declaration. NFC. 2020-06-05 17:40:33 +01:00
Simon Pilgrim
08333317ef TypeMetadataUtils.h - reduce Instructions.h include to forward declaration. NFC.
Move implicit include dependencies down to source file.
2020-06-05 17:40:33 +01:00
Sanjay Patel
1483c5f9fd [x86] form reduction intrinsics from vectorizers instead of raw IR
Motivating examples are seen in the PhaseOrdering tests based on:
https://bugs.llvm.org/show_bug.cgi?id=43953#c2 - if we have
intrinsics there, some pass can fold them.

The intrinsics are still named "experimental" at this point, but
if there is no fallout from this patch, that will be a good
indicator that it is safe to finalize them.

Differential Revision: https://reviews.llvm.org/D80867
2020-06-05 12:38:49 -04:00
Sanjay Patel
b5650bb639 [PhaseOrdering] add tests for reductions; NFC (PR43953) 2020-06-05 12:38:49 -04:00
Nico Weber
0aaa8cb1ce [gn build] (manually) port a6fcf5ca033 2020-06-05 12:32:23 -04:00
Arthur Eubanks
85c06e87b3 Add ASan metadata globals to @llvm.compiler.used under COFF
Summary:
This matches ELF.

This makes the number of ASan failures under the new pass manager on
Windows go from 18 to 1.

Under the old pass manager, the ASan module pass was one of the very
last things run, so these globals didn't get removed due to GlobalOpt.
But with the NPM the ASan module pass that adds these globals are run
much earlier in the pipeline and GlobalOpt ends up removing them.

Reviewers: vitalybuka, hans

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81175
2020-06-05 09:04:52 -07:00
Simon Pilgrim
52416b557e [X86][SSE] Simplify MOVMSK patterns based on comparison
An initial patch adding combineSetCCMOVMSK to simplify MOVMSK and its vector input based on the comparison of the MOVMSK result.

This first stage just adds support for some simple MOVMSK(PACKSSBW()) cases where we remove the PACKSS if we're comparing ne/eq zero (any_of patterns), allowing us to directly compare against the v8i16 source vector(s) bitcasted to v16i8, with suitable masking to take into account of which signbits are valid.

Future combines could peek through further PACKSS, target shuffles, handle all_of patterns (ne/eq -1), optimize to a PTEST op, etc.

Differential Revision: https://reviews.llvm.org/D81171
2020-06-05 16:53:22 +01:00
Xun Li
e09a3db448 Fix the roundtrip test under llvm-profdata
Summary:
According to the comments, we want to convert the profile into two binary formats, and then into the md5text format.
We seems to have ignored the intermediate files.
This patch uses them to complete the full roundtrips.

Reviewers: wmi, wenlei

Reviewed By: wmi

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81202
2020-06-05 08:52:21 -07:00
Jonas Devlieghere
b33381e799 [dsymutil] Don't emit N_AST symbol entries in the Mach-O companion file
Treat N_AST symbol table entries like other debug entries and don't emit
them in the linked binary.

Differential revision: https://reviews.llvm.org/D81205
2020-06-05 08:42:18 -07:00
Julian Lettner
e56242dfcc [lit] Improve naming of test result categories
Improve consistency when printing test results:
Previously we were using different labels for group names (the header
for the list of, e.g., failing tests) and summary count lines.  For
example, "Failing Tests"/"Unexpected Failures".  This commit changes lit
to label things consistently.

Improve wording of labels:
When talking about individual test results, the first word in
"Unexpected Failures", "Expected Passes", and "Individual Timeouts" is
superfluous.  Some labels contain the word "Tests" and some don't.
Let's simplify the names.

Before:
```
Failing Tests (1):
  ...

Expected Passes    : 3
Unexpected Failures: 1
```

After:
```
Failed Tests (1):
  ...

Passed: 3
Failed: 1
```

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D77708
2020-06-05 08:14:42 -07:00
Sander de Smalen
9dac7984eb Revert "[CodeGen][SVE] Calculate correct type legalization for scalable vectors."
Seems to break some buildbots, reverting the patch for now.

This reverts commit 164f4b9d26fdf3cd640a09b63b5ec44d033cbe8a.
2020-06-05 16:03:52 +01:00
Kazushi (Jam) Marukawa
e788281441 [VE] Support logical operation instructions in MC layer
Summary:
Add regression tests of asmparser, mccodeemitter, and disassembler for
logical operation instructions. Also change asmparser to support CMOV
instruction. And, add new EQV/MRG/NND isntructions also.

Differential Revision: https://reviews.llvm.org/D81219
2020-06-05 16:59:05 +02:00
Sander de Smalen
b11af615da [CodeGen][SVE] Calculate correct type legalization for scalable vectors.
This patch updates TargetLoweringBase::computeRegisterProperties and
TargetLoweringBase::getTypeConversion to support scalable vectors,
and make the right calls on how to legalise them. These changes are required
to legalise both MVTs and EVTs.

Reviewers: efriedma, david-arm, ctetreau

Reviewed By: efriedma

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80640
2020-06-05 15:20:34 +01:00
serge-sans-paille
b602e0720e [SCCP] Report changes after removing stores to constant global
Differential Revision: https://reviews.llvm.org/D81228
2020-06-05 16:09:07 +02:00
serge-sans-paille
19d63f66a6 Correctly report modified status for DivRemPairs
Differential Revision: https://reviews.llvm.org/D81231
2020-06-05 16:06:31 +02:00
serge-sans-paille
18c0dd16a5 Correctly report modified status for DSE
Differential Revision: https://reviews.llvm.org/D81233
2020-06-05 15:59:42 +02:00
serge-sans-paille
305450304f Correctly report modified status for TailRecursionElimination
Differential Revision: https://reviews.llvm.org/D81232
2020-06-05 15:58:20 +02:00
serge-sans-paille
1fde02964c Correctly report modified status for ObjCARCContract
Differential Revision: https://reviews.llvm.org/D81226
2020-06-05 15:56:57 +02:00
serge-sans-paille
5aad0e32c9 Correctly report modified status for ObjCARCOpt
Differential Revision: https://reviews.llvm.org/D81234
2020-06-05 15:56:57 +02:00
Kadir Cetinkaya
280a4f53ef [llvm][AArch64] Fix unused variable 2020-06-05 15:56:19 +02:00
Max Kazantsev
8452fed075 Return "[InstCombine] Simplify compare of Phi with constant inputs against a constant"
This reverts commit c4b5a66e44f031eb89c9d6ea32b144f1169bdbae.

Returning along with Clang test fix
2020-06-05 20:48:29 +07:00
serge-sans-paille
f11dc34f68 Correctly report modified status for LoopSimplify
Differential Revision: https://reviews.llvm.org/D81235
2020-06-05 15:46:28 +02:00
serge-sans-paille
f014b8a095 Fix return status of AddressSanitizer pass
Differential Revision: https://reviews.llvm.org/D81240
2020-06-05 15:44:51 +02:00
Kazushi (Jam) Marukawa
e9e4753df0 [VE] Support branch instructions in MC layer
Summary:
Add regression tests of asmparser, mccodeemitter, and disassembler for
branch instructions.  In order to support them, we enhance asmparser
by adding splitting mnemonic mechanism, e.g. "bgt.l.t" into "b", "gt",
and ".l.t", and parsing mechanism for AS style memory addressing.
We also implment encoding and decoding mechanism for branch instructions.

Differential Revision: https://reviews.llvm.org/D81215
2020-06-05 15:44:02 +02:00
Simon Pilgrim
cf1255b9a1 SyncDependenceAnalysis.h - remove orphan method declarations. NFCI.
These have been there since the header was added by D51491 but afaict without an implementation, all functionality is actually in DivergenceAnalysis
2020-06-05 14:35:31 +01:00
Simon Pilgrim
4f8fb4d4d7 TargetLibraryInfo.h - reduce Triple.h include to forward declaration. NFC.
Move implicit include dependencies down to source files.
2020-06-05 14:35:30 +01:00
Simon Pilgrim
8155b9f5e2 ScopedNoAliasAA.h - remove unnecessary InstrTypes.h include. NFC. 2020-06-05 14:35:30 +01:00
Guillaume Chatelet
f6fc4bd10b [Alignment][NFC] Migrate CallingConv tablegen code
Summary:
We first migrate the generated code, more patches to come.

This patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81196
2020-06-05 13:33:34 +00:00
madhur13490
1759a48fb7 Fix a typo in AMDGPU docs
Reviewers: t-tye, arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81247
2020-06-05 13:30:17 +00:00
Denis Antrushin
7209d63282 Fix build breakage caused by 66a1b83bf93ec46f6d7a06c47d5981ae154f9ea0 2020-06-05 15:53:09 +03:00
Dineshkumar Bhaskaran
8f2bd3832b [MsgPack] Added a convenience operator
Summary: Added "not equal to" operator for DocNode comparison

Reviewers: arsenm, scott.linder, saiislam

Reviewed By: saiislam

Subscribers: wdng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81250
2020-06-05 12:44:51 +00:00
Denis Antrushin
c8d9beb0e3 [TargetLowering][NFC] More efficient emitPatchpoint().
Current implementation of emitPatchpoint() is very inefficient:
for every FrameIndex operand if creates new MachineInstr with
that operand expanded and all other copied as is.
Since PATCHPOINT/STATEPOINT instructions may have *a lot* of
FrameIndex operands, we end up creating and erasing many
machine instructions. But we can do it in single pass, with only
one new machine instruction generated.

Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D81181
2020-06-05 14:57:29 +03:00
Stefan Pintilie
dcc68e4eb3 [PowerPC] Remove extra nop after notoc call
Calls that are marked as @notoc do not require the extra nop after the call
for the TOC restore.

Differential Revision: https://reviews.llvm.org/D81081
2020-06-05 06:47:44 -05:00
Kerry McLaughlin
5e3af5dc50 [CodeGen][SVE] Legalisation of extends with scalable types
Summary:
This patch adds legalisation of extensions where the operand
of the extend is a legal scalable type but the result is not.

EXTRACT_SUBVECTOR is used to split the result, before
being replaced by target-specific [S|U]UNPK[HI|LO] operations.

For example:

```
zext <vscale x 16 x i8> %a to <vscale x 16 x i16>
```
should emit:

```
uunpklo z2.h, z0.b
uunpkhi z1.h, z0.b
```

Reviewers: sdesmalen, efriedma, david-arm

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, huihuiz, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79587
2020-06-05 12:08:42 +01:00
Kadir Cetinkaya
2a463f17d8 Revert "[InstCombine] Simplify compare of Phi with constant inputs against a constant"
This reverts commit 16b7eb6dd1247dbe322061d33636a054d6c954dc.

Breaks build bots, see
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29888
for an example.
2020-06-05 13:02:35 +02:00