OSDN Git Service

android-x86/external-llvm.git
8 years agoRevert "Teach CorrelatedValuePropagation to mark adds as no wrap"
Renato Golin [Wed, 3 Aug 2016 16:20:48 +0000 (16:20 +0000)]
Revert "Teach CorrelatedValuePropagation to mark adds as no wrap"

This reverts commit r277592, trying to fix the AArch64 42VMA buildbot.

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

8 years agoHexagon: Use llvm_unreachable. NFC.
Benjamin Kramer [Wed, 3 Aug 2016 15:51:10 +0000 (15:51 +0000)]
Hexagon: Use llvm_unreachable. NFC.

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

8 years agoDisable shrinking of SNaN constants
Elliot Colp [Wed, 3 Aug 2016 15:09:21 +0000 (15:09 +0000)]
Disable shrinking of SNaN constants

When expanding FP constants, we attempt to shrink doubles to floats and perform an extending load.
However, on SystemZ, and possibly on other targets (I've only confirmed the problem on SystemZ), the FP extending load instruction may convert SNaN into QNaN, or may cause an exception. So in the general case, we would still like to shrink FP constants, but SNaNs should be left as doubles.

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

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

8 years ago[Hexagon] Do not check alignment for unsized types in isLegalAddressingMode
Krzysztof Parzyszek [Wed, 3 Aug 2016 15:06:18 +0000 (15:06 +0000)]
[Hexagon] Do not check alignment for unsized types in isLegalAddressingMode

When the same base address is used to load two different data types, LSR
would assume a memory type of "void". This type is not sized and has no
alignment information. Checking for it causes a crash.

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

8 years agoadd a vector variant of each test
Sanjay Patel [Wed, 3 Aug 2016 14:25:55 +0000 (14:25 +0000)]
add a vector variant of each test

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

8 years ago[InstCombine] Add select-bitext.ll tests
Nicolai Haehnle [Wed, 3 Aug 2016 13:37:56 +0000 (13:37 +0000)]
[InstCombine] Add select-bitext.ll tests

As requested for D22747.

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

8 years ago[Loop Vectorizer] Move store-predication into its own function, remove obsolete comme...
Gil Rapaport [Wed, 3 Aug 2016 13:23:43 +0000 (13:23 +0000)]
[Loop Vectorizer] Move store-predication into its own function, remove obsolete comment (NFC)

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

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

8 years agoTeach CorrelatedValuePropagation to mark adds as no wrap
Artur Pilipenko [Wed, 3 Aug 2016 13:11:39 +0000 (13:11 +0000)]
Teach CorrelatedValuePropagation to mark adds as no wrap

Use LVI to prove that adds do not wrap. The change is motivated by https://llvm.org/bugs/show_bug.cgi?id=28620 bug and it's the first step to fix that problem.

Reviewed By: sanjoy

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

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

8 years ago[AVX512] Add aliases for vcvttss2si{l|q}, vcvttsd2si{l|q}, vcvttss2usi{l|q}, vcvttsd2...
Igor Breger [Wed, 3 Aug 2016 10:58:05 +0000 (10:58 +0000)]
[AVX512] Add aliases for vcvttss2si{l|q}, vcvttsd2si{l|q}, vcvttss2usi{l|q}, vcvttsd2usi{l|q} instructions.

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

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

8 years ago[PM] Fix a mis-named parameter in parseLoopPass -- the pass manager was
Chandler Carruth [Wed, 3 Aug 2016 09:14:03 +0000 (09:14 +0000)]
[PM] Fix a mis-named parameter in parseLoopPass -- the pass manager was
called "FPM" instead of "LPM" in a hold-over from when the code was
modeled on that used to parse function passes.

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

8 years ago[PM] Add the explicit copy, move, swap, and assignment boilerplate
Chandler Carruth [Wed, 3 Aug 2016 08:16:08 +0000 (08:16 +0000)]
[PM] Add the explicit copy, move, swap, and assignment boilerplate
required by MSVC 2013.

This also makes the repeating pass wrapper assignable. Mildly
unfortunate as it means we can't use a const member for the int, but
that is a really minor invariant to try to preserve at the cost of loss
of regularity of the type. Yet another annoyance of the particular C++
object / move semantic model.

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

8 years ago[PM] Add a generic 'repeat N times' pass wrapper to the new pass
Chandler Carruth [Wed, 3 Aug 2016 07:44:48 +0000 (07:44 +0000)]
[PM] Add a generic 'repeat N times' pass wrapper to the new pass
manager.

While this has some utility for debugging and testing on its own, it is
primarily intended to demonstrate the technique for adding custom
wrappers that can provide more interesting interation behavior in
a nice, orthogonal, and composable layer.

Being able to write these kinds of very dynamic and customized controls
for running passes was one of the motivating use cases of the new pass
manager design, and this gives a hint at how they might look. The actual
logic is tiny here, and most of this is just wiring in the pipeline
parsing so that this can be widely used.

I'm adding this now to show the wiring without a lot of business logic.
This is a precursor patch for showing how a "iterate up to N times as
long as we devirtualize a call" utility can be added as a separable and
composable component along side the CGSCC pass management.

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

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

8 years ago[XRay] Make the xray_instr_map section specification more correct
Dean Michael Berris [Wed, 3 Aug 2016 07:21:55 +0000 (07:21 +0000)]
[XRay] Make the xray_instr_map section specification more correct

Summary:
We also add a test to show what currently happens when we create a
section per function and emit an xray_instr_map. This illustrates the
relationship (or lack thereof) between the per-function section and the
xray_instr_map section.

We also change the code generation slightly so that we don't always
create group sections, but rather only do so if a function where the
table is associated with is in a group.

Also in this change:

  - Remove the "merge" flag on the xray_instr_map section.
  - Test that we're generating the right table for comdat and non-comdat functions.

Reviewers: echristo, majnemer

Subscribers: llvm-commits, mehdi_amini

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

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

8 years ago[IfConversion] Bugfix: Don't use undef flag while adding use operands.
Jonas Paulsson [Wed, 3 Aug 2016 05:46:35 +0000 (05:46 +0000)]
[IfConversion] Bugfix: Don't use undef flag while adding use operands.

IfConversion used to always add the undef flag when adding a use operand
on a newly predicated instruction. This would be an operand for the register
being conditionally redefined. Due to the undef flag, the liveness of this
register prior to the predicated instruction would get lost.

This patch changes this so that such use operands are added only when the
register is live, without the undef flag.

This was reverted but pushed again now, for details follow link below.

Reviewed by Quentin Colombet.
http://reviews.llvm.org/D209077

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

8 years ago[ADCE] Refactor anticipating new functionality (NFC)
David Callahan [Wed, 3 Aug 2016 04:28:39 +0000 (04:28 +0000)]
[ADCE] Refactor anticipating new functionality (NFC)

Summary:
This is the first refactoring before adding new functionality.
Add a class wrapper for the functions and container for
state associated with the transformation.

No functional change

Reviewers: majnemer, nadav, mehdi_amini

Subscribers: llvm-commits

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

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

8 years agoRecordStreamer: handle inline asm "lazy_reference" and mark symbols as "used"
Mehdi Amini [Wed, 3 Aug 2016 03:51:42 +0000 (03:51 +0000)]
RecordStreamer: handle inline asm "lazy_reference" and mark symbols as "used"

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

8 years ago[PM] Remove the NDEBUG condition around isModulePassName.
Chandler Carruth [Wed, 3 Aug 2016 03:26:09 +0000 (03:26 +0000)]
[PM] Remove the NDEBUG condition around isModulePassName.

I forgot to do this initially, and added when I saw this fail in
a no-asserts build, but managed to loose the diff from the actual patch
that got submitted. Very sorry.

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

8 years ago[PM] Significantly refactor the pass pipeline parsing to be easier to
Chandler Carruth [Wed, 3 Aug 2016 03:21:41 +0000 (03:21 +0000)]
[PM] Significantly refactor the pass pipeline parsing to be easier to
reason about and less error prone.

The core idea is to fully parse the text without trying to identify
passes or structure. This is done with a single state machine. There
were various bugs in the logic around this previously that were repeated
and scattered across the code. Having a single routine makes it much
easier to fix and get correct. For example, this routine doesn't suffer
from PR28577.

Then the actual pass construction is handled using *much* easier to read
code and simple loops, with particular pass manager construction sunk to
live with other pass construction. This is especially nice as the pass
managers *are* in fact passes.

Finally, the "implicit" pass manager synthesis is done much more simply
by forming "pre-parsed" structures rather than having to duplicate tons
of logic.

One of the bugs fixed by this was evident in the tests where we accepted
a pipeline that wasn't really well formed. Another bug is PR28577 for
which I have added a test case.

The code is less efficient than the previous code but I'm really hoping
that's not a priority. ;]

Thanks to Sean for the review!

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

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

8 years ago[MSSA] Fix a caching bug.
George Burgess IV [Wed, 3 Aug 2016 01:22:19 +0000 (01:22 +0000)]
[MSSA] Fix a caching bug.

This fixes a bug where we'd sometimes cache overly-conservative results
with our walker. This bug was made more obvious by r277480, which makes
our cache far more spotty than it was. Test case is llvm-unit, because
we're likely going to use CachingWalker only for def optimization in the
future.

The bug stems from that there was a place where the walker assumed that
`DefNode.Last` was a valid target to cache to when failing to optimize
phis. This is sometimes incorrect if we have a cache hit. The fix is to
use the thing we *can* assume is a valid target to cache to. :)

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

