oota-llvm.git
8 years agoTypo. NFC.
Chad Rosier [Fri, 4 Sep 2015 12:34:55 +0000 (12:34 +0000)]
Typo. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246851 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSimplify testcase added in r246759. NFC
Silviu Baranga [Fri, 4 Sep 2015 11:37:20 +0000 (11:37 +0000)]
Simplify testcase added in r246759. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246848 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC] Replace comparison with isUInt<32>.
David Majnemer [Fri, 4 Sep 2015 07:22:36 +0000 (07:22 +0000)]
[MC] Replace comparison with isUInt<32>.

Casting to unsigned long can cause the time to get truncated to 32-bits,
making it appear to be a valid timestamp.  Just use isUInt<32> instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246840 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWinCOFFObjectWriter.cpp: Appease a warning in checking std::time_t. [-Wsign-compare]
NAKAMURA Takumi [Fri, 4 Sep 2015 05:19:37 +0000 (05:19 +0000)]
WinCOFFObjectWriter.cpp: Appease a warning in checking std::time_t. [-Wsign-compare]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246839 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix APInt value initialization to give a zero value as any sane integer type
Richard Smith [Fri, 4 Sep 2015 04:08:36 +0000 (04:08 +0000)]
Fix APInt value initialization to give a zero value as any sane integer type
should, rather than giving a broken value that doesn't even zero/sign-extend
properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246836 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix the testcase in r246790
Steven Wu [Fri, 4 Sep 2015 01:39:24 +0000 (01:39 +0000)]
Fix the testcase in r246790

Using generic neon syntax to avoid test failure on apple platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246833 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] when a single mutation fails try a few more times with other mutations...
Kostya Serebryany [Fri, 4 Sep 2015 00:40:29 +0000 (00:40 +0000)]
[libFuzzer] when a single mutation fails try a few more times with other mutations before returning un-mutated data

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246828 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] actually make the dictionaries work (+docs)
Kostya Serebryany [Fri, 4 Sep 2015 00:12:11 +0000 (00:12 +0000)]
[libFuzzer] actually make the dictionaries work (+docs)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246825 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Enable interleaved-access vectorization
Hal Finkel [Fri, 4 Sep 2015 00:10:41 +0000 (00:10 +0000)]
[PowerPC] Enable interleaved-access vectorization

This adds a basic cost model for interleaved-access vectorization (and a better
default for shuffles), and enables interleaved-access vectorization by default.
The relevant difference from the default cost model for interleaved-access
vectorization, is that on PPC, the shuffles that end up being used are *much*
cheaper than modeling the process with insert/extract pairs (which are
quite expensive, especially on older cores).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246824 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Always use aggressive interleaving on the A2
Hal Finkel [Thu, 3 Sep 2015 23:23:00 +0000 (23:23 +0000)]
[PowerPC] Always use aggressive interleaving on the A2

On the A2, with an eye toward QPX unaligned-load merging, we should always use
aggressive interleaving. It is generally superior to only using concatenation
unrolling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246819 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Try harder to find a base+offset when looking for consecutive accesses
Hal Finkel [Thu, 3 Sep 2015 22:37:44 +0000 (22:37 +0000)]
[PowerPC] Try harder to find a base+offset when looking for consecutive accesses

When forming permutation-based unaligned vector loads, we need to know whether
it is valid to read ahead of the requested address by a full vector length.
Doing so is more efficient (and allows for more CSE with later loads), but
could trigger a page fault if invalid. To determine validity, we look for other
loads in the same block that access the relevant address range.

The relevant point here is that we need to do this as part of the process of
forming permutation-based vector loads, and this happens quite early in the
SDAG pipeline - specifically before many of the address calculations are fully
canonicalized. As a result, we need to try harder to recognize base+offset
address computations, because they still might appear as chain of adds
(base+offset+offset, for example). To account for this, we'll look through
chains of adds, accumulating the constant offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246813 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[IR] Have AttrBuilder::clear clear `TargetDepAttrs`.
Sanjoy Das [Thu, 3 Sep 2015 22:27:42 +0000 (22:27 +0000)]
[IR] Have AttrBuilder::clear clear `TargetDepAttrs`.

Test case attached -- currently the parser smears the "foo bar" to all
of the formal arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246812 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Extract common code, comment, and fix a build warning ...
Philip Reames [Thu, 3 Sep 2015 21:57:40 +0000 (21:57 +0000)]
[RewriteStatepointsForGC] Extract common code, comment, and fix a build warning [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246810 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Strengthen invariants around BDVs
Philip Reames [Thu, 3 Sep 2015 21:34:30 +0000 (21:34 +0000)]
[RewriteStatepointsForGC] Strengthen invariants around BDVs

As a first step towards a new implementation of the base pointer inference algorithm, introduce an abstraction for BDVs, strengthen the assertions around them, and rewrite the BDV relation code in terms of the abstraction which includes an explicit notion of whether the BDV is also a base. The later is motivated by the fact we had a bug where insertelement was always assumed to be a base pointer even though the BDV code knew it wasn't. The strengthened assertions in this patch would have caught that bug.

The next step will be to separate the DefiningValueMap into a BDV use list cache (entirely within findBasePointers) and a base pointer cache. Having the former will allow me to use a deterministic visit order when visiting BDVs in the inference algorithm and remove a bunch of ordering related hacks. Before actually doing the last step, I'm likely going to extend the lattice with a 'BaseN' (seen only base inputs) state so that I can kill the post process optimization step.

Phabricator Revision: http://reviews.llvm.org/D12608

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246809 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] refactor the mutation functions so that they are now methods of a class...
Kostya Serebryany [Thu, 3 Sep 2015 21:24:19 +0000 (21:24 +0000)]
[libFuzzer] refactor the mutation functions so that they are now methods of a class. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246808 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Include the permutation cost for unaligned vector loads
Hal Finkel [Thu, 3 Sep 2015 21:23:18 +0000 (21:23 +0000)]
[PowerPC] Include the permutation cost for unaligned vector loads

