1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

148060 Commits

Author SHA1 Message Date
Vedant Kumar
22f9dc1154 [gcov] Sort file info before printing it
The order in which GCOV file info is printed depends on the string hash
function. This makes some GCOV tests brittle, because the tests must be
updated whenever the hash function changes.

Sort the filenames before printing out the file info to solve the
problem. This should be relatively cheap.

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

llvm-svn: 301371
2017-04-26 00:16:10 +00:00
Sam Clegg
f58a42664a revert debugging
llvm-svn: 301370
2017-04-26 00:02:39 +00:00
Sam Clegg
1e1843917e [WebAssembly] Allow for signed relocation addends
Summary:
Addends are used as offsets to addresses of globals
and can be both positive and negative.  This change
prints libObject in line with the spec and the MC
layer.

Subscribers: jfb, dschuff

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

llvm-svn: 301369
2017-04-26 00:02:31 +00:00
Dylan McKay
4e45cb4703 [AVR] Do not kill the dest register for a pseudo instruction
It caused the register to later be dead, which would trigger a verifier
error.

llvm-svn: 301368
2017-04-25 23:58:20 +00:00
Matt Arsenault
485b67862c AMDGPU: Shift down reserved SP register like scratch wave offset
llvm-svn: 301367
2017-04-25 23:40:57 +00:00
Sanjay Patel
ff7081f9ec [DAG] fix formatting of isConstantSplat(); NFC
llvm-svn: 301366
2017-04-25 23:33:28 +00:00
Matt Arsenault
7dea4b44a9 AMDGPU: Clean up VOP3NoMods pattern
There is no need to copy the operands or inspect the sources.
Also remove some unnecessary clamp/omod usage.

llvm-svn: 301363
2017-04-25 21:17:38 +00:00
Sanjay Patel
9f4ac39296 [x86] add more tests for potential change in bool math folding; NFC
Also, use AVX2 to show a potential difference for 256-bit vectors.

llvm-svn: 301362
2017-04-25 20:56:14 +00:00
Konstantin Zhuravlyov
568217ba62 AMDGPU: Fix ValueKind code object metadata for images
Differential Revision: https://reviews.llvm.org/D32504

llvm-svn: 301360
2017-04-25 20:38:26 +00:00
Sanjay Patel
7e23fb51e1 [x86] regenerate checks; NFC
llvm-svn: 301359
2017-04-25 20:30:08 +00:00
Zachary Turner
2be724d4fd [llvm-pdbdump] Allow sorting / filtering by immediate padding
llvm-svn: 301358
2017-04-25 20:22:29 +00:00
Zachary Turner
219719243c [llvm-pdbdump] Dump File / Line Info to YAML.
We were already parsing and dumping this to the human readable
format, but not to the YAML format.  This does so, in preparation
for reading it in and reconstructing the line information from
YAML.

llvm-svn: 301357
2017-04-25 20:22:02 +00:00
Zachary Turner
dee43336b2 [StringExtras] Add a fromHex to complement toHex.
We already have a function toHex that will convert a string like
"\xFF\xFF" to the string "FFFF", but we do not have one that goes
the other way - i.e. to convert a textual string representing a
sequence of hexadecimal characters into the corresponding actual
bytes.  This patch adds such a function.

llvm-svn: 301356
2017-04-25 20:21:35 +00:00
Matthias Braun
630e7ff661 SimplifyLibCalls: Fix crash on memset(notmalloc())
rdar://31520787

llvm-svn: 301352
2017-04-25 19:44:25 +00:00
Adrian Prantl
53901cca8a Fix an assertion when skipping stack values in DWARF2 mode.
The fix consists of resetting LocationKind when addMachineRegExpression fails.

rdar://problem/31803010

llvm-svn: 301351
2017-04-25 19:40:53 +00:00
Petr Hosek
b720cf7142 [llvm-objdump] Don't attempt to print lines beyond the end of file
This may trigger a segfault in llvm-objdump when the line number stored
in debug infromation points beyond the end of file; lines in LineBuffer
are stored in std::vector which is allocated in chunks, so even if the
debug info points beyond the end of the file, this doesn't necessarily
trigger the segfault unless the line number points beyond the allocated
space.

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

llvm-svn: 301347
2017-04-25 18:56:33 +00:00
Krzysztof Parzyszek
22cdd913d0 [Hexagon] Only increment debug counters if debug option is present
llvm-svn: 301346
2017-04-25 18:56:14 +00:00
Gil Rapaport
48a2ff10e8 [LV] Make LIT test insensitive to basic block numbering
This patch is part of D28975's breakdown.

induction.ll encodes the specific (and rather arbitrary) numbers given to
predicated basic blocks by the unique naming mechanism, which makes it
sensitive to changes in LV's instruction generation order. This patch replaces
those specific numbers with a numeric pattern.

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