8 years ago[Inliner] clang-format various parts of the inliner prior to changes
Chandler Carruth [Wed, 3 Aug 2016 01:02:31 +0000 (01:02 +0000)]
[Inliner] clang-format various parts of the inliner prior to changes
here. NFC.

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

8 years agoAdd -lowertypetests-bitsets-level to control bitsets generation.
Ivan Krasin [Wed, 3 Aug 2016 00:59:38 +0000 (00:59 +0000)]
Add -lowertypetests-bitsets-level to control bitsets generation.

Summary:
Sometimes, bitsets could get really large (>300k entries) and
we might want to drop a check, as it would have a too much cost.

Adding a flag to control how much penalty are we willing to pay
for bitsets.

Reviewers: kcc

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

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

8 years agoadd vector test for icmp+sub
Sanjay Patel [Wed, 3 Aug 2016 00:36:54 +0000 (00:36 +0000)]
add vector test for icmp+sub

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

8 years agoSupport for lifetime begin/end markers in the MemorySSA use optimizer
Daniel Berlin [Wed, 3 Aug 2016 00:01:46 +0000 (00:01 +0000)]
Support for lifetime begin/end markers in the MemorySSA use optimizer

Summary: Depends on D23072

Reviewers: george.burgess.iv

Subscribers: llvm-commits

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

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

