139067 Commits

Author SHA1 Message Date
Zachary Turner
932630880c Rename Error -> ReportError.
Error conflicts with the llvm::Error datatype, creating
ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:17:18 +00:00
Rafael Espindola
ee3cdffe7e Revert "Use getSize instead of data().size(). NFC."
This reverts commit r283125.

lld needs to be updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 18:01:10 +00:00
Krzysztof Parzyszek
4fbe7c8ae1 [RDF] Further improve readability of the graph
Print target basic block for a branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:54:33 +00:00
Rafael Espindola
1c287c05a6 Use getSize instead of data().size(). NFC.
Also assert isFinalized in getSize(). This just reduces the noise from
another patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283125 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:49:19 +00:00
Lang Hames
420bc5679c [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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:34:56 +00:00
Krzysztof Parzyszek
d1ed87a667 [RDF] Replace RegisterAliasInfo with target-independent code using lane masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 17:14:48 +00:00
Sanjay Patel
7b05e5c94e [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
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 16:38:27 +00:00
Rafael Espindola
da49ba4e37 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 15:51:42 +00:00
Sanjay Patel
097e03386e fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 15:18:36 +00:00
Nirav Dave
3e3a0a0307 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 13:48:27 +00:00
Matt Arsenault
510a4bca2e AMDGPU: Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 13:06:58 +00:00
Matt Arsenault
82f124302e AMDGPU: Fix missing -verify-machineinstrs in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283107 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 12:58:59 +00:00
Simon Pilgrim
d89ff9a37e [X86][SSE] Add PR30371 (shuffle constant folding) test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 12:16:39 +00:00
Volkan Keles
9920e54e99 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 10:31:34 +00:00
Sjoerd Meijer
ec44dc9079 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283098 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 10:12:32 +00:00
Alexey Bataev
6fd795dee8 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283091 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 07:47:01 +00:00
Chris Bieneman
1184da191c [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 04:48:22 +00:00
Chris Bieneman
245ab62a27 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 04:48:18 +00:00
Chris Bieneman
47cdc1615e [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 04:48:13 +00:00
Konstantin Zhuravlyov
4d2168214e [AMDGPU] Remove unused variables from SIOptimizeExecMasking
Differential Revision: https://reviews.llvm.org/D25110


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 04:43:22 +00:00
Hal Finkel
dd1b9ba7a3 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283086 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 04:06:44 +00:00
Craig Topper
8fd6969a8b [AVX-512] Remove isCheapAsAMove flag from VMOVAPSZ128rm_NOVLX and friends.
This was accidentally copy and pasted from other Pseudos in the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 02:22:33 +00:00
Craig Topper
7036cb8dbf [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-03 02:00:29 +00:00
Simon Pilgrim
a96fb0875d [X86][AVX2] Add support for combining target shuffles to VPERMD/VPERMPS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 21:07:58 +00:00
Sanjoy Das
4f64dd990d [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283079 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 20:59:10 +00:00
Sanjoy Das
53936b83aa [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 20:59:05 +00:00
Simon Pilgrim
630a87ab49 [X86][AVX2] Missed opportunities to combine to VPERMD/VPERMPS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 20:43:02 +00:00
Simon Pilgrim
bb9190f8fa [X86][AVX2] Fix typo in test names
We are testing vpermps not vpermd

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283076 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 19:31:58 +00:00
Yaron Keren
c36f8001d2 Rangify for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283074 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 19:21:41 +00:00
Sanjay Patel
892bbf61c7 [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 17:07:24 +00:00
Sanjay Patel
7e696f0f51 [x86] add test to show unnecessary scalarization of copysign intrinsics (PR30433)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 16:31:35 +00:00
Simon Pilgrim
9d7b8dc59c [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 15:59:15 +00:00
Craig Topper
a8c3c60282 [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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 06:13:43 +00:00
Craig Topper
ca641f3453 [X86] Fix indentation. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 06:13:40 +00:00
Sanjoy Das
d3000982c5 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"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 02:40:27 +00:00
Hal Finkel
4c305bebf0 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 02:10:20 +00:00
Sanjoy Das
f6a95d4da8 Remove duplicated code; NFC
ICmpInst::makeConstantRange does exactly the same thing as
ConstantRange::makeExactICmpRegion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 00:09:57 +00:00
Sanjoy Das
afbfbca525 [SCEV] Rely on ConstantRange instead of custom logic; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 00:09:52 +00:00
Sanjoy Das
4e4cf39e46 [ConstantRange] Make getEquivalentICmp smarter
This change teaches getEquivalentICmp to be smarter about generating
ICMP_NE and ICMP_EQ predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 00:09:49 +00:00
Sanjoy Das
ca07d004ab [SCEV] Remove commented out code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283056 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-02 00:09:45 +00:00
Martell Malone
d17dee59d1 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283055 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 23:10:20 +00:00
Simon Pilgrim
ec8ee2ad55 [X86][SSE] Cleaned up shuffle decode assertion messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 20:12:56 +00:00
Simon Pilgrim
1b1483174c [SLPVectorizer][X86] Added fptosi/fptoui tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 19:35:59 +00:00
Simon Pilgrim
065e5924cd [CostModel][X86] Added tests for current fptosi/fptoui costs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 19:09:59 +00:00
Simon Pilgrim
a94243b44f [SLPVectorizer][X86] Added fcopysign tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 17:00:26 +00:00
Simon Pilgrim
4a24b140e7 [SLPVectorizer][X86] Added fabs tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 16:54:01 +00:00
Simon Pilgrim
1df457ad5e [CostModel][X86] Added fcopysign costs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 16:41:52 +00:00
Mehdi Amini
793d2a4ced Use StringRef for MemoryBuffer identifier API (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 16:38:28 +00:00
Simon Pilgrim
089e03e79a [CostModel][X86] Added fabs costs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283042 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 16:30:13 +00:00
Simon Pilgrim
fc651f7cc1 Fix signed/unsigned warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283041 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 16:14:57 +00:00