1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

138866 Commits

Author SHA1 Message Date
Hans Wennborg
c250a100e2 Jump threading: avoid trying to split edge into landingpad block (PR27840)
Splitting the edge is nontrivial because of the landing pad, and we would
currently assert trying to do it.

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

llvm-svn: 283129
2016-10-03 18:18:04 +00:00
Zachary Turner
e2294e535c Rename Error -> ReportError.
Error conflicts with the llvm::Error datatype, creating
ambiguities.

llvm-svn: 283128
2016-10-03 18:17:18 +00:00
Rafael Espindola
5dfc37acfc Revert "Use getSize instead of data().size(). NFC."
This reverts commit r283125.

lld needs to be updated.

llvm-svn: 283127
2016-10-03 18:01:10 +00:00
Krzysztof Parzyszek
eb23beed3a [RDF] Further improve readability of the graph
Print target basic block for a branch.

llvm-svn: 283126
2016-10-03 17:54:33 +00:00
Rafael Espindola
2c333299a4 Use getSize instead of data().size(). NFC.
Also assert isFinalized in getSize(). This just reduces the noise from
another patch.

llvm-svn: 283125
2016-10-03 17:49:19 +00:00
Lang Hames
bc1c0d9785 [RTDyld] Fix a bug in RTDyldMemoryManager::deregisterEHFrames.
It should forward to deregisterEHFramesInProcess by default, not
registerEHFramesInProcess.

No test case: I haven't come up with a good way to unit test EH frame
registration yet.

llvm-svn: 283123
2016-10-03 17:34:56 +00:00
Krzysztof Parzyszek
0d1949dac4 [RDF] Replace RegisterAliasInfo with target-independent code using lane masks
llvm-svn: 283122
2016-10-03 17:14:48 +00:00
Sanjay Patel
2e8c69fd7b [x86, SSE/AVX] allow 128/256-bit lowering for copysign vector intrinsics (PR30433)
This should fix:
https://llvm.org/bugs/show_bug.cgi?id=30433

There are a couple of open questions about the codegen:
1. Should we let scalar ops be scalars and avoid vector constant loads/splats?
2. Should we have a pass to combine constants such as the inverted pair that we have here?

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

llvm-svn: 283119
2016-10-03 16:38:27 +00:00
Rafael Espindola
e12f0c0e18 Don't drop the llvm. prefix when renaming.
If the llvm. prefix is dropped other parts of llvm don't see this as
an intrinsic.  This means that the number of regular symbols depends
on the context the module is loaded into, which causes LTO to abort.

Fixes PR30509.

llvm-svn: 283117
2016-10-03 15:51:42 +00:00
Sanjay Patel
5162b70a80 fix formatting; NFC
llvm-svn: 283115
2016-10-03 15:18:36 +00:00
Nirav Dave
84cac85538 Prevent out of order HashDirective lexing in AsmLexer.
Retrying after buildbot reset.

To lex hash directives we peek ahead to find component tokens, create a
unified token, and unlex the peeked tokens so the parser does not need
to parse the tokens then. Make sure we do not to lex another hash
directive during peek operation.

This fixes PR28921.

Reviewers: rnk, loladiro

Subscribers: llvm-commits

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

llvm-svn: 283111
2016-10-03 13:48:27 +00:00
Matt Arsenault
08841ad6f7 AMDGPU: Fix typo
llvm-svn: 283108
2016-10-03 13:06:58 +00:00
Matt Arsenault
7765ef735e AMDGPU: Fix missing -verify-machineinstrs in test
llvm-svn: 283107
2016-10-03 12:58:59 +00:00
Simon Pilgrim
c2bc6cbd2b [X86][SSE] Add PR30371 (shuffle constant folding) test case
llvm-svn: 283103
2016-10-03 12:16:39 +00:00
Volkan Keles
2c3720a7dd Add new target hooks for LoadStoreVectorizer
Summary: Added 6 new target hooks for the vectorizer in order to filter types, handle size constraints and decide how to split chains.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, mzolotukhin, wdng, llvm-commits, nhaehnle

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

llvm-svn: 283099
2016-10-03 10:31:34 +00:00
Sjoerd Meijer
5a6c252c8d [ARM] Code size optimisation to lower udiv+urem to udiv+mls instead of a
library call to __aeabi_uidivmod. This is an improved implementation of
r280808, see also D24133, that got reverted because isel was stuck in a loop.
That was caused by the optimisation incorrectly triggering on i64 ints, which
shouldn't happen because there is no 64bit hwdiv support; that put isel's type
legalization and this optimisation in a loop. A native ARM compiler and testing
now shows that this is fixed.

Patch mostly by Pablo Barrio.

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

llvm-svn: 283098
2016-10-03 10:12:32 +00:00
Alexey Bataev
cab8bd9b77 [CodeGen] Adding a test showing the current state of poor code gen of
search loop, by Andrey Tischenko

PR27136 shows failure to hoist constant out of loop. This test is used
as start point to fix the failure: it shows the current state of codegen
and discovers what should be fixed

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

