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

190418 Commits

Author SHA1 Message Date
Andrei Elovikov
3c9c875d8d [SLP] Don't allow Div/Rem as alternate opcodes
Summary:
We don't have control/verify what will be the RHS of the division, so it might
happen to be zero, causing UB.

Reviewers: Vasilis, RKSimon, ABataev

Reviewed By: ABataev

Subscribers: vporpo, ABataev, hiraditya, llvm-commits, vdmitrie

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72740
2020-01-21 15:21:17 -08:00
Florian Hahn
6fc985d593 [AArch64] Add custom store lowering for 256 bit non-temporal stores.
Currently we fail to lower non-termporal stores for 256+ bit vectors
to STNPQ, because type legalization will split them up to 128 bit stores
and because there are no single non-temporal stores, creating STPNQ
in the Load/Store optimizer would be quite tricky.

This patch adds custom lowering for 256 bit non-temporal vector stores
to improve the generated code.

Reviewers: dmgreen, samparker, t.p.northover, ab

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D72919
2020-01-21 14:53:40 -08:00
Matt Arsenault
d08e9d6088 AMDGPU/GlobalISel: Merge trivial legalize rules
Also move constant-like rules together
2020-01-21 17:37:19 -05:00
Roman Lebedev
36e821164d [IR] Value::getPointerAlignment(): handle pointer constants
Summary:
New `@test13` in `Attributor/align.ll` is the main motivation - `null` pointer
really does not limit our alignment knowledge, in fact it is fully aligned
since it has no bits set.

Here we don't special-case `null` pointer because it is somewhat controversial
to add one more place where we enforce that `null` pointer is zero,
but instead we do the more general thing of trying to perform constant-fold
of pointer constant to an integer, and perform alignment inferrment on that.

Reviewers: jdoerfert, gchatelet, courbet, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, arphaman, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73131
2020-01-22 01:32:46 +03:00
Florian Hahn
89f43c7de8 [Matrix] Hide and describe matrix-propagate-shape option. 2020-01-21 14:28:47 -08:00
Andrei Elovikov
3b6c65e6a2 [SLP] Add a test showing miscompilation in AltOpcode support
Reviewers: Vasilis, RKSimon, ABataev

Reviewed By: RKSimon, ABataev

Subscribers: ABataev, inglorion, dexonsmith, llvm-commits, vdmitrie

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72739
2020-01-21 14:16:38 -08:00
Matt Arsenault
f57972709b AMDGPU/GlobalISel: Merge G_PTR_ADD/G_PTR_MASK rules 2020-01-21 16:57:01 -05:00
Tim Shen
d64d54da75 [APInt] Fix tests that had wrong assumption about sdivs with negative quotient.
Reviewers: sanjoy

Subscribers: bixia, dexonsmith, sanjoy.google, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70156
2020-01-21 13:53:01 -08:00
Matt Arsenault
8cece4c2f5 AMDGPU/GlobalISel: Legalize G_PTR_ADD for arbitrary pointers
Pointers of unrecognized address spaces shoudl be treated as
global-like pointers. Even if loads and stores of them aren't handled,
dumb operations that just operate on the bits should work.
2020-01-21 16:35:36 -05:00
Fangrui Song
4656f7207f [APFloat][unittest] Fix -Wsign-compare after D69773 2020-01-21 12:24:34 -08:00
Ehud Katz
feb5619091 Fix tests of constant folding of fp operations on NaN values
Fix failures introduced due to change rG0b336b6048ae.
2020-01-21 21:48:07 +02:00
Quentin Colombet
d5de972f5b [GISelKnownBits] Make the max depth a parameter of the analysis
Allow users of that analysis to define the cut off depth of the
analysis instead of hardcoding 6.

NFC as the default parameter is 6.
2020-01-21 11:35:31 -08:00
Thomas Lively
5cb1e2ee5a [WebAssembly] Split and recombine multivalue calls for ISel
Summary:
Multivalue calls both take and return an arbitrary number of
arguments, but ISel only supports one or the other in a single
instruction. To get around this, calls are modeled as two pseudo
instructions during ISel. These pseudo instructions, CALL_PARAMS and
CALL_RESULTS, are recombined into a single CALL MachineInstr in a
custom emit hook.

RegStackification and the MC layer will additionally need to be made
aware of multivalue calls before the tests will produce correct
output.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71496
2020-01-21 11:31:33 -08:00
Krzysztof Parzyszek
1bf82f7e78 [Hexagon] Add REQUIRES: asserts to a testcase using -debug-only 2020-01-21 13:22:01 -06:00
Thomas Lively
7987888a3f [WebAssembly][InstrEmitter] Foundation for multivalue call lowering
Summary:
WebAssembly is unique among upstream targets in that it does not at
any point use physical registers to store values. Instead, it uses
virtual registers to model positions in its value stack. This means
that some target-independent lowering activities that would use
physical registers need to use virtual registers instead for
WebAssembly and similar downstream targets. This CL generalizes the
existing `usesPhysRegsForPEI` lowering hook to
`usesPhysRegsForValues` in preparation for using it in more places.

