oota-llvm.git
10 years agoUse IntrusiveRefCntPtr to manage the lifetime of BitCodeAbbrevs.
Benjamin Kramer [Mon, 15 Sep 2014 15:44:14 +0000 (15:44 +0000)]
Use IntrusiveRefCntPtr to manage the lifetime of BitCodeAbbrevs.

This doesn't change the interface or gives additional safety but removes
a ton of retain/release boilerplate.

No functionality change.

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

10 years agoR600/SI: Add preliminary support for flat address space
Matt Arsenault [Mon, 15 Sep 2014 15:41:53 +0000 (15:41 +0000)]
R600/SI: Add preliminary support for flat address space

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

10 years agoR600/SI: Fix promote alloca pass breaking addrspacecast
Matt Arsenault [Mon, 15 Sep 2014 15:41:44 +0000 (15:41 +0000)]
R600/SI: Fix promote alloca pass breaking addrspacecast

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

10 years agoR600/SI: Enable named operand table for MTBUF
Matt Arsenault [Mon, 15 Sep 2014 15:41:43 +0000 (15:41 +0000)]
R600/SI: Enable named operand table for MTBUF

There is already code trying to use it for getting
the offset.

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

10 years ago[mips] Use early exit in MipsAsmParser::matchCPURegisterName(). NFC.
Toma Tabacu [Mon, 15 Sep 2014 15:33:01 +0000 (15:33 +0000)]
[mips] Use early exit in MipsAsmParser::matchCPURegisterName(). NFC.

Patch by Vasileios Kalintiris.

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

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

10 years ago[mips] Marked the DADDiu instruction aliases as MIPS III.
Toma Tabacu [Mon, 15 Sep 2014 14:47:46 +0000 (14:47 +0000)]
[mips] Marked the DADDiu instruction aliases as MIPS III.

Patch by Vasileios Kalintiris.

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

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

10 years ago[x86] Begin emitting PBLENDW instructions for integer blend operations
Chandler Carruth [Mon, 15 Sep 2014 12:40:54 +0000 (12:40 +0000)]
[x86] Begin emitting PBLENDW instructions for integer blend operations
when SSE4.1 is available.

This removes a ton of domain crossing from blend code paths that were
ending up in the floating point code path.

This is just the tip of the iceberg though. The real switch is for
integer blend lowering to more actively rely on this instruction being
available so we don't hit shufps at all any longer. =] That will come in
a follow-up patch.

Another place where we need better support is for using PBLENDVB when
doing so avoids the need to have two complementary PSHUFB masks.

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

10 years ago[x86] Add an explicit SSE3 run to this test and flesh out a bunch of
Chandler Carruth [Mon, 15 Sep 2014 11:40:20 +0000 (11:40 +0000)]
[x86] Add an explicit SSE3 run to this test and flesh out a bunch of
missing specific checks.

While there is a lot of redundancy here where all-but-one mode use the
same code generation, I'd rather have each variant spelled out and
checked so that readers aren't misled by an omission in the test suite.

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

10 years ago[x86] Teach the x86 DAG combiner to form UNPCKLPS and UNPCKHPS
Chandler Carruth [Mon, 15 Sep 2014 11:26:25 +0000 (11:26 +0000)]
[x86] Teach the x86 DAG combiner to form UNPCKLPS and UNPCKHPS
instructions from the relevant shuffle patterns.

This is the last tweak I'm aware of to generate essentially perfect
v4f32 and v2f64 shuffles with the new vector shuffle lowering up through
SSE4.1. I'm sure I've missed some and it'd be nice to check since v4f32
is amenable to exhaustive exploration, but this is all of the tricks I'm
aware of.

With AVX there is a new trick to use the VPERMILPS instruction, that's
coming up in a subsequent patch.

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

10 years ago[x86] Teach the x86 DAG combiner to form MOVSLDUP and MOVSHDUP
Chandler Carruth [Mon, 15 Sep 2014 11:15:23 +0000 (11:15 +0000)]
[x86] Teach the x86 DAG combiner to form MOVSLDUP and MOVSHDUP
instructions when it finds an appropriate pattern.

These are lovely instructions, and its a shame to not use them. =] They
are fast, and can hand loads folded into their operands, etc.

I've also plumbed the comment shuffle decoding through the various
layers so that the test cases are printed nicely.

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

10 years agoFix a non-virtual destructor warning introduced in r217747.
Frederic Riss [Mon, 15 Sep 2014 10:38:13 +0000 (10:38 +0000)]
Fix a non-virtual destructor warning introduced in r217747.

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

10 years ago[x86] Undo a flawed transform I added to form UNPCK instructions when
Chandler Carruth [Mon, 15 Sep 2014 10:35:41 +0000 (10:35 +0000)]
[x86] Undo a flawed transform I added to form UNPCK instructions when
AVX is available, and generally tidy up things surrounding UNPCK
formation.

Originally, I was thinking that the only advantage of PSHUFD over UNPCK
instruction variants was its free copy, and otherwise we should use the
shorter encoding UNPCK instructions. This isn't right though, there is
a larger advantage of being able to fold a load into the operand of
a PSHUFD. For UNPCK, the operand *must* be in a register so it can be
the second input.