llvm-svn: 301345
2017-04-25 18:14:24 +00:00
Stanislav Mekhanoshin
19be2234f0 Skip bitcasts while looking for GEP in LoadStoreVectorizer
Differential Revisison: https://reviews.llvm.org/D32101

llvm-svn: 301343
2017-04-25 18:00:08 +00:00
Simon Pilgrim
53a205462c [X86][AVX2] Add shuffle test for PR27320 showing current codegen.
llvm-svn: 301342
2017-04-25 18:00:04 +00:00
Craig Topper
1f854f4ba8 [InstCombine] Remove redundant code from SimplifyUsingDistributiveLaws
The code I've removed here exists in ExpandBinOp in InstSimplify which we call into before SimplifyUsingDistributiveLaws. The code in InstSimplify looks to have been copied from here.

I verified this code doesn't fire on any lit tests. Not that that proves its definitely dead.

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

llvm-svn: 301341
2017-04-25 17:54:12 +00:00
Craig Topper
d59a3da3b6 [APInt] Use isSubsetOf, intersects, and bit counting methods to reduce temporary APInts
This patch uses various APInt methods to reduce temporary APInt creation.

This should be all of the unrelated cleanups that got buried in D32376(creating a KnownBits struct) as well as some pointed out by Simon during the review of that. Plus a few improvements to use counting instead of masking.

I've left out any places where we do something like (KnownZero & KnownOne) != 0 as I plan to add a helper method to KnownBits to ask that question and didn't want to thrash that code an additional time.

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

llvm-svn: 301338
2017-04-25 17:46:30 +00:00
Craig Topper
d9f9a378dd [InstCombine] Fix CHECK-LABEL in two tests.
llvm-svn: 301337
2017-04-25 17:40:58 +00:00
Simon Pilgrim
72c2155c8f [X86][SSE] Add tests for PR14657 showing current codegen.
llvm-svn: 301334
2017-04-25 17:22:34 +00:00
Adrian Prantl
07a223b07a Print complete DIExpressions in the assembler output DEBUG_VALUE comments.
The previous code was complex, incorrect, and couldn't print everything.

llvm-svn: 301333
2017-04-25 17:22:09 +00:00
Sam Clegg
a6acecc0bd [WebAssembly] Fix relocation count in wasm binaries with call_indirect
Subscribers: jfb, dschuff

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

llvm-svn: 301331
2017-04-25 17:13:23 +00:00
Sam Clegg
4af5bc2ae5 [WebAssembly] Read global index in init expression as LEB
Subscribers: jfb, dschuff

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

llvm-svn: 301330
2017-04-25 17:11:56 +00:00
Craig Topper
be9a606450 [InstSimplify] Handle (~A & ~B) | (~A ^ B) -> ~A ^ B
The code Sanjay Patel moved over from InstCombine doesn't work properly if the 'and' has both inputs as nots because we used a commuted op matcher on the 'and' first. But this will bind to the first 'not' on 'and' when there could be two 'not's. InstCombine could rely on DeMorgan to ensure the 'and' wouldn't have two 'not's eventually, but InstSimplify can't rely on that.

This patch matches the xor first then checks for the ands and allows a not of either operand of the xor.

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

llvm-svn: 301329
2017-04-25 17:01:32 +00:00
Davide Italiano
55c8b87614 [PM] Run IndirectCallPromotion only when PGO is enabled.
Differential Revision:  https://reviews.llvm.org/D32465