Pre-P8, when we generate code for unaligned vector loads (for Altivec and QPX
types), even when accounting for the combining that takes place for multiple
consecutive such loads, there is at least one load instructions and one
permutation for each load. Make sure the cost reported reflects the cost of the
permutes as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246807 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Compute the MMO offset for an unaligned load with signed arithmetic
Hal Finkel [Thu, 3 Sep 2015 21:12:15 +0000 (21:12 +0000)]
[PowerPC] Compute the MMO offset for an unaligned load with signed arithmetic

If you compute the MMO offset using unsigned arithmetic, you end up with a
large positive offset instead of a small negative one. In theory, this could
cause bad instruction-scheduling decisions later.

I noticed this by inspection from the debug output, and using that for the
regression test is the best I can do right now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246805 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Workaround a lack of determinism in visit order
Philip Reames [Thu, 3 Sep 2015 20:24:29 +0000 (20:24 +0000)]
[RewriteStatepointsForGC] Workaround a lack of determinism in visit order

The visit order being used in the base pointer inference algorithm is currently non-deterministic.  When working on http://reviews.llvm.org/D12583, I discovered that we were relying on a peephole optimization to get deterministic ordering in one of the test cases.

This change is intented to let me test and land http://reviews.llvm.org/D12583.  The current code will not be long lived.  I'm starting to investigate a rewrite of the algorithm which will combine the post-process step into the initial algorithm and make the visit order determistic.  Before doing that, I wanted to make sure the existing code was complete and the test were stable.  Hopefully, patches should be up for review for the new algorithm this week or early next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246801 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] adding a parser for AFL-style dictionaries + tests.
Kostya Serebryany [Thu, 3 Sep 2015 20:23:46 +0000 (20:23 +0000)]
[libFuzzer] adding a parser for AFL-style dictionaries + tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246800 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sancov] Disable sanitizer coverage on functions using SEH
Reid Kleckner [Thu, 3 Sep 2015 20:18:29 +0000 (20:18 +0000)]
[sancov] Disable sanitizer coverage on functions using SEH

Splitting basic blocks really messes up WinEHPrepare. We can remove this
change when SEH uses the new EH IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246799 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agollvm.vim: 'musttail' is a keyword too
Jonathan Roelofs [Thu, 3 Sep 2015 20:10:40 +0000 (20:10 +0000)]
llvm.vim: 'musttail' is a keyword too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246798 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTry to clarify the semantics of fptrunc
Dan Liew [Thu, 3 Sep 2015 18:43:56 +0000 (18:43 +0000)]
Try to clarify the semantics of fptrunc

* ``the value cannot fit within the destination type`` is ambiguous.
  It could mean overflow, underflow (not in the IEEE-754 sense) or a
  result that cannot be exactly represented and requires rounding or it
  could mean some combination of these. The semantics now state it means
  overflow **only**.

* Using "truncation" in the semantics is very misleading given that it
  doesn't necessarily truncate (i.e. round to zero). For example on
  x86_64 with SSE2 this is currently mapped to cvtsd2ss instruction
  who's rounding behaviour is dependent on the MXCSR register which
  is usually set to round to nearest even by default. The semantics
  now state that the rounding mode is undefined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246792 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Improve ISel using across lane addition reduction.
Chad Rosier [Thu, 3 Sep 2015 18:13:57 +0000 (18:13 +0000)]
[AArch64] Improve ISel using across lane addition reduction.

In vectorized add reduction code, the final "reduce" step is sub-optimal.
This change wll combine :

ext  v1.16b, v0.16b, v0.16b, #8
add  v0.4s, v1.4s, v0.4s
dup  v1.4s, v0.s[1]
add  v0.4s, v1.4s, v0.4s

into

addv s0, v0.4s

PR21371
http://reviews.llvm.org/D12325
Patch by Jun Bum Lim <junbuml@codeaurora.org>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246790 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj] Dump MachO indirect symbols.
Davide Italiano [Thu, 3 Sep 2015 18:10:28 +0000 (18:10 +0000)]
[llvm-readobj] Dump MachO indirect symbols.

Example output:

File: <stdin>
Format: Mach-O 32-bit i386
Arch: i386
AddressSize: 32bit
Indirect Symbols {

Number: 3
Symbols [
  Entry {
    Entry Index: 0
    Symbol Index: 0x4
  }
  Entry {
    Entry Index: 1
    Symbol Index: 0x0
  }
  Entry {
    Entry Index: 2
    Symbol Index: 0x1
  }
]
}

Differential Revision: http://reviews.llvm.org/D12570

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246789 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAllow global address space forward decls using IDs in .ll files.
Karl Schimpf [Thu, 3 Sep 2015 18:06:44 +0000 (18:06 +0000)]
Allow global address space forward decls using IDs in .ll files.