This removes the UNPCK formation in the target-specific DAG combine for
v4i32 shuffles. It also lifts the v8 and v16 cases out of the
AVX-specific check as they are potentially replacing multiple
instructions with a single instruction and so should always be valuable.
The floating point checks are simplified accordingly.

This also adjusts the formation of PSHUFD instructions to attempt to
match the shuffle mask to one which would fit an UNPCK instruction
variant. This was originally motivated to allow it to match the UNPCK
instructions in the combiner, but clearly won't now.

Eventually, we should add a MachineCombiner pass that can form UNPCK
instructions post-RA when the operand is known to be in a register and
thus there is no loss.

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

10 years ago[x86] Teach the new vector shuffle lowering to use 'punpcklwd' and
Chandler Carruth [Mon, 15 Sep 2014 09:02:37 +0000 (09:02 +0000)]
[x86] Teach the new vector shuffle lowering to use 'punpcklwd' and
'punpckhwd' instructions when suitable rather than falling back to the
generic algorithm.

While we could canonicalize to these patterns late in the process, that
wouldn't help when the freedom to use them is only visible during
initial lowering when undef lanes are well understood. This, it turns
out, is very important for matching the shuffle patterns that are used
to lower sign extension. Fixes a small but relevant regression in
gcc-loops with the new lowering.

When I changed this I noticed that several 'pshufd' lowerings became
unpck variants. This is bad because it removes the ability to freely
copy in the same instruction. I've adjusted the widening test to handle
undef lanes correctly and now those will correctly continue to use
'pshufd' to lower. However, this caused a bunch of churn in the test
cases. No functional change, just churn.

Both of these changes are part of addressing a general weakness in the
new lowering -- it doesn't sufficiently leverage undef lanes. I've at
least a couple of patches that will help there at least in an academic
sense.

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

10 years agoFix ambiguous typedef introduced in r217747.
Frederic Riss [Mon, 15 Sep 2014 08:23:07 +0000 (08:23 +0000)]
Fix ambiguous typedef introduced in r217747.

Use fully qualified name inside a typedef from llvm::iterator_range<...> to
iterator_range. This is reported (rightly I think) by GCC as an
ambiguous name redefinition. Hope this fixes the buildbots.

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

10 years agoInstSimplify: Simplify trivial and/or of icmps
David Majnemer [Mon, 15 Sep 2014 08:15:28 +0000 (08:15 +0000)]
InstSimplify: Simplify trivial and/or of icmps

Some ICmpInsts when anded/ored with another ICmpInst trivially reduces
to true or false depending on whether or not all integers or no integers
satisfy the intersected/unioned range.

This sort of trivial looking code can come about when InstCombine
performs a range reduction-type operation on sdiv and the like.

This fixes PR20916.

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

10 years agoFix DebugInfo replaceAllUsesWith.
Frederic Riss [Mon, 15 Sep 2014 07:50:42 +0000 (07:50 +0000)]
Fix DebugInfo replaceAllUsesWith.

Summary:
replaceAllUsesWith had been modified to allow a DbgNode value to be
replaced by itself. In that case a new node is created by copying the
current DbgNode and the copy is used as replacement value.

When that copying happens, the value stored in this->DbgNode at the end
of RAUW would be a reference to the Node that has just been deleted.

This doesn't produce any bug right now, because the DI node on which we
call RAUW won't be used again.

Reviewers: dblaikie, echristo, aprantl

Subscribers: llvm-commits

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

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

10 years agoMove replaceAllUsesWith() from DIType to DIDescriptor.
Frederic Riss [Mon, 15 Sep 2014 07:50:36 +0000 (07:50 +0000)]
Move replaceAllUsesWith() from DIType to DIDescriptor.

RAUW was only used on DIType to merge declarations and full definitions
of types. In order to support the same functionality for functions and
global variables, move the function up type DI type hierarchy to the
common parent of DIType, DISubprogram and DIVariable which is
DIDescriptor.

This functionality will be exercized when we add the code to emit
imported declarations for forward declared function/variables.

Reviewers: echristo, dblaikie, aprantl

Subscribers: llvm-commits

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

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

10 years agoIntroduce the DWARFUnitSection abstraction.
Frederic Riss [Mon, 15 Sep 2014 07:50:27 +0000 (07:50 +0000)]
Introduce the DWARFUnitSection abstraction.

A DWARFUnitSection is the collection of Units that have been extracted from
the same debug section.

By embeding a reference to their DWARFUnitSection in each unit, the DIEs
will be able to resolve inter-unit references by interrogating their Unit's
DWARFUnitSection.

This is a minimal patch where the DWARFUnitSection is-a SmallVector of Units,
thus exposing exactly the same interface as before. Followup-up patches might
change from inheritance to composition in order to expose only the wanted
DWARFUnitSection abstraction.

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

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

10 years agollvm-cov: Clean up some redundancy in the view API (NFC)
Justin Bogner [Mon, 15 Sep 2014 03:41:04 +0000 (03:41 +0000)]
llvm-cov: Clean up some redundancy in the view API (NFC)