8 years agoCommandFlags.h/llc: Move StopAfter/StartBefore options to llc.
Matthias Braun [Tue, 2 Aug 2016 23:36:06 +0000 (23:36 +0000)]
CommandFlags.h/llc: Move StopAfter/StartBefore options to llc.

Move those two options to llc:

The options in CommandFlags.h are shared by dsymutil, gold, llc,
llvm-dwp, llvm-lto, llvm-mc, lto, opt.

-stop-after/-start-after only affect codegen passes however only gold and llc
actually create codegen passes and I believe these flags to be only
useful for users of llc. For the other tools they are just highly
confusing: -stop-after claims to "Stop compilation after a specific
pass" which is not true in the context of the "opt" tool.

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

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

8 years ago[Verifier] Add more tests related to non-integral pointers
Sanjoy Das [Tue, 2 Aug 2016 23:32:53 +0000 (23:32 +0000)]
[Verifier] Add more tests related to non-integral pointers

As suggested by Matt Arsenault in post-commit review.

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

8 years ago[WebAssembly] Remove unnecessary subtarget checks in peephole pass
Derek Schuff [Tue, 2 Aug 2016 23:31:56 +0000 (23:31 +0000)]
[WebAssembly] Remove unnecessary subtarget checks in peephole pass

Leftover from D22686; the passes can handle all the instructions
unconditionally; only isel needs to care whether to generate them.

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

8 years agoFix a test for r277545.
Rui Ueyama [Tue, 2 Aug 2016 23:25:59 +0000 (23:25 +0000)]
Fix a test for r277545.

This change should have been submitted with that commit.

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

8 years agopdbdump: Do not treat stream 0 pages as allocated pages.
Rui Ueyama [Tue, 2 Aug 2016 23:22:46 +0000 (23:22 +0000)]
pdbdump: Do not treat stream 0 pages as allocated pages.

I examined a few PDBs and all of them treated pages for stream 0
are unused, thus they were unmarked in their free page bitmap.
I think we should do the same thing for compatibility.

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

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

8 years ago[safestack] Layout large allocas first to reduce fragmentation.
Evgeniy Stepanov [Tue, 2 Aug 2016 23:21:30 +0000 (23:21 +0000)]
[safestack] Layout large allocas first to reduce fragmentation.

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

8 years ago[WebAssembly] Initial SIMD128 support.
Derek Schuff [Tue, 2 Aug 2016 23:16:09 +0000 (23:16 +0000)]
[WebAssembly] Initial SIMD128 support.

Kicks off the implementation of wasm SIMD128 support (spec:
https://github.com/stoklund/portable-simd/blob/master/portable-simd.md),
adding support for add, sub, mul for i8x16, i16x8, i32x4, and f32x4.

The spec is WIP, and might change in the near future.

Patch by João Porto

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

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

8 years agoARM: only form SMMLS when SUBE flags unused.
Tim Northover [Tue, 2 Aug 2016 23:12:36 +0000 (23:12 +0000)]
ARM: only form SMMLS when SUBE flags unused.

In this particular example we wouldn't want the smmls anyway (the value is
actually unused), but in general smmls does not provide the required flags
register so if that SUBE result is used we can't replace it.

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

8 years agoMore fixes to get good error messages for bad archives.
Kevin Enderby [Tue, 2 Aug 2016 22:58:55 +0000 (22:58 +0000)]
More fixes to get good error messages for bad archives.

Fixed the last incorrect uses of llvm_unreachable() in the code
which were actually just cases of errors in the input Archives.

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

8 years ago[InstCombine] replace dyn_casts with matches; NFCI
Sanjay Patel [Tue, 2 Aug 2016 22:38:33 +0000 (22:38 +0000)]
[InstCombine] replace dyn_casts with matches; NFCI

Clean-up before changing this to allow folds for vectors.

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

8 years ago[sanitizer] Implement a __asan_default_options() equivalent for Scudo
Kostya Serebryany [Tue, 2 Aug 2016 22:25:38 +0000 (22:25 +0000)]
[sanitizer] Implement a __asan_default_options() equivalent for Scudo

Summary:
Currently, the Scudo Hardened Allocator only gets its flags via the SCUDO_OPTIONS environment variable.
With this patch, we offer the opportunity for programs to define their own options via __scudo_default_options() which behaves like __asan_default_options() (weak symbol).
A relevant test has been added as well, and the documentation updated accordingly.
I also used this patch as an opportunity to rename a few variables to comply with the LLVM naming scheme, and replaced a use of Report with dieWithMessage for consistency (and to avoid a callback).

Reviewers: llvm-commits, kcc

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

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

8 years agoAMDGPU: fdiv -1, x -> rcp -x
Matt Arsenault [Tue, 2 Aug 2016 22:25:04 +0000 (22:25 +0000)]
AMDGPU: fdiv -1, x -> rcp -x

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

8 years agoImported statistics types changes
Piotr Padlewski [Tue, 2 Aug 2016 22:18:47 +0000 (22:18 +0000)]
Imported statistics types changes

Reviewers: tejohnson, eraman

