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

161150 Commits

Author SHA1 Message Date
Adrian Prantl
3056a87e37 Move generic test to the Generic directory
llvm-svn: 327148
2018-03-09 16:42:05 +00:00
Sanjay Patel
5271e91b8e [AMDGPU] fix test to be independent of FP undef
llvm-svn: 327147
2018-03-09 16:33:34 +00:00
Nicholas Wilson
61acc6835c [WebAssembly] Disallow weak undefined globals in the object format
This implements https://github.com/WebAssembly/tool-conventions/pull/47

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

llvm-svn: 327146
2018-03-09 16:30:44 +00:00
Sanjay Patel
6f17f3d76f [InstSimplify] fix FP infinite hex constant values in tests; NFC
Really should improve this...

llvm-svn: 327144
2018-03-09 16:14:02 +00:00
Stefan Pintilie
1651fe32fd Revert "[PowerPC] LSR tunings for PowerPC"
Revert the rest of the LST tune commit.
It seems that the LSR tune commit breaks internal tests.
Reverting the commit.

llvm-svn: 327143
2018-03-09 16:08:55 +00:00
Stefan Pintilie
0ced7d7015 Revert "[PowerPC] Move test to correct location."
Revert part of the LSR tune commit.

llvm-svn: 327142
2018-03-09 16:08:48 +00:00
Simon Pilgrim
ef856f262a Tidyup comment that was destroyed by clang-format. NFCI.
llvm-svn: 327141
2018-03-09 15:50:09 +00:00
Simon Pilgrim
9e78cd8573 [X86][SSE] createVariablePermute - move index vector canonicalization to top of function. NFCI.
This is to make it easier to return early from the switch statement with custom lowering.

llvm-svn: 327140
2018-03-09 15:48:56 +00:00
Tim Northover
47d2b317bb Try to fix Windows bot by forcing "rm".
llvm-svn: 327139
2018-03-09 15:44:59 +00:00
Sanjay Patel
a5102714e6 [LangRef] make it clear that FP instructions do not have side effects
Also, fix the undef vs. UB example to use 'sdiv' because that can trigger div-by-zero UB.

The existing text for the constrained intrinsics says:
"By default, LLVM optimization passes assume that the rounding mode is round-to-nearest 
and that floating point exceptions will not be monitored. Constrained FP intrinsics are 
used to support non-default rounding modes and accurately preserve exception behavior 
without compromising LLVM’s ability to optimize FP code when the default behavior is 
used."
...so the additional text with the normal FP opcodes should make the different modes
clear.

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

llvm-svn: 327138
2018-03-09 15:27:48 +00:00
Jonas Devlieghere
18e69dc8f4 [dsymutil] Unify error handling and add color
We improved the handling of errors and warnings in dwarfdump's verifier
in rL314498. This patch does the same thing for dsymutil.

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

llvm-svn: 327137
2018-03-09 15:22:42 +00:00
Hans Wennborg
28e4160e7d CMake: Make libxml2 show up in --system-libs (PR36660)
lib/WindowsManifest/CMakeLists.txt adds it to LLVM_SYSTEM_LIBS on that
target, but it was never getting picked up in
tools/llvm-config/CMakeLists.txt.

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

llvm-svn: 327135
2018-03-09 14:46:44 +00:00
Sebastian Pop
5cb4d1ecb7 [x86][aarch64] ask the backend whether it has a vector blend instruction
The code to match and produce more x86 vector blends was enabled for all
architectures even though the transform may pessimize the code for other
architectures that do not provide a vector blend instruction.

Added an aarch64 testcase to check that a VZIP instruction is generated instead
of byte movs.

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

llvm-svn: 327132
2018-03-09 14:29:21 +00:00
Andrea Di Biagio
0a931ef145 [llvm-mca] Move the logic that prints the summary into its own view. NFCI
llvm-svn: 327128
2018-03-09 13:52:03 +00:00
Andrea Di Biagio
9d4e3cac5b [llvm-mca] Run clang-format on the source code. NFC
llvm-svn: 327125
2018-03-09 12:50:42 +00:00
Nicolai Haehnle
33d8a7c561 TableGen: Add a defset statement
Allows capturing a list of concrete instantiated defs.

This can be combined with foreach to create parallel sets of def
instantiations with less repetition in the source. This purpose is
largely also served by multiclasses, but in some cases multiclasses
can't be used.

The motivating example for this change is having a large set of
intrinsics, which are generated from the IntrinsicsBackend.td file
included by Intrinsics.td, and a corresponding set of instruction
selection patterns, which are generated via the backend's .td files.