This removes the need to pass a starting and ending line when creating
a SourceCoverageView, since these are easy to determine.

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

10 years agollvm-cov: Simplify CounterMappingRegion, pushing logic to its user
Justin Bogner [Mon, 15 Sep 2014 03:41:01 +0000 (03:41 +0000)]
llvm-cov: Simplify CounterMappingRegion, pushing logic to its user

A single function in SourceCoverageDataManager was the only user of
some of the comparisons in CounterMappingRegion, and at this point we
know that only one file is relevant. This lets us use slightly simpler
logic directly in the client.

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

10 years ago[x86] Teach the new vector shuffle lowering to use BLENDPS and BLENDPD.
Chandler Carruth [Sun, 14 Sep 2014 23:43:33 +0000 (23:43 +0000)]
[x86] Teach the new vector shuffle lowering to use BLENDPS and BLENDPD.

These are super simple. They even take precedence over crazy
instructions like INSERTPS because they have very high throughput on
modern x86 chips.

I still have to teach the integer shuffle variants about this to avoid
so many domain crossings. However, due to the particular instructions
available, that's a touch more complex and so a separate patch.

Also, the backend doesn't seem to realize it can commute blend
instructions by negating the mask. That would help remove a number of
copies here. Suggestions on how to do this welcome, it's an area I'm
less familiar with.

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

10 years agollvm/test/CodeGen/X86/vec_shuffle-38.ll: Add explicit -mtriple=x86_64-unknown to...
NAKAMURA Takumi [Sun, 14 Sep 2014 23:39:01 +0000 (23:39 +0000)]
llvm/test/CodeGen/X86/vec_shuffle-38.ll: Add explicit -mtriple=x86_64-unknown to avoid incompatibility of win32.

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

10 years ago[x86] Add an SSE41 mode to this test. Nothing interesting here, its the
Chandler Carruth [Sun, 14 Sep 2014 23:28:12 +0000 (23:28 +0000)]
[x86] Add an SSE41 mode to this test. Nothing interesting here, its the
same as SSE3.

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

10 years ago[x86] Switch this test to use an ALL prefix with special SSE2 and SSE3
Chandler Carruth [Sun, 14 Sep 2014 23:19:37 +0000 (23:19 +0000)]
[x86] Switch this test to use an ALL prefix with special SSE2 and SSE3
variants where significant.

This will make it more obvious what is happening when we start using
blends in SSE41.

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

10 years ago[x86] Add some test cases where we should emit blendpd in SSE4.1. No
Chandler Carruth [Sun, 14 Sep 2014 23:15:52 +0000 (23:15 +0000)]
[x86] Add some test cases where we should emit blendpd in SSE4.1. No
actual change yet though.

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

10 years ago[x86] Teach the vector combiner that picks a canonical shuffle from to
Chandler Carruth [Sun, 14 Sep 2014 22:41:37 +0000 (22:41 +0000)]
[x86] Teach the vector combiner that picks a canonical shuffle from to
support transforming the forms from the new vector shuffle lowering to
use 'movddup' when appropriate.

A bunch of the cases where we actually form 'movddup' don't actually
show up in the test results because something even later than DAG
legalization maps them back to 'unpcklpd'. If this shows back up as
a performance problem, I'll probably chase it down, but it is at least
an encoded size loss. =/

To make this work, also always do this canonicalizing step for floating
point vectors where the baseline shuffle instructions don't provide any
free copies of their inputs. This also causes us to canonicalize
unpck[hl]pd into mov{hl,lh}ps (resp.) which is a nice encoding space
win.

There is one test which is "regressed" by this: extractelement-load.
There, the test case where the optimization it is testing *fails*, the
exact instruction pattern which results is slightly different. This
should probably be fixed by having the appropriate extract formed
earlier in the DAG, but that would defeat the purpose of the test.... If
this test case is critically important for anyone, please let me know
and I'll try to work on it. The prior behavior was actually contrary to
the comment in the test case and seems likely to have been an accident.

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

10 years agoIn DwarfEHPrepare, after all passes are run, RewindFunction may be a dangling
Yaron Keren [Sun, 14 Sep 2014 20:36:28 +0000 (20:36 +0000)]
In DwarfEHPrepare, after all passes are run, RewindFunction may be a dangling
pointer to a dead function. To make sure it's valid, doFinalization nullptrs
RewindFunction just like the constructor and so it will be found on next run.

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

10 years agoR600/SI: Fix broken check lines
Matt Arsenault [Sun, 14 Sep 2014 18:32:05 +0000 (18:32 +0000)]
R600/SI: Fix broken check lines

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

10 years ago[A57FPLoadBalancing] Modify r217689 - actually we do need to check defs
James Molloy [Sun, 14 Sep 2014 18:24:26 +0000 (18:24 +0000)]
[A57FPLoadBalancing] Modify r217689 - actually we do need to check defs

... Just make sure we check uses first so we see the kill first. It
turns out ignoring defs gives some pretty nasty runtime failures.
I'm certain this is the fix but I'm still reducing a testcase.

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