Subscribers: llvm-commits

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

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

8 years ago[CFLAA] Be more conservative with values we haven't seen.
George Burgess IV [Tue, 2 Aug 2016 22:17:25 +0000 (22:17 +0000)]
[CFLAA] Be more conservative with values we haven't seen.

There were issues with simply reporting AttrUnknown on
previously-unknown values in CFLAnders. So, we now act *entirely*
conservatively for values we haven't seen before. As in the prior patch
(r277362), writing a lit test for this isn't exactly trivial. If someone
wants a test badly, I'm willing to try to write one.

Patch by Jia Chen.

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

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

8 years agoMove to having a single real instructionClobbersQuery
Daniel Berlin [Tue, 2 Aug 2016 21:57:52 +0000 (21:57 +0000)]
Move to having a single real instructionClobbersQuery

Summary: We really want to move towards MemoryLocOrCall (or fix AA) everywhere, but for now, this lets us have a single instructionClobbersQuery.

Reviewers: george.burgess.iv

Subscribers: llvm-commits

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

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

8 years agoPDB: Mark extended file pages as free by default.
Rui Ueyama [Tue, 2 Aug 2016 21:56:37 +0000 (21:56 +0000)]
PDB: Mark extended file pages as free by default.

BitVector::extend initializes extended bits as true by default.
That is not desirable because new pages should be initially free.

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

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

8 years ago[Hexagon] Recognize vcombine in copy propagation
Krzysztof Parzyszek [Tue, 2 Aug 2016 21:49:20 +0000 (21:49 +0000)]
[Hexagon] Recognize vcombine in copy propagation

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

8 years ago[LoopUnroll] Fix a PowerPC test broken by r277524.
Michael Zolotukhin [Tue, 2 Aug 2016 21:43:25 +0000 (21:43 +0000)]
[LoopUnroll] Fix a PowerPC test broken by r277524.

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

8 years ago[LoopUnroll] Switch the default value of -unroll-runtime-epilog back to its original...
Michael Zolotukhin [Tue, 2 Aug 2016 21:24:14 +0000 (21:24 +0000)]
[LoopUnroll] Switch the default value of -unroll-runtime-epilog back to its original value.

As agreed in post-commit review of r265388, I'm switching the flag to
its original value until the 90% runtime performance regression on
SingleSource/Benchmarks/Stanford/Bubblesort is addressed.

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

8 years ago[lli] Add the ability for OrcLazyJIT to accept multiple input modules.
Lang Hames [Tue, 2 Aug 2016 21:00:40 +0000 (21:00 +0000)]
[lli] Add the ability for OrcLazyJIT to accept multiple input modules.

LLI already supported passing multiple input modules to MCJIT via the
-extra-module option. This patch adds the plumbing to pass these modules to
the OrcLazy JIT too.

This functionality will be used in an upcoming test case for weak symbol
handling.

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

8 years ago[NVPTX] remove unnecessary named metadata update that happens to break debug info.
Artem Belevich [Tue, 2 Aug 2016 20:58:24 +0000 (20:58 +0000)]
[NVPTX] remove unnecessary named metadata update that happens to break debug info.

Also added test case to verify IR changes done by NVPTXGenericToNVVM pass.

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

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

8 years ago[LoopVectorize] Change comment for isOutOfScope in collectLoopUniforms, NFC
Wei Mi [Tue, 2 Aug 2016 20:27:49 +0000 (20:27 +0000)]
[LoopVectorize] Change comment for isOutOfScope in collectLoopUniforms, NFC

Update comment for isOutOfScope and add a testcase for uniform value being used
out of scope.

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

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

8 years agoAArch64: properly calculate cmpxchg status in FastISel.
Tim Northover [Tue, 2 Aug 2016 20:22:36 +0000 (20:22 +0000)]
AArch64: properly calculate cmpxchg status in FastISel.

We were relying on the misleadingly-names $status result to actually be the
status. Actually it's just a scratch register that may or may not be valid (and
is the inverse of the real ststus anyway). Success can be determined by
comparing the value loaded against the one we wanted to see for "cmpxchg
strong" loops like this.

Should fix PR28819.

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

8 years agoFixes for post-commit review comments on r277480
Daniel Berlin [Tue, 2 Aug 2016 20:02:21 +0000 (20:02 +0000)]
Fixes for post-commit review comments on r277480

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

8 years ago[IRCE] Rename variable; NFC
Sanjoy Das [Tue, 2 Aug 2016 19:32:01 +0000 (19:32 +0000)]
[IRCE] Rename variable; NFC

There is nothing "Original" about "OriginalLoopInfo".

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

8 years ago[IRCE] Preserve DomTree and LCSSA
Sanjoy Das [Tue, 2 Aug 2016 19:31:54 +0000 (19:31 +0000)]
[IRCE] Preserve DomTree and LCSSA

This changes IRCE to "preserve" LCSSA and DomTree by recomputing them.
It still does not preserve LoopSimplify.

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

8 years agoAMDGPU: Stay in WQM for non-intrinsic stores
Nicolai Haehnle [Tue, 2 Aug 2016 19:31:14 +0000 (19:31 +0000)]
AMDGPU: Stay in WQM for non-intrinsic stores

Summary:
Two types of stores are possible in pixel shaders: stores to memory that are
explicitly requested at the API level, and stores that are an implementation
detail of register spilling or lowering of arrays.