Summary:
This fixes bugzilla bug 24656. Fixes the case where there is a forward
reference to a global variable using an ID (i.e. @0). It does this by
passing the address space of the initializer pointer for which the
forward referenced global is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246788 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Add a test case for revision 243956.
Quentin Colombet [Thu, 3 Sep 2015 16:49:18 +0000 (16:49 +0000)]
[ARM] Add a test case for revision 243956.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246785 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSink COFF.h MC include into .cpp files
Reid Kleckner [Thu, 3 Sep 2015 16:41:50 +0000 (16:41 +0000)]
Sink COFF.h MC include into .cpp files

This prevents MC clients from getting COFF.h, which conflicts with
winnt.h macros. Also a minor IWYU cleanup. Now the only public headers
including COFF.h are in Object, and they actually need it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246784 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[AArch64] Improve load/store optimizer to handle LDUR + LDR."
Chad Rosier [Thu, 3 Sep 2015 16:41:28 +0000 (16:41 +0000)]
Revert "[AArch64] Improve load/store optimizer to handle LDUR + LDR."

This reverts commit r246769.

This appears to have broken Multisource/Benchmarks/tramp3d-v4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246782 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] enable machine combiner reassociations for scalar 'xor' insts
Sanjay Patel [Thu, 3 Sep 2015 16:36:16 +0000 (16:36 +0000)]
[x86] enable machine combiner reassociations for scalar 'xor' insts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246781 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix assertion failure in LLParser::ConvertValIDToValue
Karl Schimpf [Thu, 3 Sep 2015 16:18:32 +0000 (16:18 +0000)]
Fix assertion failure in LLParser::ConvertValIDToValue

Summary:
Fixes bug 24645. Problem appears to be that the type may be undefined
when ConvertValIDToValue is called.

Reviewers: kcc

Subscribers: llvm-commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246779 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove binary characters from test file.
Karl Schimpf [Thu, 3 Sep 2015 15:41:38 +0000 (15:41 +0000)]
Remove binary characters from test file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246775 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix SEGV in InlineAsm::ConstraintInfo::Parse.
Karl Schimpf [Thu, 3 Sep 2015 15:41:37 +0000 (15:41 +0000)]
Fix SEGV in InlineAsm::ConstraintInfo::Parse.

Summary:
Fixes bug 24646. Previous code was not checking if an index into a vector
was valid, resulting in a SEGV. Fixed by assuming the construct can't
be parsed when given this input.

Reformat and add test.

Differential Revision: http://reviews.llvm.org/D12539

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246774 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix SEGV in InlineAsm::ConstraintInfo::Parse.
Karl Schimpf [Thu, 3 Sep 2015 15:41:34 +0000 (15:41 +0000)]
Fix SEGV in InlineAsm::ConstraintInfo::Parse.

Fixes bug 24646. Previous code was not checking if an index into a vector
was valid, resulting in a SEGV. Fixed by assuming the construct can't
be parsed when given this input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246773 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agocheck for fastness before merging in DAGCombiner::MergeConsecutiveStores()
Sanjay Patel [Thu, 3 Sep 2015 15:03:19 +0000 (15:03 +0000)]
check for fastness before merging in DAGCombiner::MergeConsecutiveStores()

Use and check the 'IsFast' optional parameter to TLI.allowsMemoryAccess() any time
we have a merged access candidate. Without this patch, we were generating unaligned
16-byte (SSE) memops for x86 targets where those accesses are slow.

This change was mentioned in:
http://reviews.llvm.org/D10662 and
http://reviews.llvm.org/D10905

and will help solve PR21711.

Differential Revision: http://reviews.llvm.org/D12573

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246771 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Improve load/store optimizer to handle LDUR + LDR.
Chad Rosier [Thu, 3 Sep 2015 14:41:37 +0000 (14:41 +0000)]
[AArch64] Improve load/store optimizer to handle LDUR + LDR.

This patch allows the mixing of scaled and unscaled load/stores to form
load/store pairs.

PR24465
http://reviews.llvm.org/D12116
Many thanks to Ahmed and Michael for fixes and code review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246769 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Reuse MayLoad. NFC.
Chad Rosier [Thu, 3 Sep 2015 14:19:43 +0000 (14:19 +0000)]
[AArch64] Reuse MayLoad. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246767 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Added support for the div, divu, ddiv and ddivu macros which use traps and...
Daniel Sanders [Thu, 3 Sep 2015 12:31:22 +0000 (12:31 +0000)]
[mips] Added support for the div, divu, ddiv and ddivu macros which use traps and breaks in the integrated assembler.

Summary:

Patch by Scott Egerton

Reviewers: vkalintiris, dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246763 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix IRBuilder CreateBitOrPointerCast for vector types
Silviu Baranga [Thu, 3 Sep 2015 11:36:39 +0000 (11:36 +0000)]
Fix IRBuilder CreateBitOrPointerCast for vector types

Summary:
This function was not taking into account that the
input type could be a vector, and wasn't properly
working for vector types.

This caused an assert when building spec2k6 perlbmk for armv8.

Reviewers: rengolin, mzolotukhin

Subscribers: silviu.baranga, mzolotukhin, rengolin, eugenis, jmolloy, aemerson, llvm-commits

Differential Revision: http://reviews.llvm.org/D12559

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246759 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Docs] Fix Sphinx warning
Joseph Tremoulet [Thu, 3 Sep 2015 09:33:54 +0000 (09:33 +0000)]
[Docs] Fix Sphinx warning