10 years ago[FastISel][AArch64] Add support for non-native types for logical ops.
Juergen Ributzka [Sat, 13 Sep 2014 23:46:28 +0000 (23:46 +0000)]
[FastISel][AArch64] Add support for non-native types for logical ops.

Extend the logical ops selection to also support non-native types such as i1,
i8, and i16.

Fixes rdar://problem/18330589.

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

10 years agoAdd control of function merging to the PMBuilder.
Nick Lewycky [Sat, 13 Sep 2014 21:46:00 +0000 (21:46 +0000)]
Add control of function merging to the PMBuilder.

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

10 years agoFix typo
Matt Arsenault [Sat, 13 Sep 2014 19:58:27 +0000 (19:58 +0000)]
Fix typo

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

10 years agoSimplify code. No functionality change.
Benjamin Kramer [Sat, 13 Sep 2014 12:38:49 +0000 (12:38 +0000)]
Simplify code. No functionality change.

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

10 years ago[AArch64] Update test case to pass with post-RA MI scheduler.
Chad Rosier [Sat, 13 Sep 2014 03:23:23 +0000 (03:23 +0000)]
[AArch64] Update test case to pass with post-RA MI scheduler.

Check that the post RA scheduler is being skipped, regardless of
whether it's the top-down list latency scheduler or the post-RA
MI scheduler.

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

10 years ago[llvm-objdump] Use PRIX64 with format()
Nick Kledzik [Sat, 13 Sep 2014 00:18:40 +0000 (00:18 +0000)]
[llvm-objdump] Use PRIX64 with format()

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

10 years agoStop suppress error messages in test case to see why one buildbot is failing
Nick Kledzik [Fri, 12 Sep 2014 22:46:01 +0000 (22:46 +0000)]
Stop suppress error messages in test case to see why one buildbot is failing

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

10 years ago[AArch64] Don't enable the post-RA MI scheduler at OptNone.
Chad Rosier [Fri, 12 Sep 2014 22:17:28 +0000 (22:17 +0000)]
[AArch64] Don't enable the post-RA MI scheduler at OptNone.

Hopefully, this will appease the bots.

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

10 years agoAllow targets to custom legalize vector insertion and extraction.
Owen Anderson [Fri, 12 Sep 2014 22:16:11 +0000 (22:16 +0000)]
Allow targets to custom legalize vector insertion and extraction.

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

10 years ago[llvm-objdump] support -rebase option for mach-o to dump rebasing info
Nick Kledzik [Fri, 12 Sep 2014 21:34:15 +0000 (21:34 +0000)]
[llvm-objdump] support -rebase option for mach-o to dump rebasing info

Similar to my previous -exports-trie option, the -rebase option dumps info from
the LC_DYLD_INFO load command. The rebasing info is a list of the the locations
that dyld needs to adjust if a mach-o image is not loaded at its preferred
address. Since ASLR is now the default, images almost never load at their
preferred address, and thus need to be rebased by dyld.

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

10 years agollvm-profdata: Avoid undefined behaviour when reading raw profiles
Justin Bogner [Fri, 12 Sep 2014 21:22:55 +0000 (21:22 +0000)]
llvm-profdata: Avoid undefined behaviour when reading raw profiles

The raw profiles that are generated in compiler-rt always add padding
so that each profile is aligned, so we can simply treat files that
don't have this property as malformed.

Caught by Alexey's new ubsan bot. Thanks!

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

10 years agoRemove an unnecessary restriction. MIsNeedChainEdge() should be checked even when...
Owen Anderson [Fri, 12 Sep 2014 21:17:55 +0000 (21:17 +0000)]
Remove an unnecessary restriction.  MIsNeedChainEdge() should be checked even when scheduler AliasAnalysis is not
enabled.  A good chunk of the MIsNeedChainEdge() is logic that is valid and should be applied even for targets
that are not using for alias analysis.

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

10 years agoThe MCAssembler.h include isn't used.
Yaron Keren [Fri, 12 Sep 2014 20:29:17 +0000 (20:29 +0000)]
The MCAssembler.h include isn't used.

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

10 years agoAdd an overload of getLastArgNoClaim taking two OptSpecifiers.
Ehsan Akhgari [Fri, 12 Sep 2014 19:42:53 +0000 (19:42 +0000)]
Add an overload of getLastArgNoClaim taking two OptSpecifiers.

Summary: This will be used in clang.

Test Plan: Will be tested on the clang side.

Reviewers: hansw

Subscribers: llvm-commits

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

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

10 years agoFileCheckize. NFC.
Chad Rosier [Fri, 12 Sep 2014 17:55:16 +0000 (17:55 +0000)]
FileCheckize. NFC.

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

10 years agoAdd support for le64.
JF Bastien [Fri, 12 Sep 2014 17:54:17 +0000 (17:54 +0000)]
Add support for le64.

Summary:
le64 is a generic little-endian 64-bit processor, mimicking le32.

Depends on D5318.

Test Plan: make check-all

Reviewers: dschuff

Subscribers: llvm-commits

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

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