Multiclasses cannot be used to eliminate the redundancy in this case,
because a multiclass cannot span both LLVM's common .td files and
the backend .td files at the same time.

Change-Id: I879e35042dceea542a5e6776fad23c5e0e69e76b

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

llvm-svn: 327121
2018-03-09 12:24:42 +00:00
Nicolai Haehnle
1ebb6681e2 TableGen: Allow arbitrary list values as ranges of foreach
The changes to FieldInit are required to make field references (Def.field)
work inside a ForeachDeclaration: previously, Def.field wasn't resolved
immediately when Def was already a fully resolved DefInit.

Change-Id: I9875baec2fc5aac8c2b249e45b9cf18c65ae699b
llvm-svn: 327120
2018-03-09 12:24:30 +00:00
Nicolai Haehnle
c8e80dc722 TableGen: Remove unused ParseForeachMode
Use the default ParseValueMode instead of ParseForeachMode when
parsing the rule

  ForeachDeclaration ::= ID '=' '[' ValueList ']'

because the only difference between the two is how an open brace '{'
is handled at the end. In the context of foreach, the 'in' keyword
will appear after the ForeachDeclaration, so this special handling
of '{' is not required.

Change-Id: I4d86bb73bab9ec26752e1273e5213df77cf28d1d
llvm-svn: 327119
2018-03-09 12:24:20 +00:00
Nicolai Haehnle
c28edf9710 TableGen: More helpful error messages
Change-Id: Ic78afd0cd765fdb4cf1b7ecfb6bba22653ce6d29
llvm-svn: 327118
2018-03-09 12:24:14 +00:00
Nicolai Haehnle
f6565225c2 TableGen: add !isa operation
Change-Id: Iddb724c3ae706d82933a2d82c91d07e0e36b30e3

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

llvm-svn: 327117
2018-03-09 12:24:06 +00:00
Pavel Labath
d9d89d6390 [DebugInfo/AccelTable] Fix inconsistency in getDIEOffset implementations
Summary:
Even though the getDIEOffset offset function was common for the two
accelerator table implementations, it was doing two different things:
for the Apple tables, it was returning the die offset relative to the
start of the section, whereas for DWARF v5 tables, it was relative to
the start of the CU.

I resolve this by renaming the function to getDIESectionOffset to make
it obvious what the function returns, and change the DWARF
implementation to return the section offset. I also keep the CU-relative
accessor, but only in the DWARF implementation (there is no way to get
this information for the Apple tables). This was not caught by existing
tests because the hand-written inputs also erroneously used section
offsets instead of CU-relative ones.

While looking at this, I noticed that the Apple implementation was not
fully correct either -- the header contains a DIEOffsetBase field, which
should be added to offsets encoded with the DW_FORM_ref*** family, but
this was not being used. This went unnoticed because all current writers
set this field to zero anyway. I fix this as well and add a hand-written
test which demonstrates the issue.

Reviewers: JDevlieghere, dblaikie

Subscribers: aprantl, llvm-commits

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

llvm-svn: 327116
2018-03-09 11:58:59 +00:00
Renato Golin
97a6546bf9 [LV] Fix vectorizer's isUniform() abuse triggers assert in SCEV
Fixes PR36311.

See more detailed analysis in
https://bugs.llvm.org/show_bug.cgi?id=36311.

isUniform() information is recomputed after LV started transforming the
underlying IR and that triggered an assert in SCEV.

From vectorizer's architectural perspective, such information, while
still useful in vector code gen, should not be recomputed after the
start of transforming the LLVM IR. Instead, we should collect and cache
such information during the analysis phase of LV and use the cached info
during code gen.

From the symptom perspective, this assert as it stands right now is not
very useful. Legality already rejected loops that would trigger the
assert. As such, commenting out the assert is NFC from vectorizer's
functionality perspective. On top of that, just above the assertion, we
check for unit-strided load/store or
gather scatter. Addresses can't be uniform below that check.

From vectorization theory point of view, we don't have to reject all
cases of stores to uniform addresses. Eventually, we should support
safe/profitable cases.

This patch resolves the issue by removing the useless assertion that is
invoking LAA's isUniform() that requires up-to-date DomTree ---- once
vector code gen starts modifying CFG, we don't have an up-to-date
DomTree.

Patch by Hideki Saito <hideki.saito@intel.com>.

llvm-svn: 327109
2018-03-09 10:31:31 +00:00
Jonas Devlieghere
434c32b43d [Support] Move syntax highlighting into support
Move the DWARF syntax highlighting into support. This has several
advantages, most notably that this makes the WithColor RAII wrapper
available outside libDebugInfo. Furthermore, several projects all have
their own code for handling colored output. This provides a place to
centralize it.

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