llvm-svn: 301327
2017-04-25 16:54:45 +00:00
Craig Topper
f58c65a916 [InstCombine] Remove superfluous curly braces around a single line if body. NFC
llvm-svn: 301326
2017-04-25 16:48:19 +00:00
Craig Topper
137064ab6f [ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt. NFC
llvm-svn: 301325
2017-04-25 16:48:14 +00:00
Craig Topper
ca32b637c8 [ValueTracking] Use APInt instead of auto. NFC
This is a pre-commit for a patch I'm working on to turn KnownZero/One into a struct. Once I do that the type here will be less obvious.

llvm-svn: 301324
2017-04-25 16:48:09 +00:00
Craig Topper
0b3e845ccf [ValueTracking] Use BitWidth local variable instead of re-reading it from KnownZero. NFC
This is a pre-commit for a patch that I'm working on to merge KnownZero/KnownOne into a KnownBits struct which would have had to touch this line.

llvm-svn: 301323
2017-04-25 16:48:03 +00:00
Simon Pilgrim
699907d518 [SelectionDAG] Added getBuildVector(ArrayRef<SDUse>) helper.
llvm-svn: 301322
2017-04-25 16:41:28 +00:00
Simon Pilgrim
5ce342b483 [DAGCombiner] Refactor to make it easy to add support for vectors in a future patch. NFCI.
llvm-svn: 301320
2017-04-25 16:16:03 +00:00
Andrew Ng
b0c76d3c64 Resubmit r301309: [DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler.
This patch reapplies r301309 with the fix to the MIR test to fix the assertion
triggered by r301309. Had trimmed a little bit too much from the MIR!

llvm-svn: 301317
2017-04-25 15:39:57 +00:00
Craig Topper
c7999fab10 [InstCombine] Add missing commute handling to (A | B) & (B ^ (~A)) -> (A & B)
The matching here wasn't able to handle all the possible commutes. It always assumed the not would be on the left of the xor, but that's not guaranteed.

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

llvm-svn: 301316
2017-04-25 15:19:04 +00:00
Simon Pilgrim
f1c71d62a2 [SelectionDAG] Use getBuildVector helper where possible. NFCI
llvm-svn: 301314
2017-04-25 15:10:47 +00:00
Dylan McKay
0e7217df94 [AVR] Support the LDWRdPtr instruction with the same Src+Dst register
llvm-svn: 301313
2017-04-25 15:09:04 +00:00
Andrew Ng
983d0b8c84 Revert "[DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler."
This reverts commit r301309 which is causing buildbot assertion failures.

llvm-svn: 301312
2017-04-25 14:36:01 +00:00
Daniel Sanders
28ec8e453d Bring back the ability opt out of padding zero-byte functions by not providing a nop instruction.
Summary: No test case since I'm not aware of an in-tree target that needs this.

Reviewers: hans

Subscribers: llvm-commits

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

llvm-svn: 301311
2017-04-25 14:27:27 +00:00
Andrew Ng
35b8e2b1c6 [DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler.
This patch fixes a bug with the updating of DBG_VALUE's in
BreakAntiDependencies. Previously, it would only attempt to update the first
DBG_VALUE following the instruction whose register is being changed,
potentially leaving DBG_VALUE's referring to the wrong register. Now the code
will update all DBG_VALUE's that immediately follow the instruction.

This issue was detected as a result of an optimized codegen difference with
"-g" where an X86 byte/word fixup was not performed due to a DBG_VALUE
referencing the wrong register.

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

llvm-svn: 301309
2017-04-25 13:39:49 +00:00
Simon Pilgrim
040fba754b [SelectionDAG] Pull out repeated getValueType calls. NFCI.
Noticed in D32391.

llvm-svn: 301308
2017-04-25 13:39:07 +00:00
Simon Pilgrim
257bdaef28 [DAGCombiner] Add vector support for (srl (trunc (srl x, c1)), c2) combine.
llvm-svn: 301305
2017-04-25 12:40:45 +00:00
Andrew Ng
53fee0c665 [SimplifyLibCalls] Fix infinite loop with fast-math optimization.
One of the fast-math optimizations is to replace calls to standard double
functions with their float equivalents, e.g. exp -> expf. However, this can
cause infinite loops for the following:

  float expf(float val) { return (float) exp((double) val); }

A similar inline declaration exists in the MinGW-w64 math.h header file which
when compiled with -O2/3 and fast-math generates infinite loops.

So this fix checks that the calling function to the standard double function
that is being replaced does not match the float equivalent.

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

llvm-svn: 301304
2017-04-25 12:36:14 +00:00
Simon Pilgrim
90a298f155 [SelectionDAG] Recognise splat vector isKnownToBeAPowerOfTwo one/sign bit shift cases.
llvm-svn: 301303
2017-04-25 12:29:07 +00:00
Simon Pilgrim
79a874b31e [DAGCombiner] Use SDValue::getConstantOperandVal helper where possible. NFCI.
llvm-svn: 301300
2017-04-25 10:47:35 +00:00
Sanjoy Das
9611d0a199 [IVUsers] Don't bail out of normalizing non-affine add recs
Summary:
In a previous change I changed SCEV's normalization / denormalization
to work with non-affine add recs.  So the bailout in IVUsers can be
removed.

Reviewers: atrick, efriedma

Reviewed By: atrick

Subscribers: davide, mcrosier, llvm-commits

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

llvm-svn: 301298
2017-04-25 06:53:25 +00:00
Craig Topper
a87af33aa2 [InstCombine] Add test cases for missing commute handling in ((A ^ C) ^ B) & (B ^ A) -> (B ^ A) & ~C
llvm-svn: 301297
2017-04-25 06:47:49 +00:00
Craig Topper
62fcfc0d3a [InstCombine] Add test cases showing failures to handle commuted patterns after tricking the operand complexity sorting.
llvm-svn: 301296
2017-04-25 06:22:17 +00:00