llvm-svn: 283091
2016-10-03 07:47:01 +00:00
Chris Bieneman
54624e7eed [lit] Throw in unimplemented method (NFC)
Summary:
lit's `OneCommandFileTest` class implements an abstract method that
raises if called. However, it raises by referencing an undefined
symbol. Instead, raise explicitly by throwing a `NotImplementedError`.
This is clearer, and appeases Python linters.

Patch By Brian Gesiak!

Reviewers: ddunbar, echristo, beanz

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283090
2016-10-03 04:48:22 +00:00
Chris Bieneman
eccb1ef284 [lit] Remove unused imports (NFC)
Reviewers: ddunbar, echristo, beanz

Patch by Brian Gesiak!

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283089
2016-10-03 04:48:18 +00:00
Chris Bieneman
e4053503bf [lit] Compare to None using identity, not equality
Summary:
In Python, `None` is a singleton, so checking whether a variable is
`None` may be done with `is` or `is not`. This has a slight advantage
over equiality comparisons `== None` and `!= None`, since `__eq__` may
be overridden in Python to produce sometimes unexpected results.

Using `is None` and `is not None` is also recommended practice in
https://www.python.org/dev/peps/pep-0008:

> Comparisons to singletons like `None` should always be done with `is` or
> `is not`, never the equality operators.

Patch by Brian Gesiak!

Reviewers: ddunbar, echristo, beanz

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283088
2016-10-03 04:48:13 +00:00
Konstantin Zhuravlyov
2231c0c9d2 [AMDGPU] Remove unused variables from SIOptimizeExecMasking
Differential Revision: https://reviews.llvm.org/D25110

llvm-svn: 283087
2016-10-03 04:43:22 +00:00
Hal Finkel
89dfd5d7ed [PowerPC] Account for the ELFv2 function prologue during branch selection
The PPC branch-selection pass, which performs branch relaxation, needs to
account for the padding that might be introduced to satisfy block alignment
requirements. We were assuming that the first block was at offset zero (i.e.
had the alignment of the function itself), but under the ELFv2 ABI, a global
entry function prologue is added to the first block, and it is a
two-instruction sequence (i.e. eight-bytes long). If the function has 16-byte
alignment, the fact that the first block is eight bytes offset from the start
of the function is relevant to calculating where padding will be added in
between later blocks.

Unfortunately, I don't have a small test case.

llvm-svn: 283086
2016-10-03 04:06:44 +00:00
Craig Topper
97b89b8e00 [AVX-512] Remove isCheapAsAMove flag from VMOVAPSZ128rm_NOVLX and friends.
This was accidentally copy and pasted from other Pseudos in the file.

llvm-svn: 283084
2016-10-03 02:22:33 +00:00
Craig Topper
05ed355772 [X86] Mark all sizes of (V)MOVUPD as trivially rematerializable.
I don't know for sure that we truly needs this, but its the only vector load that isn't rematerializable. Making it consistent allows it to not be a special case in the td files.

llvm-svn: 283083
2016-10-03 02:00:29 +00:00
Simon Pilgrim
c8b06fb7ec [X86][AVX2] Add support for combining target shuffles to VPERMD/VPERMPS
llvm-svn: 283080
2016-10-02 21:07:58 +00:00
Sanjoy Das
0ab0771735 [SCEV] Rely on ConstantRange instead of custom logic; NFCI
This was first landed in rL283058 and subsequenlty reverted since a
change this depends on (rL283057) was buggy and had to be reverted.

llvm-svn: 283079
2016-10-02 20:59:10 +00:00
Sanjoy Das
26178861cc [ConstantRange] Make getEquivalentICmp smarter
This change teaches getEquivalentICmp to be smarter about generating
ICMP_NE and ICMP_EQ predicates.

An earlier version of this change was landed as rL283057 which had a
use-after-free bug.  This new version has a fix for that bug, and a (C++
unittests/) test case that would have triggered it rL283057.

llvm-svn: 283078
2016-10-02 20:59:05 +00:00
Simon Pilgrim
cc2b5dd90f [X86][AVX2] Missed opportunities to combine to VPERMD/VPERMPS
llvm-svn: 283077
2016-10-02 20:43:02 +00:00
Simon Pilgrim
5183178ef6 [X86][AVX2] Fix typo in test names
We are testing vpermps not vpermd

llvm-svn: 283076
2016-10-02 19:31:58 +00:00
Yaron Keren
f2a6e8d447 Rangify for loops.
llvm-svn: 283074
2016-10-02 19:21:41 +00:00
Sanjay Patel
4bc7eaba6b [x86] remove 'nan' strings from copysign assertions; NFC
Preemptively scrubbing these to avoid a bot fail as in PR30443:
https://llvm.org/bugs/show_bug.cgi?id=30443

I'm nearly done with a patch to fix these cases, so not trying very
hard to do better for the temporary win. 

I plan to use better checks than what the script produces for the vectorized cases.

llvm-svn: 283072
2016-10-02 17:07:24 +00:00
Sanjay Patel
7153b04318 [x86] add test to show unnecessary scalarization of copysign intrinsics (PR30433)
llvm-svn: 283071
2016-10-02 16:31:35 +00:00
Simon Pilgrim
143637ccb2 [X86][AVX] Ensure broadcast loads respect dependencies
To allow broadcast loads of a non-zero'th vector element, lowerVectorShuffleAsBroadcast can replace a load with a new load with an adjusted address, but unfortunately we weren't ensuring that the new load respected the same dependencies.