One such place is in InstrEmitter for instructions that have variadic
defs. On register machines, it only makes sense for these defs to be
physical registers, but for WebAssembly they must be virtual registers
like any other values. This CL changes InstrEmitter to check the new
target lowering hook to determine whether variadic defs should be
physical or virtual registers.

These changes are necessary to support a generalized CALL instruction
for WebAssembly that is capable of returning an arbitrary number of
arguments. Fully implementing that instruction will require additional
changes that are described in comments here but left for a follow up
commit.

Reviewers: aheejin, dschuff, qcolombet

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71484
2020-01-21 11:13:46 -08:00
Ehud Katz
024d2bb279 [APFloat] Add support for operations on Signaling NaN
Fix PR30781

Differential Revision: https://reviews.llvm.org/D69774
2020-01-21 21:02:00 +02:00
Fangrui Song
1da9bab99c [APFloat][unittest] Fix -Wunused-variable after D69773 2020-01-21 10:33:48 -08:00
Ehud Katz
b85eaf5298 [APFloat] Extend conversion from special strings
Add support for converting Signaling NaN, and a NaN Payload from string.

The NaNs (the string "nan" or "NaN") may be prefixed with 's' or 'S' for defining a Signaling NaN.

A payload for a NaN can be specified as a suffix.
It may be a octal/decimal/hexadecimal number in parentheses or without.

Differential Revision: https://reviews.llvm.org/D69773
2020-01-21 20:22:27 +02:00
Fangrui Song
091ee2007c [PowerPC] Delete PPCSubtarget::isDarwin and isDarwinABI
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125614.html developers have agreed to remove Darwin support from POWER backends.

Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D72067
2020-01-21 09:54:44 -08:00
Jonas Devlieghere
1f56d4f3b5 [lldb/Hexagon] Include <mutex>
Fixes compiler error on macOS: error: no type named 'mutex' in namespace
'std'.
2020-01-21 09:51:30 -08:00
Fangrui Song
9effb9a2d4 [StackColoring] Remap PseudoSourceValue frame indices via MachineFunction::getPSVManager()
Reviewed By: dantrushin

Differential Revision: https://reviews.llvm.org/D73063
2020-01-21 09:46:27 -08:00
Krzysztof Parzyszek
d8f1b45c67 [Hexagon] Add support for Hexagon v67t microarchitecture (tiny core) 2020-01-21 11:35:10 -06:00
Krzysztof Parzyszek
dcadf45acb Update spelling of {analyze,insert,remove}Branch in strings and comments
These names have been changed from CamelCase to camelCase, but there were
many places (comments mostly) that still used the old names.

This change is NFC.
2020-01-21 10:15:38 -06:00
Zakk Chen
d8bc49acdf [RISCV] Check the target-abi module flag matches the option
Reviewers: lenary, asb

Reviewed By: lenary

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72768
2020-01-21 07:32:12 -08:00
Simon Pilgrim
1355140ca5 [TargetLowering] SimplifyDemandedBits ISD::SRA multi-use handling
Call SimplifyMultipleUseDemandedBits to peek through extended source args with multiple uses
2020-01-21 15:12:07 +00:00
Benjamin Kramer
02e2474c8f Make dropTriviallyDeadConstantArrays not quadratic
Only look at the operands of dead constant arrays instead of all
constant arrays again.
2020-01-21 16:06:46 +01:00
Jinsong Ji
863e4dd199 [PowerPC][NFC] Reclaim TSFlags bit 6
We removed UseVSXReg flag in https://reviews.llvm.org/D58685
But we did not reclain the bit 6 it was assigned,
this will become confusing and a hole later..
We should reclaim it as early as possible before new bits.

Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D72649
2020-01-21 15:04:05 +00:00
Simon Pilgrim
7ec1b87676 [SelectionDAG] GetDemandedBits - remove ANY_EXTEND handling
Rely on SimplifyMultipleUseDemandedBits fallback instead.
2020-01-21 14:39:00 +00:00
Simon Pilgrim
c3fd0a5ddc [X86] combineBT - use SimplifyDemandedBits instead of GetDemandedBits
Another step towards removing SelectionDAG::GetDemandedBits entirely
2020-01-21 14:24:46 +00:00
Simon Pilgrim
d0ed290720 [TargetLowering] SimplifyDemandedBits ANY_EXTEND/ANY_EXTEND_VECTOR_INREG multi-use handling
Call SimplifyMultipleUseDemandedBits to peek through extended source args with multiple uses
2020-01-21 14:07:19 +00:00
LLVM GN Syncbot
f3ae931f0a [gn build] Port fccd0da5ee6 2020-01-21 13:36:16 +00:00
Matt Arsenault
57284d4d24 AMDGPU/GlobalISel: Add some baseline tests for unmerge legalization 2020-01-21 08:31:10 -05:00
Guillaume Chatelet
b6581729c7 [Alignment][NFC] Use Align with CreateElementUnorderedAtomicMemMove
Summary:
This is 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