For the first kind of store, we must ensure that helper pixels have no effect
and hence WQM must be disabled. The second kind of store must always be
executed, because the written value may be loaded again in a way that is
relevant for helper pixels as well -- and there are no externally visible
effects anyway.

This is a candidate for the 3.9 release branch.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, kzhuravl, llvm-commits

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

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

8 years agotest commit
Albert Gutowski [Tue, 2 Aug 2016 19:25:17 +0000 (19:25 +0000)]
test commit

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

8 years ago[LoopUnroll] Ensure we create prolog loops in simplified form.
Michael Zolotukhin [Tue, 2 Aug 2016 19:19:31 +0000 (19:19 +0000)]
[LoopUnroll] Ensure we create prolog loops in simplified form.

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

8 years agoFix handling of end-of-line preprocessor comments Attempt 2
Nirav Dave [Tue, 2 Aug 2016 19:17:54 +0000 (19:17 +0000)]
Fix handling of end-of-line preprocessor comments Attempt 2

Attempt 2: Retryign after Tsan.mman test fix.

Attempt 1: Recommitting after fixing test.

When parsing assembly where the line comment syntax is not hash, the
lexer cannot distinguish between hash's that start a hash line comment
and one that is part of an assembly statement and must be distinguished
during parsing. Previously, this was incompletely handled by not checking
for EndOfStatement at the end of statements and interpreting hash
prefixed statements as comments.

Change EndOfStatement Parsing to check for Hash comments and reintroduce
Hash statement parsing to catch previously handled cases.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

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

8 years agoAMDGPU: Track physical registers in SIWholeQuadMode
Nicolai Haehnle [Tue, 2 Aug 2016 19:17:37 +0000 (19:17 +0000)]
AMDGPU: Track physical registers in SIWholeQuadMode

Summary:
There are cases where uniform branch conditions are computed in VGPRs, and
we didn't correctly mark those as WQM.

The stray change in basic-branch.ll is because invoking the LiveIntervals
analysis leads to the detection of a dead register that would otherwise not
be seen at -O0.

This is a candidate for the 3.9 branch, as it fixes a possible hang.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits, kzhuravl

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

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

8 years ago[AArch64][GlobalISel] Replace test REQUIRES with lit.local.cfg. NFC.
Ahmed Bougacha [Tue, 2 Aug 2016 19:04:29 +0000 (19:04 +0000)]
[AArch64][GlobalISel] Replace test REQUIRES with lit.local.cfg. NFC.

I forgot the REQUIRES once (see r277486).
Let's prevent it from happening again.

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

8 years ago[AArch64] Remove useless 'import re' from CodeGen lit.local.cfg. NFC.
Ahmed Bougacha [Tue, 2 Aug 2016 19:04:25 +0000 (19:04 +0000)]
[AArch64] Remove useless 'import re' from CodeGen lit.local.cfg. NFC.

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

8 years ago[Hexagon] Prefer _io over _rr for 64-bit store with constant offset
Krzysztof Parzyszek [Tue, 2 Aug 2016 18:50:05 +0000 (18:50 +0000)]
[Hexagon] Prefer _io over _rr for 64-bit store with constant offset

Identify patterns where the address is aligned to an 8-byte boundary,
but both the base address and the constant offset are both proper
multiples of 4. In such cases, extract Base+4 into a separate instruc-
tion, and use S2_storerd_io, instead of using S4_storerd_rr.

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

8 years ago[Hexagon] Remove unused option
Krzysztof Parzyszek [Tue, 2 Aug 2016 18:39:32 +0000 (18:39 +0000)]
[Hexagon] Remove unused option

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

8 years ago[Hexagon] Improvements to address mode checks in TargetLowering
Krzysztof Parzyszek [Tue, 2 Aug 2016 18:34:31 +0000 (18:34 +0000)]
[Hexagon] Improvements to address mode checks in TargetLowering

- Implement getOptimalMemOpType.
- Check BaseOffset in isLegalAddressingMode.

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

8 years ago[MC] Fix Intel Operand assembly parsing for .set ids
Nirav Dave [Tue, 2 Aug 2016 17:56:03 +0000 (17:56 +0000)]
[MC] Fix Intel Operand assembly parsing for .set ids

Recommitting after fixing overaggressive fastpath return in parsing.

Fix intel syntax special case identifier operands that refer to a constant
(e.g. .set <ID> n) to be interpreted as immediate not memory in parsing.

Associated commit to fix clang test commited shortly.

Reviewers: rnk

Subscribers: llvm-commits

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

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

8 years ago[AArch64][GlobalISel] Add REQUIRES: global-isel to verifier tests.
Ahmed Bougacha [Tue, 2 Aug 2016 17:19:35 +0000 (17:19 +0000)]
[AArch64][GlobalISel] Add REQUIRES: global-isel to verifier tests.

I thought the directory had a lit.local.cfg, but it doesn't.
I'll add one, but for now, add the REQUIRES line. While there,
move the triple into the IR and add a datalayout.

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

8 years agoMSVC 2013 does not implement C++11 unions properly, so remove the anoymous union...
Daniel Berlin [Tue, 2 Aug 2016 16:59:51 +0000 (16:59 +0000)]
MSVC 2013 does not implement C++11 unions properly, so remove the anoymous union for now,
and leave a FIXME.

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