10 years ago[AArch64] Enable post-RA MI scheduler.
Chad Rosier [Fri, 12 Sep 2014 17:40:39 +0000 (17:40 +0000)]
[AArch64] Enable post-RA MI scheduler.

Phabricator Revision: http://reviews.llvm.org/D5278
Patch by Sanjin Sijaric!

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

10 years ago[A57FPLoadBalancing] Remove support for vector types
James Molloy [Fri, 12 Sep 2014 16:55:32 +0000 (16:55 +0000)]
[A57FPLoadBalancing] Remove support for vector types

Vector MUL/MLAs have tied operands, which gives us extra constraints
that we currently can't handle. Instead of silently doing the wrong
thing, remove support to be readded later properly.

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

10 years ago[A57FPLoadBalancing] Ignore <def>s when checking if a chain may be killed.
James Molloy [Fri, 12 Sep 2014 16:55:26 +0000 (16:55 +0000)]
[A57FPLoadBalancing] Ignore <def>s when checking if a chain may be killed.

Defs are seen before uses, so a def without the kill flag doesn't necessarily
mean that the register is not killed on that instruction. It may be killed
in a later use operand.

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

10 years ago[lit] Parse all strings as UTF-8 rather than ASCII.
Jordan Rose [Fri, 12 Sep 2014 16:46:05 +0000 (16:46 +0000)]
[lit] Parse all strings as UTF-8 rather than ASCII.

As far as I can tell UTF-8 has been supported since the beginning of Python's
codec support, and it's the de facto standard for text these days, at least
for primarily-English text. This allows us to put Unicode into lit RUN lines.

rdar://problem/18311663

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

10 years agoMove sys::fs::AccessMode out of @brief in the function. [-Wdocumentation]
NAKAMURA Takumi [Fri, 12 Sep 2014 15:12:32 +0000 (15:12 +0000)]
Move sys::fs::AccessMode out of @brief in the function. [-Wdocumentation]

FIXME: Annotate sys::fs::AccessMode.

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

10 years agosys::fs::access(): Fix @param [-Wdocumentation]
NAKAMURA Takumi [Fri, 12 Sep 2014 15:12:21 +0000 (15:12 +0000)]
sys::fs::access(): Fix @param [-Wdocumentation]

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

10 years agollvm/test/CodeGen/X86/vec_ctbits.ll: Add explicit -mtriple=x86_64-unknown. It was...
NAKAMURA Takumi [Fri, 12 Sep 2014 15:10:56 +0000 (15:10 +0000)]
llvm/test/CodeGen/X86/vec_ctbits.ll: Add explicit -mtriple=x86_64-unknown. It was incompatible to Win32 x64.

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

10 years ago[A57LoadBalancing] unique_ptr-ify.
James Molloy [Fri, 12 Sep 2014 14:35:17 +0000 (14:35 +0000)]
[A57LoadBalancing] unique_ptr-ify.

Thanks to David Blakie for the in-depth review!

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

10 years ago[mips][microMIPS] Implement JRADDIUSP instruction
Zoran Jovanovic [Fri, 12 Sep 2014 14:29:54 +0000 (14:29 +0000)]
[mips][microMIPS] Implement JRADDIUSP instruction
Differential Revision: http://reviews.llvm.org/D5046

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

10 years agoAddress comments on r217622
Bill Schmidt [Fri, 12 Sep 2014 14:26:36 +0000 (14:26 +0000)]
Address comments on r217622

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

10 years ago[mips][microMIPS] Implement BGEZALS and BLTZALS instructions
Zoran Jovanovic [Fri, 12 Sep 2014 13:51:58 +0000 (13:51 +0000)]
[mips][microMIPS] Implement BGEZALS and BLTZALS instructions
Differential Revision: http://reviews.llvm.org/D5004

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

10 years ago[mips][microMIPS] Implement JALS and JALRS instructions.
Zoran Jovanovic [Fri, 12 Sep 2014 13:43:41 +0000 (13:43 +0000)]
[mips][microMIPS] Implement JALS and JALRS instructions.
Differential Revision: http://reviews.llvm.org/D5003

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