Reviewers: courbet

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73050
2020-01-21 14:16:50 +01:00
Georgii Rymar
6ae6bfb5bd [llvm-readobj] - Remove rpath.test.
rpath.test checks that DT_RPATH is dumped.

We have dynamic-tags.test that tests all dynamic
tags and it is better, because also checks llvm-readelf
and does not use precompiled binaries.

Differential revision: https://reviews.llvm.org/D73093
2020-01-21 16:14:36 +03:00
Guillaume Chatelet
640dc77d98 [Alignment][NFC] Use Align with CreateMaskedLoad
Summary:
This is 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

Reviewers: courbet

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D73087
2020-01-21 14:13:22 +01:00
Clement Courbet
6b77481d59 [llvm-exegesis] Fix support for LEA64_32r.
Summary:
Add unit test to show the issue: We must select an *aliasing* output
register, not the exact register.

Reviewers: gchatelet

Subscribers: tschuett, mstojanovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73095
2020-01-21 13:58:23 +01:00
Georgii Rymar
0708e5ac82 [llvm-readelf][llvm-readobj] - Fix the indentation when printing dynamic tags.
This change is similar to one made for llvm-objdump in D72838.

llvm-readelf/llvm-readobj tools do not align the "Name/Value" column properly.
This patch adds a logic to calculate the size of indentation on fly
to fix such issues.

Differential revision: https://reviews.llvm.org/D72843
2020-01-21 14:24:50 +03:00
Simon Pilgrim
d7e07d3ff9 [DAG] Fold extract_vector_elt (scalar_to_vector), K to undef (K != 0)
This was unconditionally folding this to the source operand, even if the access was out of bounds. Use undef instead of the extract is not the first element.

This helps with some cases where 3-vectors are legalized and avoids processing the 4th component.

Original Patch by: arsenm (Matt Arsenault)

Differential Revision: https://reviews.llvm.org/D51589
2020-01-21 10:58:30 +00:00
Clement Courbet
f5fc494b30 [llvm-exegesis] Add support for AVX512 explicit rounding operands.
Reviewers: gchatelet

Subscribers: tschuett, mstojanovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73083
2020-01-21 11:50:17 +01:00
Simon Pilgrim
f9cfdda9d4 [TargetLowering] SimplifyDemandedBits - Pull out InDemandedMask variable to ISD::SHL. NFCI.
Matches ISD::SRA + ISD::SRL variants.
2020-01-21 10:40:18 +00:00
Simon Pilgrim
f3d8f34048 Regenerate rotated uxt tests 2020-01-21 10:40:17 +00:00
Anna Welker
0f06c0a955 [ARM][MVE] Enable masked scatter
Extends the gather/scatter pass in MVEGatherScatterLowering.cpp to
enable the transformation of masked scatters into calls to MVE's masked
scatter intrinsic.

Differential Revision: https://reviews.llvm.org/D72856
2020-01-21 09:46:26 +00:00
LLVM GN Syncbot
7c3aa098d6 [gn build] Port a80291ce10b 2020-01-21 08:19:25 +00:00
Nicolai Hähnle
1e13055b88 Revert "[AMDGPU] Invert the handling of skip insertion."
This reverts commit 0dc6c249bffac9f23a605ce4e42a84341da3ddbd.

The commit is reported to cause a regression in piglit/bin/glsl-vs-loop for
Mesa.
2020-01-21 09:17:25 +01:00
Fangrui Song
c27b050d75 [MC] Improve a report_fatal_error 2020-01-20 23:13:18 -08:00
Fangrui Song
50393a6547 [AMDGPU] Fix -Wunused-variable after e5823bf806ca9fa6f87583065b3898a2edabce57 2020-01-20 22:41:13 -08:00
Matt Arsenault
fcfc675c73 AMDDGPU/GlobalISel: Fix RegBankSelect for llvm.amdgcn.ps.live 2020-01-20 23:21:53 -05:00
Sergey Dmitriev
c4ed238e0b [llvm-objcopy][ELF] Allow setting SHF_EXCLUDE flag for ELF sections
Summary: This patch adds support for setting SHF_EXCLUDE flag for ELF sections.

Reviewers: jhenderson, grimar, MaskRay, mstorsjo, espindola, alexshap, rupprecht

Reviewed By: jhenderson, MaskRay

Subscribers: emaste, abrachet, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72128
2020-01-20 18:56:45 -08:00
Matt Arsenault
2a7cf88191 AMDGPU: Generate test checks
These weren't much different than copied output anyway.
2020-01-20 20:03:45 -05:00
Matt Arsenault
87ac35b140 AMDGPU: Don't create weird sized integers
There's no reason to introduce a new, unnaturally sized value
here. This has a chance to produce worse code with
legalization. Avoids regression in a future patch.
2020-01-20 20:02:54 -05:00