Title underline was too short.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246754 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WinEH] Add llvm.eh.exceptionpointer intrinsic
Joseph Tremoulet [Thu, 3 Sep 2015 09:15:32 +0000 (09:15 +0000)]
[WinEH] Add llvm.eh.exceptionpointer intrinsic

Summary:
This intrinsic can be used to extract a pointer to the exception caught by
a given catchpad.  Its argument has token type and must be a `catchpad`.

Also clarify ExtendingLLVM documentation regarding overloaded intrinsics.

Reviewers: majnemer, andrew.w.kaylor, sanjoy, rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12533

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246752 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WinEH] Add cleanupendpad instruction
Joseph Tremoulet [Thu, 3 Sep 2015 09:09:43 +0000 (09:09 +0000)]
[WinEH] Add cleanupendpad instruction

Summary:
Add a `cleanupendpad` instruction, used to mark exceptional exits out of
cleanups (for languages/targets that can abort a cleanup with another
exception).  The `cleanupendpad` instruction is similar to the `catchendpad`
instruction in that it is an EH pad which is the target of unwind edges in
the handler and which itself has an unwind edge to the next EH action.
The `cleanupendpad` instruction, similar to `cleanupret` has a `cleanuppad`
argument indicating which cleanup it exits.  The unwind successors of a
`cleanuppad`'s `cleanupendpad`s must agree with each other and with its
`cleanupret`s.

Update WinEHPrepare (and docs/tests) to accomodate `cleanupendpad`.

Reviewers: rnk, andrew.w.kaylor, majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12433

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246751 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Implemented encoding and intrinsics for vplzcntq, vplzcntd, vpconflictq,...
Igor Breger [Thu, 3 Sep 2015 09:05:31 +0000 (09:05 +0000)]
AVX512: Implemented encoding and intrinsics for vplzcntq, vplzcntd, vpconflictq, vpconflictd
Added tests for intrinsics and encoding.

Differential Revision: http://reviews.llvm.org/D11931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246750 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTweak llvm/test/tools/gold/X86/parallel.ll to run with pthread-unaware ld.gold on...
NAKAMURA Takumi [Thu, 3 Sep 2015 00:48:59 +0000 (00:48 +0000)]
Tweak llvm/test/tools/gold/X86/parallel.ll to run with pthread-unaware ld.gold on Linux.

If ld.gold is configured without --enable-thread, ld.gold might not load libpthread.so.
Preloading LLVMgold.so loads also libpthread.so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246739 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MergeFuncs] Efficiently defer functions on merge
JF Bastien [Wed, 2 Sep 2015 23:55:23 +0000 (23:55 +0000)]
[MergeFuncs] Efficiently defer functions on merge

Summary:
This patch introduces a side table in Merge Functions to
efficiently remove functions from the function set when functions
they refer to are merged. Previously these functions would need to
be compared lg(N) times to find the appropriate FunctionNode in the
tree to defer. With the recent determinism changes, this comparison
is more expensive. In addition, the removal function would not always
actually remove the function from the set (i.e. after remove(F),
there would sometimes still be a node in the tree which contains F).

With these changes, these functions are properly deferred, and so more
functions can be merged. In addition, when there are many merged
functions (and thus more deferred functions), there is a speedup:

chromium: 48678 merged -> 49380 merged; 6.58s -> 5.49s
libxul.so: 41004 merged -> 41030 merged; 8.02s -> 6.94s
mysqld: 1607 merged -> 1607 merged (same); 0.215s -> 0.212s (probably noise)

Author: jrkoenig
Reviewers: jfb, dschuff
Subscribers: llvm-commits, nlewycky
Differential revision: http://reviews.llvm.org/D12537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246735 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] deprecate the -tokens flag. This was a bad idea because the corpus with...
Kostya Serebryany [Wed, 2 Sep 2015 23:27:39 +0000 (23:27 +0000)]
[libFuzzer] deprecate the -tokens flag. This was a bad idea because the corpus with this flag contains encrypted inputs, not the real inputs, which complicates interoperation with other fuzzers. Instead we'll need to implement AFL dictionary support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246734 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Require 32-byte alignment for 32-byte VMOVNTs.
Ahmed Bougacha [Wed, 2 Sep 2015 23:25:39 +0000 (23:25 +0000)]
[X86] Require 32-byte alignment for 32-byte VMOVNTs.

We used to accept (and even test, and generate) 16-byte alignment
for 32-byte nontemporal stores, but they require 32-byte alignment,
per SDM. Found by inspection.

Instead of hardcoding 16 in the patfrag, check for natural alignment.
Also fix the autoupgrade and the various tests.

Also, use explicit -mattr instead of -mcpu: I stared at the output
several minutes wondering why I get 2x movntps for the unaligned
case (which is the ideal output, but needs some work: see FIXME),
until I remembered corei7-avx implies +slow-unaligned-mem-32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246733 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd Myriad into enum VendorType
Douglas Katzman [Wed, 2 Sep 2015 23:11:25 +0000 (23:11 +0000)]
Add Myriad into enum VendorType

Differential Revision: http://reviews.llvm.org/D12540

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246732 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Cleanup nontemporal tests a little. NFC.
Ahmed Bougacha [Wed, 2 Sep 2015 22:47:09 +0000 (22:47 +0000)]
[X86] Cleanup nontemporal tests a little. NFC.