llvm-svn: 327108
2018-03-09 09:56:24 +00:00
Martin Storsjo
671a0abcf3 [AArch64] Fix use of a regex in the win-alloca.ll test. NFC.
Check that the variable actually is the same as the one previously
matched.

llvm-svn: 327107
2018-03-09 09:45:37 +00:00
Stanislav Mekhanoshin
3f3b8a51e0 [AMDGPU] Fixed V_DIV_FIXUP_F16 selection on GFX9
GFX9 should select opsel version.

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

llvm-svn: 327106
2018-03-09 07:21:43 +00:00
Craig Topper
a8cf642b8a [X86] Remove duplicate isel pattern. NFC
llvm-svn: 327104
2018-03-09 05:42:44 +00:00
Rafael Espindola
014232537d Don't treat .symver as a regular alias definition.
This patch starts simplifying the handling of .symver.

For now it just moves the responsibility for creating an alias down to
the streamer. With that the asm streamer can pass a .symver unchanged,
which is nice since gas cannot parse "foo@bar = zed".

In a followup I hope to move the handling down to the writer so that
we don't need special hacks for avoiding breaking names with @@@ on
windows.

llvm-svn: 327101
2018-03-09 03:13:37 +00:00
Matt Morehouse
2b690a0c14 Attempt to fix vecreduce-propagate-sd-flags.ll test.
Buildbots have been failing since r327079.

llvm-svn: 327100
2018-03-09 02:04:30 +00:00
Eric Christopher
6da48b2bee Revert "[ThinLTO] Keep available_externally symbols live"
This reverts commit r327041 and the followup attempts at fixing the testcase as they're still failing.

llvm-svn: 327094
2018-03-09 01:25:18 +00:00
Craig Topper
aa2e9c285c [X86] Remove SRAs from v16i8 multiply lowering on sse2 targets
Previously we unpacked the even bytes of each input into the high byte of 16-bit elements then did an v8i16 arithmetic shift right by 8 bits to fill the upper bits of each word with sign bits. Then we did the v8i16 multiply and then masked to zero the upper 8-bits of each result. The similar was done for all the odd bytes. The results are then packed together with packuswb

Since we are masking each multiply result element to 8-bits, and those 8-bits are determined only by the lower 8-bits of each of the inputs, we don't need to fill the upper bits with sign bits. So we can just unpack into the low byte of each element and treat the upper bits as garbage. This is what gcc also does.

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

llvm-svn: 327093
2018-03-09 01:22:31 +00:00
Adrian Prantl
45e666cd89 LowerDbgDeclare: ignore dbg.declares for allocas with volatile access
There is no point in lowering a dbg.declare describing an alloca that
has volatile loads or stores as users, since the alloca cannot be
elided. Lowering the dbg.declare will result in larger debug info that
may also have worse coverage than just describing the alloca.

rdar://problem/34496278

llvm-svn: 327092
2018-03-09 00:45:04 +00:00
Eric Christopher
c1410ce6f6 Fix header comment on SHA1 code.
llvm-svn: 327086
2018-03-09 00:23:35 +00:00
Paul Robinson
42daf3efdc Revert "[DWARF] Fix mixing assembler -g with DWARF .file directives."
This reverts commit d6d9ac1ab5039ba1fe0f63c36eac2bdd9f0a79c9.
aka r327073

llvm-svn: 327083
2018-03-09 00:11:54 +00:00
Saleem Abdulrasool
7a873d31e0 utils: add a helper class to lit for captured substitutions
On Windows, if the substitution contains a back reference, it would
removed due to the replacement of the escape character in lit. Create a
helper class to avoid this which will simply ignore the replacement and
mark the substitution as having capture groups being referenced.

llvm-svn: 327082
2018-03-09 00:06:10 +00:00
Sameer AbuAsal
d64a063a3a Propagate flags to SDValue in SplitVecOp_VECREDUCE
This patch is a fix for PR36642.

 While legalizing long vector types, make sure the smaller types get the
 flags of the wider type.

 bugzilla link: https://bugs.llvm.org/show_bug.cgi?id=36642

Change-Id: I0c2829639f094c862c10a6b51b342d4c2563e1fa
llvm-svn: 327079
2018-03-08 23:41:40 +00:00
Kevin Enderby
99afb7391a For llvm-objdump and Mach-O files, update the printing of some thread states
from core files.  I tested this against the couple of core files that were
getting errors about unknown thread flavors and it now produce the same output as
the Xcode otool-classic(1) tool.  Since the core files are huge I didn’t include
them as test cases.