10 years ago[mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Zoran Jovanovic [Fri, 12 Sep 2014 13:33:33 +0000 (13:33 +0000)]
[mips][microMIPS] Implement TLBP, TLBR, TLBWI and TLBWR instructions
Differential Revision: http://reviews.llvm.org/D5211

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

10 years ago[ARM] Teach the cost model that cross-class copies are costly.
James Molloy [Fri, 12 Sep 2014 13:29:40 +0000 (13:29 +0000)]
[ARM] Teach the cost model that cross-class copies are costly.

Cross-class copies being expensive is actually a trait of the microarchitecture, but as I haven't yet seen an example of a microarchitecture where they're cheap it seems best to just enable this by default, covering the non-mcpu build case.

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

10 years agoLegalizer: Use the scalar bit width when promoting bit counting instrs on
Benjamin Kramer [Fri, 12 Sep 2014 12:50:27 +0000 (12:50 +0000)]
Legalizer: Use the scalar bit width when promoting bit counting instrs on
vectors.

e.g. when promoting ctlz from <2 x i32> to <2 x i64> we have to fixup
the result by 32 bits, not 64. PR20917.

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

10 years agoFix gcc -Wpedantic.
Patrik Hagglund [Fri, 12 Sep 2014 12:32:08 +0000 (12:32 +0000)]
Fix gcc -Wpedantic.

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

10 years agoAdd CMake check for libatomic.
Evgeniy Stepanov [Fri, 12 Sep 2014 11:08:59 +0000 (11:08 +0000)]
Add CMake check for libatomic.

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

10 years agoFix an ODR violation consisting of two 'struct Query' in the global namespace.
Benjamin Kramer [Fri, 12 Sep 2014 08:56:53 +0000 (08:56 +0000)]
Fix an ODR violation consisting of two 'struct Query' in the global namespace.

Put them in their own anonymous namespaces. Found by GCC's new -Wodr (PR20915).

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

10 years agoAdd Tom Stellard's role as 3.5 release manager.
Joerg Sonnenberger [Fri, 12 Sep 2014 08:07:31 +0000 (08:07 +0000)]
Add Tom Stellard's role as 3.5 release manager.

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

10 years agollvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
Justin Bogner [Fri, 12 Sep 2014 06:52:44 +0000 (06:52 +0000)]
llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)

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

10 years agoRemove a temporary variable and just construct a unique_ptr directly using make_unique.
Craig Topper [Fri, 12 Sep 2014 05:17:20 +0000 (05:17 +0000)]
Remove a temporary variable and just construct a unique_ptr directly using make_unique.

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

10 years agoObject: Small cleanup in COFFObjectFile::getSymbol
David Majnemer [Thu, 11 Sep 2014 23:42:10 +0000 (23:42 +0000)]
Object: Small cleanup in COFFObjectFile::getSymbol

NFC.

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

10 years agoRevert "llvm-cov: Remove an overly system specific test"
Justin Bogner [Thu, 11 Sep 2014 23:20:48 +0000 (23:20 +0000)]
Revert "llvm-cov: Remove an overly system specific test"

This fixes a call to sys::fs::equivalent that should've been to
CodeCoverageTool::equivalentFiles, which lets us restore the test of
r217476 that was removed in r217478.

This reverts r217478, but the test works this time.

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

10 years ago[MCJIT] Improve the "stub not found" diagnostic in RuntimeDyldChecker.
Lang Hames [Thu, 11 Sep 2014 23:09:22 +0000 (23:09 +0000)]
[MCJIT] Improve the "stub not found" diagnostic in RuntimeDyldChecker.

A "stub found found" diagnostic is emitted when RuntimeDyldChecker's stub lookup
logic fails to find the requested stub. The obvious reason for the failure is
that no such stub has been created, but it can also fail for internal symbols if
the symbol offset is not computed correctly (E.g. due to a mangled relocation
addend). This patch adds a comment about the latter case so that it's not
overlooked.

Inspired by confusion experienced during test case construction for r217635.

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

10 years ago[Support][Endian] Overload += and -=
Rui Ueyama [Thu, 11 Sep 2014 22:55:25 +0000 (22:55 +0000)]
[Support][Endian] Overload += and -=

This patch is to overload operator+= and operator-= for
{u}{little}{big}{16,32,64}_t.

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

10 years agoR600/SI: Fix off by 1 error in used register count
Matt Arsenault [Thu, 11 Sep 2014 22:51:37 +0000 (22:51 +0000)]
R600/SI: Fix off by 1 error in used register count

The register numbers start at 0, so if only 1 register
was used, this was reported as 0.

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

10 years ago[MCJIT] Make sure we test ARM BR24 relocations with both internal and external
Lang Hames [Thu, 11 Sep 2014 22:43:36 +0000 (22:43 +0000)]
[MCJIT] Make sure we test ARM BR24 relocations with both internal and external
symbols.

Previously we have only been testing these relocations with external symbols.

<rdar://problem/18308413>

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

10 years agoSupport: Use llvm::COFF::BigObjMagic
Rui Ueyama [Thu, 11 Sep 2014 22:34:32 +0000 (22:34 +0000)]
Support: Use llvm::COFF::BigObjMagic

Use llvm::COFF::BigObjMagic insetad of the string literal.
Also checks the version number.

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

10 years agoSupport: Delete {aligned_,}{u,}{little,big}8_t
Rui Ueyama [Thu, 11 Sep 2014 21:46:33 +0000 (21:46 +0000)]
Support: Delete {aligned_,}{u,}{little,big}8_t

The byte has no endianness, so these types don't make sense.
uint8_t should be used instead.

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

10 years ago[C API] Make the 'lower switch' pass available via the C API.
Juergen Ributzka [Thu, 11 Sep 2014 21:32:32 +0000 (21:32 +0000)]
[C API] Make the 'lower switch' pass available via the C API.

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

10 years ago[CodeGenPrepare] Teach the addressing mode matcher how to promote zext.
Quentin Colombet [Thu, 11 Sep 2014 21:22:14 +0000 (21:22 +0000)]
[CodeGenPrepare] Teach the addressing mode matcher how to promote zext.
I.e., teach it about 'sext (zext a to ty) to ty2' => zext a to ty2.

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