Also: add a missing test for movntiq.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246730 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIR: Remove an unused AssemblyWriter constructor. NFC
Justin Bogner [Wed, 2 Sep 2015 22:46:15 +0000 (22:46 +0000)]
IR: Remove an unused AssemblyWriter constructor. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246729 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] remove the section about '-tokens' as I am going to deprecate this option
Kostya Serebryany [Wed, 2 Sep 2015 22:44:46 +0000 (22:44 +0000)]
[libFuzzer] remove the section about '-tokens' as I am going to deprecate this option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246728 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Delete stale comment [NFC]
Philip Reames [Wed, 2 Sep 2015 22:35:42 +0000 (22:35 +0000)]
[RewriteStatepointsForGC] Delete stale comment [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246722 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Pull a function out of anon namespace [NFC]
Philip Reames [Wed, 2 Sep 2015 22:30:53 +0000 (22:30 +0000)]
[RewriteStatepointsForGC] Pull a function out of anon namespace [NFC]

Thanks to David Blaikie for noticing in previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246721 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIR: Remove a redundant function. NFC
Justin Bogner [Wed, 2 Sep 2015 22:28:47 +0000 (22:28 +0000)]
IR: Remove a redundant function. NFC

Function::print isn't interestingly different from Value::print. Just
let the only caller (in PrintCallGraphPass) call the Value version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246720 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Cleanup nontemporal fragments. NFCI.
Ahmed Bougacha [Wed, 2 Sep 2015 22:27:38 +0000 (22:27 +0000)]
[X86] Cleanup nontemporal fragments. NFCI.

We can chain other fragments to avoid repeating conditions.
This also fixes a potential bug (that realistically can't happen),
where we would match indexed nontemporal stores for i32/i64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246719 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Bugfix for change 246133
Philip Reames [Wed, 2 Sep 2015 22:25:07 +0000 (22:25 +0000)]
[RewriteStatepointsForGC] Bugfix for change 246133

Fix a bug in change 246133. I didn't handle the case where we had a cycle in the use graph and could add an instruction we were about to erase back on to the worklist. Oddly, I have not been able to write a small test case for this, even with the AssertingVH added. I have confirmed the basic theory for the fix on a large failing example, but all attempts to reduce that to something appropriate for a test case have failed.

Differential Revision: http://reviews.llvm.org/D12575

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246718 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix release build warning for unused function
Philip Reames [Wed, 2 Sep 2015 21:57:17 +0000 (21:57 +0000)]
Fix release build warning for unused function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246717 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RewriteStatepointsForGC] Improve debug output [NFC]
Philip Reames [Wed, 2 Sep 2015 21:11:44 +0000 (21:11 +0000)]
[RewriteStatepointsForGC] Improve debug output [NFC]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246713 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Cleanup cost model for unaligned vector loads/stores
Hal Finkel [Wed, 2 Sep 2015 21:03:28 +0000 (21:03 +0000)]
[PowerPC] Cleanup cost model for unaligned vector loads/stores

I'm adding a regression test to better cover code generation for unaligned
vector loads and stores, but there's no functional change to the code
generation here. There is an improvement to the cost model for unaligned vector
loads and stores, mostly for QPX (for which we were not previously accounting
for the permutation-based loads), and the cost model implementation is cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246712 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove twice-repeated clang path operation into a new function.
Douglas Katzman [Wed, 2 Sep 2015 21:02:10 +0000 (21:02 +0000)]
Move twice-repeated clang path operation into a new function.

And make it more robust in the edge case of exactly "./" as input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246711 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSmall docs fix
Piotr Padlewski [Wed, 2 Sep 2015 20:33:16 +0000 (20:33 +0000)]
Small docs fix

http://reviews.llvm.org/D12572

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246705 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lit] Add basic flaky test retry functionality
Reid Kleckner [Wed, 2 Sep 2015 20:32:41 +0000 (20:32 +0000)]
[lit] Add basic flaky test retry functionality

The plan is to use this for the sanitizer test suite on Windows.  See
PR24554 for more details on why we need this.

Tested manually by injecting rand() into a sanitizer test and watching
what it does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246704 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoassuem(X) handling in GVN bugfix
Piotr Padlewski [Wed, 2 Sep 2015 20:00:03 +0000 (20:00 +0000)]
assuem(X) handling in GVN bugfix

There was infinite loop because it was trying to change assume(true) into
assume(true)
Also added handling when assume(false) appear

http://reviews.llvm.org/D12516

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246697 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoConstant propagation after hitting assume(cmp) bugfix
Piotr Padlewski [Wed, 2 Sep 2015 19:59:59 +0000 (19:59 +0000)]
Constant propagation after hitting assume(cmp) bugfix

Last time code run into assertion `BBE.isSingleEdge()` in
lib/IR/Dominators.cpp:200.

http://reviews.llvm.org/D12170

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246696 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoConstant propagation after hiting llvm.assume
Piotr Padlewski [Wed, 2 Sep 2015 19:59:53 +0000 (19:59 +0000)]
Constant propagation after hiting llvm.assume

After hitting @llvm.assume(X) we can:
- propagate equality that X == true
- if X is icmp/fcmp (with eq operation), and one of operand
  is constant we can change all variables with constants in the same BasicBlock

http://reviews.llvm.org/D11918

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246695 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RemoveDuplicatePHINodes] Start over after removing a PHI.
Benjamin Kramer [Wed, 2 Sep 2015 19:52:23 +0000 (19:52 +0000)]
[RemoveDuplicatePHINodes] Start over after removing a PHI.

This makes RemoveDuplicatePHINodes more effective and fixes an assertion
failure. Triggering the assertions requires a DenseSet reallocation
so this change only contains a constructive test.