rdar://38216356

llvm-svn: 327077
2018-03-08 23:10:38 +00:00
Paul Robinson
25bc112f74 [DWARF] Fix mixing assembler -g with DWARF .file directives.
We were effectively overriding an explicit '.file' directive with info
for the assembler source.  That shouldn't happen.

Fixes PR36636.

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

llvm-svn: 327073
2018-03-08 22:39:47 +00:00
Matt Davis
fe25df29a1 [DebugInfo] Add DW_AT_byte_size to vectors
Summary:
This patch adds the DW_AT_byte_size dwarf attribute to vectors.
This fixes PR21924

LLVM will round a vector up to the next alignable address, which can result in
the vector's representation in the object file being larger than what the
debugger will calculate via NumberOfElements * ElementSize. In such a case calling sizeof(MyVec) in the source will result in a different value than what a debugger might present. This situation can occur because LLVM permits non-power of two 'vector_size' attributes.

Reviewers: echristo, dexonsmith, aprantl

Reviewed By: aprantl

Subscribers: probinson, aprantl, llvm-commits, JDevlieghere

Tags: #debug-info

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

llvm-svn: 327072
2018-03-08 22:22:26 +00:00
Sanjay Patel
9d97b29d2f [Reassociate] fix test to be independent of FP undef
llvm-svn: 327071
2018-03-08 22:05:27 +00:00
Benjamin Kramer
c4c4f0198e [Support] Pacify -Wsign-compare in unit test.
llvm-svn: 327070
2018-03-08 21:54:30 +00:00
Craig Topper
80d1fbaaf4 [TargetLowering] Remove redundant if condition in SimplifySetcc. NFC
We were checking the condition code a second time when we were already in a block with this same condition code check.

llvm-svn: 327069
2018-03-08 21:53:36 +00:00
Benjamin Kramer
6caec56f26 [DebugInfo] Move RangeListEntries instead of copying.
This is needed for correctness as RangeListEntry is not copy-assignable,
which std::vector might rely on.

llvm-svn: 327067
2018-03-08 21:31:10 +00:00
Sanjay Patel
a03db79a8c [AMDGPU] fix test to survive more FP undef constant folding
llvm-svn: 327066
2018-03-08 21:30:56 +00:00
Philip Reames
b360dc80e1 [NFC] Factor out a helper function for checking if a block has a potential early implicit exit.
llvm-svn: 327065
2018-03-08 21:25:30 +00:00
Zachary Turner
cc88ff3a42 Fix compilation failure with MSVC.
llvm-svn: 327063
2018-03-08 21:07:30 +00:00
Kuba Mracek
0d947d71f9 [asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part, take 3]
This fixes a false positive ODR violation that is reported by ASan when using LTO. In cases, where two constant globals have the same value, LTO will merge them, which breaks ASan's ODR detection.

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

llvm-svn: 327061
2018-03-08 21:02:18 +00:00
Zachary Turner
0b5103198a Fix signed-unsigned comparison warning.
llvm-svn: 327060
2018-03-08 20:57:37 +00:00
Wolfgang Pieb
ad4e4e9593 [DWARF v5] Support for verbose dumping of .debug_rnglist entries
Adding verbose dumping to the recent implementation of dumping of v5 range list entries. 
We're capturing the entries as is as they come in during extraction, including their file offset,
so we can dump them in more detail.
The offset table entries which are table-relative are shown as is (as in non-verbose mode)
and with the actual file offset they map to.

Reviewers: dblaikie, aprantl, jdevlieghere, jhenderson

Subscribers: llvm-commits

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

llvm-svn: 327059
2018-03-08 20:52:35 +00:00
Sanjay Patel
319bd01ddb [ConstantFold] fp_binop undef, undef --> undef
These are uncontroversial and independent of a proposed LangRef edits (D44216).

I tried to fix tests that would fold away:
rL327004
rL327028
rL327030
rL327034

I'm not sure if the Reassociate tests are meaningless yet, but they probably will be 
as we add more folds, so if anyone has suggestions or wants to fix those, please do.

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

llvm-svn: 327058
2018-03-08 20:42:49 +00:00
Zachary Turner
117474a6aa [Support] Add WriteThroughMemoryBuffer.
This is like MemoryBuffer (read-only) and WritableMemoryBuffer
(writable private), but where the underlying file can be modified
after writing.  This is useful when you want to open a file, make
some targeted edits, and then write it back out.

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

llvm-svn: 327057
2018-03-08 20:34:47 +00:00