8 years ago[GlobalISel] Set the Selected MF property.
Ahmed Bougacha [Tue, 2 Aug 2016 16:49:25 +0000 (16:49 +0000)]
[GlobalISel] Set the Selected MF property.

None of GlobalISel requires the property, but this lets us use the
verifier instead of rolling our own "all instructions selected" check.

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

8 years ago[GlobalISel] Verify Selected MF property.
Ahmed Bougacha [Tue, 2 Aug 2016 16:49:22 +0000 (16:49 +0000)]
[GlobalISel] Verify Selected MF property.

After instruction selection, there should be no pre-isel generic
instructions remaining, nor should generic virtual registers be
used. Verify that.

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

8 years ago[GlobalISel] Add Selected MachineFunction property.
Ahmed Bougacha [Tue, 2 Aug 2016 16:49:19 +0000 (16:49 +0000)]
[GlobalISel] Add Selected MachineFunction property.

Selected: the InstructionSelect pass ran and all pre-isel generic
instructions have been eliminated; i.e., all instructions are now
target-specific or non-pre-isel generic instructions (e.g., COPY).

Since only pre-isel generic instructions can have generic virtual register
operands, this also means that all generic virtual registers have been
constrained to virtual registers (assigned to register classes) and that
all sizes attached to them have been eliminated.

This lets us enforce certain invariants across passes.
This property is GlobalISel-specific, but is always available.

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

8 years agoRewrite the use optimizer to be less memory intensive and 50% faster.
Daniel Berlin [Tue, 2 Aug 2016 16:24:03 +0000 (16:24 +0000)]
Rewrite the use optimizer to be less memory intensive and 50% faster.
Fixes PR28670

Summary:
Rewrite the use optimizer to be less memory intensive and 50% faster.
Fixes PR28670

The new use optimizer works like a standard SSA renaming pass, storing
all possible versions a MemorySSA use could get in a stack, and just
tracking indexes into the stack.
This uses much less memory than caching N^2 alias query results.
It's also a lot faster.

The current version defers phi node walking to the normal walker.

Reviewers: george.burgess.iv

Subscribers: llvm-commits

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

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

8 years ago[LVI] NFC. Sink a condition type check from the caller down to getValueFromCondition
Artur Pilipenko [Tue, 2 Aug 2016 16:20:48 +0000 (16:20 +0000)]
[LVI] NFC. Sink a condition type check from the caller down to getValueFromCondition

This is a preparatory refactoring to support conditions other than ICmpInst.

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

8 years ago[GlobalISel] Set and require RegBankSelected MF property.
Ahmed Bougacha [Tue, 2 Aug 2016 16:17:18 +0000 (16:17 +0000)]
[GlobalISel] Set and require RegBankSelected MF property.

The InstructionSelect pass assumes that RegBankSelect ran; set the
property on all tests (thereby verifying the test inputs) and require
it in the pass.

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

8 years ago[GlobalISel] Verify RegBankSelected MF property.
Ahmed Bougacha [Tue, 2 Aug 2016 16:17:15 +0000 (16:17 +0000)]
[GlobalISel] Verify RegBankSelected MF property.

RegBankSelected functions shouldn't have any generic virtual
register not assigned to a bank. Verify that.

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

8 years ago[GlobalISel] Add RegBankSelected MachineFunction property.
Ahmed Bougacha [Tue, 2 Aug 2016 16:17:10 +0000 (16:17 +0000)]
[GlobalISel] Add RegBankSelected MachineFunction property.

RegBankSelected: the RegBankSelect pass ran and all generic virtual
registers have been assigned to a register bank.

This lets us enforce certain invariants across passes.
This property is GlobalISel-specific, but is always available.

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

8 years ago[LV] Generate both scalar and vector integer induction variables
Matthew Simpson [Tue, 2 Aug 2016 15:25:16 +0000 (15:25 +0000)]
[LV] Generate both scalar and vector integer induction variables

This patch enables the vectorizer to generate both scalar and vector versions
of an integer induction variable for a given loop. Previously, we only
generated a scalar induction variable if we knew all its users were going to be
scalar. Otherwise, we generated a vector induction variable. In the case of a
loop with both scalar and vector users of the induction variable, we would
generate the vector induction variable and extract scalar values from it for
the scalar users. With this patch, we now generate both versions of the
induction variable when there are both scalar and vector users and select which
version to use based on whether the user is scalar or vector.

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

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

8 years ago[GlobalISel] Set, require, and verify Legalized MF property.
Ahmed Bougacha [Tue, 2 Aug 2016 15:10:32 +0000 (15:10 +0000)]
[GlobalISel] Set, require, and verify Legalized MF property.

RegBankSelect and InstructionSelect run after the legalizer and
require a Legalized function: check that all instructions are legal.

Note that this should be in the MachineVerifier, but it can't use the
MachineLegalizer as it's currently in the separate GlobalISel library.
Note that the RegBankSelect verifier checks have the same layering
problem, but we only use inline methods so end up not needing to link
against the GlobalISel library.

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

8 years ago[AArch64][GlobalISel] Mark basic binops/memops as legal.
Ahmed Bougacha [Tue, 2 Aug 2016 15:10:28 +0000 (15:10 +0000)]
[AArch64][GlobalISel] Mark basic binops/memops as legal.

We currently use and test these, and select most of them. Mark them
as legal even though we don't go through the full ir->asm flow yet.