I'll explain the issue with a small example. In the following function
there's a duplicate PHI, %4 and %5 are identical. When this is found
the DenseSet in RemoveDuplicatePHINodes contains %2, %3 and %4.

define void @F() {
  br label %1

; <label>:1                                       ; preds = %1, %0
  %2 = phi i32 [ 42, %0 ], [ %4, %1 ]
  %3 = phi i32 [ 42, %0 ], [ %5, %1 ]
  %4 = phi i32 [ 42, %0 ], [ 23, %1 ]
  %5 = phi i32 [ 42, %0 ], [ 23, %1 ]
  br label %1
}

after RemoveDuplicatePHINodes runs the function looks like this. %3 has
changed and is now identical to %2, but RemoveDuplicatePHINodes never
saw this.

define void @F() {
  br label %1

; <label>:1                                       ; preds = %1, %0
  %2 = phi i32 [ 42, %0 ], [ %4, %1 ]
  %3 = phi i32 [ 42, %0 ], [ %4, %1 ]
  %4 = phi i32 [ 42, %0 ], [ 23, %1 ]
  br label %1
}

If the DenseSet does a reallocation now it will reinsert all
keys and stumble over %3 now having a different hash value than it had
when inserted into the map for the first time. This change clears the
set whenever a PHI is deleted and starts the progress from the
beginning, allowing %3 to be deleted and avoiding inconsistent DenseSet
state. This potentially has a negative performance impact because
it rescans all PHIs, but I don't think that this ever makes a difference
in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246694 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix underline
Sanjay Patel [Wed, 2 Sep 2015 19:35:31 +0000 (19:35 +0000)]
fix underline

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246693 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse "unpredictable" metadata in fast-isel when splitting compares
Sanjay Patel [Wed, 2 Sep 2015 19:23:23 +0000 (19:23 +0000)]
use "unpredictable" metadata in fast-isel when splitting compares

This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch.

Differential Revision: http://reviews.llvm.org/D12342

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246692 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse "unpredictable" metadata in SelectionDAG when splitting compares
Sanjay Patel [Wed, 2 Sep 2015 19:17:25 +0000 (19:17 +0000)]
use "unpredictable" metadata in SelectionDAG when splitting compares

This patch uses the metadata defined in D12341 to avoid creating an unpredictable branch.

Differential Revision: http://reviews.llvm.org/D12343

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246691 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] honour -only_ascii=1 when reading the initial corpus. Also, remove ugly...
Kostya Serebryany [Wed, 2 Sep 2015 19:08:08 +0000 (19:08 +0000)]
[libFuzzer] honour -only_ascii=1 when reading the initial corpus. Also, remove ugly #ifdef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246689 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd unpredictable metadata type for control flow
Sanjay Patel [Wed, 2 Sep 2015 19:06:43 +0000 (19:06 +0000)]
add unpredictable metadata type for control flow

This patch defines 'unpredictable' metadata. This metadata can be used to signal to the optimizer
or backend that a branch or switch is unpredictable, and therefore, it's probably better to not
split a compound predicate into multiple branches such as in CodeGenPrepare::splitBranchCondition().

This was discussed in:
https://llvm.org/bugs/show_bug.cgi?id=23827

Dependent patches to alter codegen and expose this in clang to follow.

Differential Revision; http://reviews.llvm.org/D12341

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246688 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] More consistently separate asm opc and operands with '\t'.
Ahmed Bougacha [Wed, 2 Sep 2015 18:52:54 +0000 (18:52 +0000)]
[AArch64] More consistently separate asm opc and operands with '\t'.

Somehow missed these in r246686.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246687 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Consistently separate asm opc and operands with '\t'.
Ahmed Bougacha [Wed, 2 Sep 2015 18:38:36 +0000 (18:38 +0000)]
[AArch64] Consistently separate asm opc and operands with '\t'.

Some of the instructions use ' ', which drives OCD-me nuts.
Let's put an end to this.

NFC-ish: hopefully nobody cares about whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246686 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agotest: Only warn about missing substitutions for required tools
Justin Bogner [Wed, 2 Sep 2015 18:03:01 +0000 (18:03 +0000)]
test: Only warn about missing substitutions for required tools

Every time lit is invoked, I get warnings like so:

  lit.py: lit.cfg:286: note: Did not find llvm-go in /Users/bogner/build/llvm/./bin
  lit.py: lit.cfg:286: note: Did not find Kaleidoscope-Ch3 in /Users/bogner/build/llvm/./bin

Since these tools are only built in certain configs, these warnings
are superfluous. Change it so that we only warn about tools that are
built in all configs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246684 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIR: Invert a condition to make it more legible. NFC
Justin Bogner [Wed, 2 Sep 2015 17:54:41 +0000 (17:54 +0000)]
IR: Invert a condition to make it more legible. NFC

Also updates the style to more modern conventions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246681 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ValueTracking] Minor comment change in test
James Molloy [Wed, 2 Sep 2015 17:29:54 +0000 (17:29 +0000)]
[ValueTracking] Minor comment change in test

This test was updated in r246678 - fix a copypasta in a comment noticed post-commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246679 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ValueTracking] Look through casts when both operands are casts.
James Molloy [Wed, 2 Sep 2015 17:25:25 +0000 (17:25 +0000)]
[ValueTracking] Look through casts when both operands are casts.

We only looked through casts when one operand was a constant. We can also look through casts when both operands are non-constant, but both are in fact the same cast type. For example:

%1 = icmp ult i8 %a, %b
%2 = zext i8 %a to i32
%3 = zext i8 %b to i32
%4 = select i1 %1, i32 %2, i32 %3

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246678 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-reaodbj] Simplify code. No functional change (intended).
Davide Italiano [Wed, 2 Sep 2015 16:53:25 +0000 (16:53 +0000)]
[llvm-reaodbj] Simplify code. No functional change (intended).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246676 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Don't always consider P8Altivec-only masks in LowerVECTOR_SHUFFLE
Hal Finkel [Wed, 2 Sep 2015 16:52:37 +0000 (16:52 +0000)]
[PowerPC] Don't always consider P8Altivec-only masks in LowerVECTOR_SHUFFLE

LowerVECTOR_SHUFFLE needs to decide whether to pass a vector shuffle off to the
TableGen-generated matching code, and it does this by testing the same
predicates used by the TableGen files. Unfortunately, when we added new
P8Altivec-only predicates, we started universally testing them in
LowerVECTOR_SHUFFLE, and if then matched when targeting a system prior to a P8,
we'd end up with a selection failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246675 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReapply r246012 [dsymutil] Emit real dSYM companion binaries.
Frederic Riss [Wed, 2 Sep 2015 16:49:13 +0000 (16:49 +0000)]
Reapply r246012 [dsymutil] Emit real dSYM companion binaries.

With a fix for big endian machines. Thanks to Daniel Sanders for the debugging!

Original commit message:

The binaries containing the linked DWARF generated by dsymutil are not
standard relocatable object files like emitted did previsously. They should be
dSYM companion files, which means they have a different file type in the
header, but also a couple other peculiarities:
 - they contain the segments and sections from the original binary in their
load commands, but not the actual contents. This means they get an address
and a size, but their offset is always 0 (but these are not virtual sections)
 - they also conatin all the defined symbols from the original binary

This makes MC a really bad fit to emit these kind of binaries. The approach
that was used in this patch is to leverage MC's section layout for the
debug sections, but to use a replacement for MachObjectWriter that lives
in MachOUtils.cpp. Some of the low-level helpers from MachObjectWriter
were reused too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246673 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj] MachO: Dump segment command.
Davide Italiano [Wed, 2 Sep 2015 16:24:24 +0000 (16:24 +0000)]
[llvm-readobj] MachO: Dump segment command.

Example output:

File: <stdin>
Format: Mach-O arm
Arch: arm
AddressSize: 32bit
Segment {
  Cmd: LC_SEGMENT
  Name:
  Size: 260
  vmaddr: 0x0
  vmsize: 0x10
  fileoff: 408
  filesize: 408
  maxprot: rwx
  initprot: rwx
  nsects: 3
  flags: 0x0
}

Differential Revision:  http://reviews.llvm.org/D12542

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246665 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMCAssembler.h: Prune unused \param since r246604. [-Wdocumentation]
NAKAMURA Takumi [Wed, 2 Sep 2015 16:21:27 +0000 (16:21 +0000)]
MCAssembler.h: Prune unused \param since r246604. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246664 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accesses
Sanjay Patel [Wed, 2 Sep 2015 15:42:49 +0000 (15:42 +0000)]
[x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accesses

This is a continuation of the fix from:
http://reviews.llvm.org/D10662

and discussion in:
http://reviews.llvm.org/D12154

Here, we distinguish slow unaligned SSE (128-bit) accesses from slow unaligned
scalar (64-bit and under) accesses. Other lowering (eg, getOptimalMemOpType)
assumes that unaligned scalar accesses are always ok, so this changes
allowsMisalignedMemoryAccesses() to match that behavior.

Differential Revision: http://reviews.llvm.org/D12543

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246658 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPass a symbol table to getRelocationSymbol instead of returning one.
Rafael Espindola [Wed, 2 Sep 2015 15:07:39 +0000 (15:07 +0000)]
Pass a symbol table to getRelocationSymbol instead of returning one.

This removes a report_fatal_error from library and avoids checking a
section property for every section entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246656 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512VLBW] add support in byte shift and SAD
Asaf Badouh [Wed, 2 Sep 2015 14:21:54 +0000 (14:21 +0000)]
[X86][AVX512VLBW] add  support in byte shift and SAD
add byte shift left/right
add SAD - compute sum of absolute differences

Differential Revision: http://reviews.llvm.org/D12479

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246654 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd newline to test. NFC.
Chad Rosier [Wed, 2 Sep 2015 14:06:16 +0000 (14:06 +0000)]
Add newline to test. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246653 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[TableGen] Allow TokenTy in intrinsic signatures
Joseph Tremoulet [Wed, 2 Sep 2015 13:36:25 +0000 (13:36 +0000)]
[TableGen] Allow TokenTy in intrinsic signatures

Summary:
Add the necessary plumbing so that llvm_token_ty can be used as an
argument/return type in intrinsic definitions and correspondingly require
TokenTy in function types.  TokenTy is an opaque type that has no target
lowering, but can be used in machine-independent intrinsics.  It is
required for the upcoming llvm.eh.padparam intrinsic.

Reviewers: majnemer, rnk

Subscribers: stoklund, llvm-commits

Differential Revision: http://reviews.llvm.org/D12532

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246651 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Implemented encoding and intrinsics for VGETMANTPD/S , VGETMANTSD/S instructions
Igor Breger [Wed, 2 Sep 2015 11:18:55 +0000 (11:18 +0000)]
AVX512: Implemented encoding and intrinsics for VGETMANTPD/S , VGETMANTSD/S instructions
Added tests for intrinsics and encoding.