10 years agoRemove the unused string section symbol parameter from DwarfFile::emitStrings
David Blaikie [Thu, 11 Sep 2014 21:12:48 +0000 (21:12 +0000)]
Remove the unused string section symbol parameter from DwarfFile::emitStrings

And since it /looked/ like the DwarfStrSectionSym was unused, I tried
removing it - but then it turned out that DwarfStringPool was
reconstructing the same label (and expecting it to have already been
emitted) and uses that.

So I kept it around, but wanted to pass it in to users - since it seemed
a bit silly for DwarfStringPool to have it passed in and returned but
itself have no use for it. The only two users don't handle strings in
both .dwo and .o files so they only ever need the one symbol - no need
to keep it (and have an unused symbol) in the DwarfStringPool used for
fission/.dwo.

Refactor a bunch of accelerator table usage to remove duplication so I
didn't have to touch 4-5 callers.

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

10 years agoSupport: improve identify_magic to recognize COFF bigobj
Rui Ueyama [Thu, 11 Sep 2014 21:09:57 +0000 (21:09 +0000)]
Support: improve identify_magic to recognize COFF bigobj

identify_magic recognized a COFF bigobj as an import library file.
This patch fixes that.

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

10 years agoMisc cleanups to the FileSytem api.
Rafael Espindola [Thu, 11 Sep 2014 20:30:02 +0000 (20:30 +0000)]
Misc cleanups to the FileSytem api.

The main difference is the removal of

std::error_code exists(const Twine &path, bool &result);

It was an horribly redundant interface since a file not existing is also a valid
error_code. Now we have an access function that returns just an error_code. This
is the only function that has to be implemented for Unix and Windows. The
functions can_write, exists and can_execute an now just wrappers.

One still has to be very careful using these function to avoid introducing
race conditions (Time of check to time of use).

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

10 years agoAdd missing colon to RUN line...
Bill Schmidt [Thu, 11 Sep 2014 20:13:52 +0000 (20:13 +0000)]
Add missing colon to RUN line...

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

10 years ago[PATCH, PowerPC] Accept 'U' and 'X' constraints in inline asm
Bill Schmidt [Thu, 11 Sep 2014 20:10:03 +0000 (20:10 +0000)]
[PATCH, PowerPC] Accept 'U' and 'X' constraints in inline asm

Inline asm may specify 'U' and 'X' constraints to print a 'u' for an
update-form memory reference, or an 'x' for an indexed-form memory
reference.  However, these are really only useful in GCC internal code
generation.  In inline asm the operand of the memory constraint is
typically just a register containing the address, so 'U' and 'X' make
no sense.

This patch quietly accepts 'U' and 'X' in inline asm patterns, but
otherwise does nothing.  If we ever unexpectedly see a non-register,
we'll assert and sort it out afterwards.

I've added a new test for these constraints; the test case should be
used for other asm-constraints changes down the road.

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

10 years ago[MCJIT] Add support for ARM HALF_DIFF relocations to MCJIT.
Lang Hames [Thu, 11 Sep 2014 19:21:14 +0000 (19:21 +0000)]
[MCJIT] Add support for ARM HALF_DIFF relocations to MCJIT.

Fixes <rdar://problem/18297804>.

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

10 years agoUse simpler version of sys::fs::exists. NFC.
Rafael Espindola [Thu, 11 Sep 2014 19:11:02 +0000 (19:11 +0000)]
Use simpler version of sys::fs::exists. NFC.

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

10 years agoUse the simpler sys::fs:;exists. NFC.
Rafael Espindola [Thu, 11 Sep 2014 18:44:26 +0000 (18:44 +0000)]
Use the simpler sys::fs:;exists. NFC.

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

10 years agoAdd triple to test to fix bots
Matt Arsenault [Thu, 11 Sep 2014 17:50:20 +0000 (17:50 +0000)]
Add triple to test to fix bots

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

10 years agoProvide an implementation of getNoopForMachoTarget for SPARC.
Brad Smith [Thu, 11 Sep 2014 17:40:51 +0000 (17:40 +0000)]
Provide an implementation of getNoopForMachoTarget for SPARC.

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

10 years agoAdd DAG combine for shl + add of constants.
Matt Arsenault [Thu, 11 Sep 2014 17:34:19 +0000 (17:34 +0000)]
Add DAG combine for shl + add of constants.

Do
 (shl (add x, c1), c2) -> (add (shl x, c2), c1 << c2)

This is already done for multiplies, but since multiplies
by powers of two are turned into shifts, we also need
to handle it here.

This might want checks for isLegalAddImmediate to avoid
transforming an add of a legal immediate with one that isn't.

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

10 years ago[MCJIT] Take the relocation addend into account when applying ARM MachO VANILLA
Lang Hames [Thu, 11 Sep 2014 17:27:01 +0000 (17:27 +0000)]
[MCJIT] Take the relocation addend into account when applying ARM MachO VANILLA
and BR24 relocations.

<rdar://problem/18296496>

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