This doesn't currently have standalone tests, but the verifier will
soon learn to check that the regbankselect/select tests are legal.

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

8 years ago[GlobalISel] Add Legalized MachineFunction property.
Ahmed Bougacha [Tue, 2 Aug 2016 15:10:25 +0000 (15:10 +0000)]
[GlobalISel] Add Legalized MachineFunction property.

Legalized: The MachineLegalizer ran; all pre-isel generic instructions
have been legalized, i.e., all instructions are now one of:
  - generic and always legal (e.g., COPY)
  - target-specific
  - legal pre-isel generic instructions.

This lets us enforce certain invariants across passes.
This property is GlobalISel-specific, but is always available.

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

8 years agoRevert "[MC] Fix handling of end-of-line preprocessor comments"
Nirav Dave [Tue, 2 Aug 2016 15:08:52 +0000 (15:08 +0000)]
Revert "[MC] Fix handling of end-of-line preprocessor comments"

Causes TSan failure on PPC64

This reverts commit r277459.

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

8 years ago[WebAssembly] Remove a README.txt entry that is now implemented.
Dan Gohman [Tue, 2 Aug 2016 14:53:44 +0000 (14:53 +0000)]
[WebAssembly] Remove a README.txt entry that is now implemented.

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

8 years ago[LVI] NFC. Fix a typo getValueFromFromCondition -> getValueFromCondition
Artur Pilipenko [Tue, 2 Aug 2016 14:44:32 +0000 (14:44 +0000)]
[LVI] NFC. Fix a typo getValueFromFromCondition -> getValueFromCondition

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

8 years ago[CodeGen] Generalize MachineFunctionProperties::print comma handling.
Ahmed Bougacha [Tue, 2 Aug 2016 14:42:57 +0000 (14:42 +0000)]
[CodeGen] Generalize MachineFunctionProperties::print comma handling.

This is only used for debug prints, but the previous hardcoded ", "
caused it to be printed unnecessarily when OnlySet, and is annoying
when adding new properties.

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

8 years ago[GlobalISel] Require isSSA in GISel passes.
Ahmed Bougacha [Tue, 2 Aug 2016 14:42:55 +0000 (14:42 +0000)]
[GlobalISel] Require isSSA in GISel passes.

The GISel passes don't make sense on non-SSA functions.
All GISel tests already set isSSA. Enforce that.

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

8 years ago[LV] Untangle the concepts of uniform and scalar
Matthew Simpson [Tue, 2 Aug 2016 14:29:41 +0000 (14:29 +0000)]
[LV] Untangle the concepts of uniform and scalar

This patch refactors the logic in collectLoopUniforms and
collectValuesToIgnore, untangling the concepts of "uniform" and "scalar". It
adds isScalarAfterVectorization along side isUniformAfterVectorization to
distinguish the two. Known scalar values include those that are uniform,
getelementptr instructions that won't be vectorized, and induction variables
and induction variable update instructions whose users are all known to be
scalar.

This patch includes the following functional changes:

- In collectLoopUniforms, we mark uniform the pointer operands of interleaved
  accesses. Although non-consecutive, these pointers are treated like
  consecutive pointers during vectorization.

- In collectValuesToIgnore, we insert a value into VecValuesToIgnore if it
  isScalarAfterVectorization rather than isUniformAfterVectorization. This
  differs from the previous functionaly in that we now add getelementptr
  instructions that will not be vectorized into VecValuesToIgnore.

This patch also removes the ValuesNotWidened set used for induction variable
scalarization since, after the above changes, it is now equivalent to
isScalarAfterVectorization.

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

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

8 years ago[MC] Fix handling of end-of-line preprocessor comments
Nirav Dave [Tue, 2 Aug 2016 14:25:49 +0000 (14:25 +0000)]
[MC] Fix handling of end-of-line preprocessor comments

Recommitting after fixing test.

When parsing assembly where the line comment syntax is not hash, the
lexer cannot distinguish between hash's that start a hash line comment
and one that is part of an assembly statement and must be distinguished
during parsing. Previously, this was incompletely handled by not checking
for EndOfStatement at the end of statements and interpreting hash
prefixed statements as comments.

Change EndOfStatement Parsing to check for Hash comments and reintroduce
Hash statement parsing to catch previously handled cases.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

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

8 years agoRevert rL277454
David Callahan [Tue, 2 Aug 2016 13:26:07 +0000 (13:26 +0000)]
Revert rL277454

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

8 years agotest commit
David Callahan [Tue, 2 Aug 2016 13:19:12 +0000 (13:19 +0000)]
test commit

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

8 years ago[ARM] Improve smul* and smla* isel for Thumb2
Sam Parker [Tue, 2 Aug 2016 12:44:27 +0000 (12:44 +0000)]
[ARM] Improve smul* and smla* isel for Thumb2

Added (sra (shl x, 16), 16) to the sext_16_node PatLeaf for ARM to
simplify some pattern matching. This has allowed several patterns
for smul* and smla* to be removed as well as making it easier to add
the matching for the corresponding instructions for Thumb2 targets.
Also added two Pat classes that are predicated on Thumb2 with the
hasDSP flag and UseMulOps flags. Updated the smul codegen test with
the wider range of patterns plus the ThumbV6 and ThumbV6T2 targets.

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

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