Differential Revision: http://reviews.llvm.org/D11593

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246642 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSuppress llvm/test/tools/gold/X86/parallel.ll while investigating.
NAKAMURA Takumi [Wed, 2 Sep 2015 10:59:21 +0000 (10:59 +0000)]
Suppress llvm/test/tools/gold/X86/parallel.ll while investigating.

For me,

  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7deb0dc in _dl_fixup () from /lib64/ld-linux-x86-64.so.2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246641 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Implemented encoding and intrinsics for vshufps/d.
Igor Breger [Wed, 2 Sep 2015 10:50:58 +0000 (10:50 +0000)]
AVX512: Implemented encoding and intrinsics for vshufps/d.
Added tests for intrinsics and encoding.

Differential Revision: http://reviews.llvm.org/D11709

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246640 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Don't bail to MiddleBlock if a runtime check fails, bail to ScalarPH instead
James Molloy [Wed, 2 Sep 2015 10:15:39 +0000 (10:15 +0000)]
[LV] Don't bail to MiddleBlock if a runtime check fails, bail to ScalarPH instead

We were bailing to two places if our runtime checks failed. If the initial overflow check failed, we'd go to ScalarPH. If any other check failed, we'd go to MiddleBlock. This caused us to have to have an extra PHI per induction and reduction as the vector loop's exit block was not dominated by its latch.

There's no need to have this behavior - if we just always go to ScalarPH we can get rid of a bunch of complexity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246637 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Move some code around slightly to make the intent of the function more clear.
James Molloy [Wed, 2 Sep 2015 10:15:32 +0000 (10:15 +0000)]
[LV] Move some code around slightly to make the intent of the function more clear.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246636 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Cleanup: Sink an IRBuilder closer to its uses.
James Molloy [Wed, 2 Sep 2015 10:15:27 +0000 (10:15 +0000)]
[LV] Cleanup: Sink an IRBuilder closer to its uses.

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246635 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Refactor all runtime check emissions into helper functions.
James Molloy [Wed, 2 Sep 2015 10:15:22 +0000 (10:15 +0000)]
[LV] Refactor all runtime check emissions into helper functions.

This reduces the complexity of createEmptyBlock() and will open the door to further refactoring.

The test change is simply because we're now constant folding a trivial test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246634 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Pull creation of trip counts into a helper function.
James Molloy [Wed, 2 Sep 2015 10:15:16 +0000 (10:15 +0000)]
[LV] Pull creation of trip counts into a helper function.

... and do a tad of tidyup while we're at it. Because StartIdx must now be zero, there's no difference between Count and EndIdx.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Factor the creation of the loop induction variable out of createEmptyLoop()
James Molloy [Wed, 2 Sep 2015 10:15:09 +0000 (10:15 +0000)]
[LV] Factor the creation of the loop induction variable out of createEmptyLoop()

It makes things easier to understand if this is in a helper method. This is part of my ongoing spaghetti-removal operation on createEmptyLoop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246632 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Never widen an induction variable.
James Molloy [Wed, 2 Sep 2015 10:15:05 +0000 (10:15 +0000)]
[LV] Never widen an induction variable.

There's no need to widen canonical induction variables. It's just as efficient to create a *new*, wide, induction variable.

Consider, if we widen an indvar, then we'll have to truncate it before its uses anyway (1 trunc). If we create a new indvar instead, we'll have to truncate that instead (1 trunc) [besides which IndVars should go and clean up our mess after us anyway on principle].

This lets us remove a ton of special-casing code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246631 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Switch to using canonical induction variables.
James Molloy [Wed, 2 Sep 2015 10:14:54 +0000 (10:14 +0000)]
[LV] Switch to using canonical induction variables.

Vectorized loops only ever have one induction variable. All induction PHIs from the scalar loop are rewritten to be in terms of this single indvar.

We were trying very hard to pick an indvar that already existed, even if that indvar wasn't canonical (didn't start at zero). But trying so hard is really fruitless - creating a new, canonical, indvar only results in one extra add in the worst case and that add is trivially easy to push through the PHI out of the loop by instcombine.

If we try and be less clever here and instead let instcombine clean up our mess (as we do in many other places in LV), we can remove unneeded complexity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246630 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CMake] Don't use OBJLIB on Xcode.
NAKAMURA Takumi [Wed, 2 Sep 2015 10:11:26 +0000 (10:11 +0000)]
[CMake] Don't use OBJLIB on Xcode.

I got a few reports it didn't work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246629 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: store <4 x i1> and <2 x i1> values in memory
Elena Demikhovsky [Wed, 2 Sep 2015 09:20:58 +0000 (09:20 +0000)]
AVX-512: store <4 x i1> and <2 x i1> values in memory
Enabled DAG pattern lowering for SKX with DQI predicate.

Differential Revision: http://reviews.llvm.org/D12550

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246625 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoOptimization for Gather/Scatter with uniform base
Elena Demikhovsky [Wed, 2 Sep 2015 08:39:13 +0000 (08:39 +0000)]
Optimization for Gather/Scatter with uniform base
Vector 'getelementptr' with scalar base is an opportunity for gather/scatter intrinsic to generate a better sequence.
While looking for uniform base, we want to use the scalar base pointer of GEP, if exists.

Differential Revision: http://reviews.llvm.org/D11121

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246622 91177308-0d34-0410-b5e6-96231b3b80d8