10 years agoAdded missing LLVM_NOEXCEPT to the definition of _obj2yaml_error_category::name
Ismail Pazarbasi [Thu, 11 Sep 2014 17:19:54 +0000 (17:19 +0000)]
Added missing LLVM_NOEXCEPT to the definition of _obj2yaml_error_category::name

LLVM_NOEXCEPT was added in r210591.

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

10 years ago[AVX512] Fix miscompile for unpack
Adam Nemet [Thu, 11 Sep 2014 16:51:10 +0000 (16:51 +0000)]
[AVX512] Fix miscompile for unpack

r189189 implemented AVX512 unpack by essentially performing a 256-bit unpack
between the low and the high 256 bits of src1 into the low part of the
destination and another unpack of the low and high 256 bits of src2 into the
high part of the destination.

I don't think that's how unpack works.  AVX512 unpack simply has more 128-bit
lanes but other than it works the same way as AVX.  So in each 128-bit lane,
we're always interleaving certain parts of both operands rather different
parts of one of the operands.

E.g. for this:
__v16sf a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
__v16sf b = { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
__v16sf c = __builtin_shufflevector(a, b, 0, 8, 1, 9, 4, 12, 5, 13, 16,
                  24, 17, 25, 20, 28, 21, 29);

we generated punpcklps (notice how the elements of a and b are not interleaved
in the shuffle).  In turn, c was set to this:

  0 16 1 17 4 20 5 21 8 24 9 25 12 28 13 29

Obviously this should have just returned the mask vector of the shuffle
vector.

I mostly reverted this change and made sure the original AVX code worked
for 512-bit vectors as well.

Also updated the tests because they matched the logic from the code.

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

10 years agoAdd triple and remove hashes to account for buildbot differences in comment strings.
Sanjay Patel [Thu, 11 Sep 2014 16:08:44 +0000 (16:08 +0000)]
Add triple and remove hashes to account for buildbot differences in comment strings.

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

10 years agoMove constant-sized bitvector to the stack.
Benjamin Kramer [Thu, 11 Sep 2014 15:58:39 +0000 (15:58 +0000)]
Move constant-sized bitvector to the stack.

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

10 years agoCombine fmul vector FP constants when unsafe math is allowed.
Sanjay Patel [Thu, 11 Sep 2014 15:45:27 +0000 (15:45 +0000)]
Combine fmul vector FP constants when unsafe math is allowed.

This is an extension of the change made with r215820:
http://llvm.org/viewvc/llvm-project?view=revision&revision=215820

That patch allowed combining of splatted vector FP constants that are multiplied.

This patch allows combining non-uniform vector FP constants too by relaxing the
check on the type of vector. Also, canonicalize a vector fmul in the
same way that we already do for scalars - if only one operand of the fmul is a
constant, make it operand 1. Otherwise, we miss potential folds.

This fold is also done by -instcombine, but it's possible that extra
fmuls may have been generated during lowering.

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

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

10 years agotypo
Sanjay Patel [Thu, 11 Sep 2014 15:41:01 +0000 (15:41 +0000)]
typo

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

10 years agoR600: Add cmpxchg instruction for evergreen
Aaron Watry [Thu, 11 Sep 2014 15:02:54 +0000 (15:02 +0000)]
R600: Add cmpxchg instruction for evergreen

Refactored the R600_LDS_1A2D class a bit to get it to actually work.

It seemed to be previously unused and broken.

We also have to disable the conversion to the noret variant for now in
R600ISelLowering because the getLDSNoRetOp method only handles 1A1D LDS ops.

Someone can feel free to modify the AMDGPU::getLDSNoRetOp method to
work for more than 1A1D variants of LDS operations. It's being left as a
future TODO for now.

Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217596 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Test local atomics for evergreen
Aaron Watry [Thu, 11 Sep 2014 15:02:52 +0000 (15:02 +0000)]
R600: Test local atomics for evergreen

Now that the operations are all implemented, we can test this sub-arch here.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217595 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add LDS_WRXCHG[_RET] instructions for Evergreen.
Aaron Watry [Thu, 11 Sep 2014 15:02:49 +0000 (15:02 +0000)]
R600: Add LDS_WRXCHG[_RET] instructions for Evergreen.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217594 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add LDS_MIN_[U]INT[_RET] instructions for Evergreen
Aaron Watry [Thu, 11 Sep 2014 15:02:47 +0000 (15:02 +0000)]
R600: Add LDS_MIN_[U]INT[_RET] instructions for Evergreen

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217593 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add LDS_XOR[_RET] instructions for Evergreen
Aaron Watry [Thu, 11 Sep 2014 15:02:46 +0000 (15:02 +0000)]
R600: Add LDS_XOR[_RET] instructions for Evergreen

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217592 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600: Add LDS_OR[_RET] instructions for Evergreen
Aaron Watry [Thu, 11 Sep 2014 15:02:44 +0000 (15:02 +0000)]
R600: Add LDS_OR[_RET] instructions for Evergreen

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Matt Arsenault <matthew.arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217591 91177308-0d34-0410-b5e6-96231b3b80d8