8 years agoHexagonVectorPrint.cpp: Fix r277370. Don't use getInstrVecReg() in the expression...
NAKAMURA Takumi [Tue, 2 Aug 2016 11:59:16 +0000 (11:59 +0000)]
HexagonVectorPrint.cpp: Fix r277370. Don't use getInstrVecReg() in the expression of assert(). It has side effects.

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

8 years ago[GlobalISel] Don't RegBankSelect target-specific instructions.
Ahmed Bougacha [Tue, 2 Aug 2016 11:41:16 +0000 (11:41 +0000)]
[GlobalISel] Don't RegBankSelect target-specific instructions.

They don't have types and should be using register classes.

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

8 years ago[GlobalISel] Don't legalize non-generic instructions.
Ahmed Bougacha [Tue, 2 Aug 2016 11:41:09 +0000 (11:41 +0000)]
[GlobalISel] Don't legalize non-generic instructions.

They don't have types and should be legal.

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

8 years ago[GlobalISel] Const-ify MachineInstrs passed to MachineLegalizer.
Ahmed Bougacha [Tue, 2 Aug 2016 11:41:03 +0000 (11:41 +0000)]
[GlobalISel] Const-ify MachineInstrs passed to MachineLegalizer.

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

8 years ago[mips] Update the P5600 scheduler for isComplete = 1
Simon Dardis [Tue, 2 Aug 2016 10:32:00 +0000 (10:32 +0000)]
[mips] Update the P5600 scheduler for isComplete = 1

These changes update the schedule model for the P5600 and includes the
rest of the MSA and MIPS32R5 instruction sets.

Reviewers: dsanders, vkalintris

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

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

8 years ago[ARM] Some saturation instructions not DSP-only
Bernard Ogden [Tue, 2 Aug 2016 10:04:03 +0000 (10:04 +0000)]
[ARM] Some saturation instructions not DSP-only

Summary:
Commit 276701 requires that targets have the DSP extensions to use
certain saturating instructions. This requires some corrections.

For ARM ISA the instructions in question are available in all v6*
architectures.

For Thumb2, the instructions in question are available from v6T2.
SSAT and USAT are part of the base architecture while SSAT16 and
USAT16 require the DSP extensions.

Reviewers: rengolin

Subscribers: aemerson, rengolin, samparker, llvm-commits

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

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

8 years ago[LoadStoreVectorizer] Don't use a linear walk for an existence check in a SmallPtrSet
Benjamin Kramer [Tue, 2 Aug 2016 09:35:17 +0000 (09:35 +0000)]
[LoadStoreVectorizer] Don't use a linear walk for an existence check in a SmallPtrSet

No functionality change intended.

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

8 years ago[AVX512] Don't use i128 masked gather/scatter/load/store. Do more accurately dataWidt...
Igor Breger [Tue, 2 Aug 2016 09:15:28 +0000 (09:15 +0000)]
[AVX512] Don't use i128 masked gather/scatter/load/store. Do more accurately dataWidth check.

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

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

8 years agoAArch64: Assert on branch displacement bits
Matt Arsenault [Tue, 2 Aug 2016 08:56:52 +0000 (08:56 +0000)]
AArch64: Assert on branch displacement bits

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

8 years agoAArch64: Consolidate branch inversion logic
Matt Arsenault [Tue, 2 Aug 2016 08:30:06 +0000 (08:30 +0000)]
AArch64: Consolidate branch inversion logic

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

8 years agoAArch64: BranchRelaxtion cleanups
Matt Arsenault [Tue, 2 Aug 2016 08:06:17 +0000 (08:06 +0000)]
AArch64: BranchRelaxtion cleanups

Move some logic into TII.

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

8 years agoAArch64: Add missing branch relaxation tests
Matt Arsenault [Tue, 2 Aug 2016 07:41:05 +0000 (07:41 +0000)]
AArch64: Add missing branch relaxation tests

The branch relaxation pass has the worst test coverage
of any pass in AArch64. Add a few tests that hit some
large pieces of code in the pass.

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

8 years agoAArch64: Fix end iterator dereference
Matt Arsenault [Tue, 2 Aug 2016 07:20:09 +0000 (07:20 +0000)]
AArch64: Fix end iterator dereference

Not all blocks have terminators. I'm not sure how this wasn't
crashing before.

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

8 years ago[AVX-512] Mark VADDPS/PD and VMULPS/PD as commutable. This necessitated adding itiner...
Craig Topper [Tue, 2 Aug 2016 06:16:53 +0000 (06:16 +0000)]
[AVX-512] Mark VADDPS/PD and VMULPS/PD as commutable. This necessitated adding itineraries to all of the instructions that use the avx512_fp_binop_p class.

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

8 years ago[AVX-512] Use SSE_MUL_ITINS_S/SSE_DIV_ITINS_S for the scalar FMUL/FDIV instructions...
Craig Topper [Tue, 2 Aug 2016 06:16:51 +0000 (06:16 +0000)]
[AVX-512] Use SSE_MUL_ITINS_S/SSE_DIV_ITINS_S for the scalar FMUL/FDIV instructions to match SSE/AVX.

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

8 years ago[Inliner] Clean up doxygen comments to match modern style.
Chandler Carruth [Tue, 2 Aug 2016 05:49:32 +0000 (05:49 +0000)]
[Inliner] Clean up doxygen comments to match modern style.

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