This patch adds a TokenFactor and updates all dependencies of the old load to reference the new load instead.

Bug found during internal testing.

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

llvm-svn: 283070
2016-10-02 15:59:15 +00:00
Craig Topper
d5cac20861 [X86] Don't set i64 ADDC/ADDE/SUBC/SUBE as Custom if the target isn't 64-bit. This way we don't have to catch them and do nothing with them in ReplaceNodeResults.
llvm-svn: 283066
2016-10-02 06:13:43 +00:00
Craig Topper
d5126c36f5 [X86] Fix indentation. NFC
llvm-svn: 283065
2016-10-02 06:13:40 +00:00
Sanjoy Das
ce09fb6c0a Revert r283057 and r283058
They've broken the sanitizer-bootstrap bots.  Reverting while I investigate.

Original commit messages:

r283057: "[ConstantRange] Make getEquivalentICmp smarter"

r283058: "[SCEV] Rely on ConstantRange instead of custom logic; NFCI"
llvm-svn: 283062
2016-10-02 02:40:27 +00:00
Hal Finkel
35dddafa6b [PowerPC] Refactor soft-float support, and enable PPC64 soft float
This change enables soft-float for PowerPC64, and also makes soft-float disable
all vector instruction sets for both 32-bit and 64-bit modes. This latter part
is necessary because the PPC backend canonicalizes many Altivec vector types to
floating-point types, and so soft-float breaks scalarization support for many
operations. Both for embedded targets and for operating-system kernels desiring
soft-float support, it seems reasonable that disabling hardware floating-point
also disables vector instructions (embedded targets without hardware floating
point support are unlikely to have Altivec, etc. and operating system kernels
desiring not to use floating-point registers to lower syscall cost are unlikely
to want to use vector registers either). If someone needs this to work, we'll
need to change the fact that we promote many Altivec operations to act on
v4f32. To make it possible to disable Altivec when soft-float is enabled,
hardware floating-point support needs to be expressed as a positive feature,
like the others, and not a negative feature, because target features cannot
have dependencies on the disabling of some other feature. So +soft-float has
now become -hard-float.

Fixes PR26970.

llvm-svn: 283060
2016-10-02 02:10:20 +00:00
Sanjoy Das
48cc33630a Remove duplicated code; NFC
ICmpInst::makeConstantRange does exactly the same thing as
ConstantRange::makeExactICmpRegion.

llvm-svn: 283059
2016-10-02 00:09:57 +00:00
Sanjoy Das
09bd5d6637 [SCEV] Rely on ConstantRange instead of custom logic; NFCI
llvm-svn: 283058
2016-10-02 00:09:52 +00:00
Sanjoy Das
2915cf67fe [ConstantRange] Make getEquivalentICmp smarter
This change teaches getEquivalentICmp to be smarter about generating
ICMP_NE and ICMP_EQ predicates.

llvm-svn: 283057
2016-10-02 00:09:49 +00:00
Sanjoy Das
6b37e26252 [SCEV] Remove commented out code; NFC
llvm-svn: 283056
2016-10-02 00:09:45 +00:00
Martell Malone
99beb5a73c COFF: Fix short import lib import name type bitshift
As per the PE COFF spec (section 8.3, Import Name Type)
Offset: 18 Size 2 bits Name: Type
Offset: 20 Size 3 bits Name: Name Type

Offset: 20 added based on 18+2

Partially commited as rL279069

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

llvm-svn: 283055
2016-10-01 23:10:20 +00:00
Simon Pilgrim
c8c1e1ed53 [X86][SSE] Cleaned up shuffle decode assertion messages
llvm-svn: 283050
2016-10-01 20:12:56 +00:00
Simon Pilgrim
15c3bf66e9 [SLPVectorizer][X86] Added fptosi/fptoui tests
llvm-svn: 283048
2016-10-01 19:35:59 +00:00
Simon Pilgrim
85cdcda83a [CostModel][X86] Added tests for current fptosi/fptoui costs
llvm-svn: 283047
2016-10-01 19:09:59 +00:00
Simon Pilgrim
b14252ccf4 [SLPVectorizer][X86] Added fcopysign tests
llvm-svn: 283046
2016-10-01 17:00:26 +00:00
Simon Pilgrim
04d9993d37 [SLPVectorizer][X86] Added fabs tests
llvm-svn: 283045
2016-10-01 16:54:01 +00:00
Simon Pilgrim
781f5cf02c [CostModel][X86] Added fcopysign costs
llvm-svn: 283044
2016-10-01 16:41:52 +00:00
Mehdi Amini
fb4ac0f217 Use StringRef for MemoryBuffer identifier API (NFC)
llvm-svn: 283043
2016-10-01 16:38:28 +00:00
Simon Pilgrim
b90adcf288 [CostModel][X86] Added fabs costs
llvm-svn: 283042
2016-10-01 16:30:13 +00:00