128500 Commits

Author SHA1 Message Date
Sanjoy Das
43d3a16be3 Add a comment with a rational for the unusual code structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 02:56:29 +00:00
Sanjoy Das
3ee664b45c Qualify getRangeForAffineAR with this-> for MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262453 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 02:44:08 +00:00
George Burgess IV
f3d29244a8 Attempt to fix ASAN failure in a MemorySSA test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 02:35:04 +00:00
Sanjoy Das
67499b434e Perturb code in an attempt to appease MSVC
For some reason MSVC seems to think I'm calling getConstant() from a
static context.  Try to avoid this issue by explicitly specifying
'this->' (though I'm not confident that this will actually work).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 02:34:20 +00:00
Sanjoy Das
29fa15036a More code permutation to appease MSVC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 02:15:42 +00:00
Sanjoy Das
29ae4c5fd9 Remove "auto" to appease the MSVC bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262448 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 01:59:37 +00:00
Matt Arsenault
543afc9d41 DAGCombiner: Make sure an integer is being truncated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262446 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 01:36:51 +00:00
Sanjay Patel
a7693ee508 revert r262424 because there's a *clang test* for AArch64 that checks -O3 asm output
that is broken by this change


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 01:04:09 +00:00
Daniel Berlin
dee2eabd02 Fix SHARED_LIBS build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 00:58:48 +00:00
Sanjoy Das
1c60097b64 [SCEV] Make getRange smarter around selects
Have ScalarEvolution::getRange re-consider cases like "{C?A:B,+,C?P:Q}"
by factoring out "C" and computing RangeOf{A,+,P} union RangeOf({B,+,Q})
instead.

The latter can be easier to compute precisely in cases like
"{C?0:N,+,C?1:-1}" N is the backedge taken count of the loop; since in
such cases the latter form simplifies to [0,N+1) union [0,N+1).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 00:57:54 +00:00
Sanjoy Das
a06e68cc8d [SCEV] Extract out a getRangeForAffineAR; NFC
Pure code-motion change.  Will be used later in making getRange more clever.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 00:57:39 +00:00
Chris Bieneman
d702b73a42 [CMake] Add convenience target llvm-test-depends to build test dependencies.
This is useful when paired with the distribution targets to build prerequisites for running tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 00:27:14 +00:00
Chris Bieneman
c26136be88 [CMake] Add distribution target that is the "just-build" side of install-distribution
This is just a convenience target to allow limiting what you build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 00:27:12 +00:00
Sanjay Patel
0cd6df9cc1 [InstCombine] convert 'isPositive' and 'isNegative' vector comparisons to shifts (PR26701)
As noted in the code comment, I don't think we can do the same transform that we do for
*scalar* integers comparisons to *vector* integers comparisons because it might pessimize
the general case. 

Exhibit A for an incomplete integer comparison ISA remains x86 SSE/AVX: it only has EQ and GT
for integer vectors.

But we should now recognize all the variants of this construct and produce the optimal code
for the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 23:55:18 +00:00
Dehao Chen
3ff7d1073c Perform InstructioinCombiningPass before SampleProfile pass.
Summary: SampleProfile pass needs to be performed after InstructionCombiningPass, which helps eliminate un-inlinable function calls.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:53:02 +00:00
Kostya Serebryany
66bb64fd43 [libFuzzer] deprecate exit_on_first flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:33:14 +00:00
David Blaikie
7ade1db315 llvm-dwp: Add missing copyright notice to llvm-dwp.cpp
Addressing feedback on IRC by Sean Silva.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262416 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:29:00 +00:00
Kostya Serebryany
7a1dcf9965 [libFuzzer] add generic signal handlers so that libFuzzer can report at least something if ASan is not handlig the signals for us. Remove abort_on_timeout flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:19:21 +00:00
Simon Pilgrim
912e48402f [X86][SSE41] Added missing fast-isel intrinsics tests
Match IR generated in clang/test/CodeGen/sse41-builtins.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:05:05 +00:00
Colin LeMahieu
71381aee13 [NFC] Convert tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262411 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:05:03 +00:00
Simon Pilgrim
c778e432d5 [X86][XOP] Regenerated intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:58:50 +00:00
Matthias Braun
eb51cacf62 AArch64: Reenable CompleteModel for A53, A57 and Kryo models
The fixes in r262393 completed them as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262408 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:55:35 +00:00
Simon Pilgrim
b03901e073 [X86][AVX2] Regenerated 256-bit vector / 64-bit element permute tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262406 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:53:12 +00:00
Tim Northover
9645a0d878 Fix typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:45:22 +00:00
Simon Pilgrim
8c0b039587 [X86][AVX2] Regenerated horizontal add/sub tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262403 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:43:55 +00:00
Simon Pilgrim
7339de5481 [X86][AVX2] Regenerated intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262401 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:38:41 +00:00
Colin LeMahieu
9371f402bc [Hexagon] Modifying r262258 to only be in effect in the hand assembler path, not the integrated assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262400 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:37:41 +00:00
Matthias Braun
3b1588aa81 TableGen: Display helpfull message for incomplete models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:36:12 +00:00
Simon Pilgrim
b6e5058d1b [X86][AVX] Fixed triple/arch clash in test case
We were specifying a x64 triple and then overriding with a x86 arch. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:33:08 +00:00
Matt Arsenault
d06f393d79 DAGCombiner: Turn truncate of a bitcasted vector to an extract
On AMDGPU where operations i64 operations are often bitcasted to v2i32
and back, this pattern shows up regularly where it breaks some
expected combines on i64, such as load width reducing.

This fixes some test failures in a future commit when i64 loads
are changed to promote.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:31:53 +00:00
Rafael Espindola
b2d0b15d68 Add LLVMBuild for ObjectYAML.
Should fix the DBUILD_SHARED_LIBS bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:29:33 +00:00
David Blaikie
c9b39e6bdd Revert "llvm-dwp: Keep ObjectFiles alive until object emission their contents can be referenced directly rather than copied"
Accidentally committed.

This reverts commit r262389.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:24:04 +00:00
Jacques Pienaar
e0accec873 [lanai] Add ELF enum value and relocations.
Add ELF enum value and relocations for Lanai backed.

General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:21:42 +00:00
Matthias Braun
083208e03e AArch64: Add missing schedinfo, check completeness for cyclone
This adds some missing generic schedule info definitions, enables
completeness checking for cyclone and fixes a typo uncovered by that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:20:31 +00:00
Kit Barton
35cace5d36 [Power9] Implement new vector compare, extract, insert instructions
This change implements the following vector operations:

  - Vector Compare Not Equal
    - vcmpneb(.) vcmpneh(.) vcmpnew(.)
    - vcmpnezb(.) vcmpnezh(.) vcmpnezw(.)
  - Vector Extract Unsigned
    - vextractub vextractuh vextractuw vextractd
    - vextublx vextubrx vextuhlx vextuhrx vextuwlx vextuwrx
  - Vector Insert
    - vinsertb vinserth vinsertw vinsertd

26 instructions.

Phabricator: http://reviews.llvm.org/D15916

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:51:57 +00:00
Sanjay Patel
d64805562c [x86] use getBitcast()
This isn't quite NFC because some of the SDLocs may change which could
cause scheduling differences. But no regression tests are affected and
there is no functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:47:02 +00:00
David Blaikie
d93c63989b Fix some warnings a bit harder/different
This is an alternate fix to 262378 and a fix to a pessimizing-move
warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:41:17 +00:00
David Blaikie
6475ea0b50 llvm-dwp: Keep ObjectFiles alive until object emission their contents can be referenced directly rather than copied
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:40:02 +00:00
Geoff Berry
5e5cb03708 Revert "[AArch64] Fix isLegalAddImmediate() to return true for valid negative values."
Revert r262248 in an attempt to fix the clang-native-aarch64-full
    bot and to investigate a performance regression in
    SingleSource/Benchmarks/CoyoteBench/huffbench

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:28:52 +00:00
Vasileios Kalintiris
6e09ce7e5f Revert "[mips] Promote the result of SETCC nodes to GPR width."
This reverts commit r262316.

It seems that my change breaks an out-of-tree chromium buildbot, so
I'm reverting this in order to investigate the situation further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:25:43 +00:00
Kit Barton
609592b9c2 New file to track implementation status of new POWER9 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:19:43 +00:00
Matthias Braun
eab2869a64 TableGen: Check scheduling models for completeness
TableGen checks at compiletime that for scheduling models with
"CompleteModel = 1" one of the following holds:

- Is marked with the hasNoSchedulingInfo flag
- The instruction is a subclass of Sched
- There are InstRW definitions in the scheduling model

Typical steps necessary to complete a model:

- Ensure all pseudo instructions that are expanded before machine
  scheduling (usually everything handled with EmitYYY() functions in
  XXXTargetLowering).
- If a CPU does not support some instructions mark the corresponding
  resource unsupported: "WriteRes<WriteXXX, []> { let Unsupported = 1; }".
- Add missing scheduling information.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:03:21 +00:00
Matthias Braun
279476d30d TableGen: Add hasNoSchedulingInfo to instructions
This introduces a new flag that indicates that a specific instruction
will never be present when the MachineScheduler runs and therefore needs
no scheduling information.

This is in preparation for an upcoming commit which checks completeness
of a scheduling model when tablegen runs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:03:11 +00:00
Justin Lebar
47e3ade685 [NVPTX] Annotate param loads/stores as mayLoad/mayStore.
Summary:
Tablegen was unable to determine that param loads/stores were actually
reading or writing from memory.  I think this isn't a problem in
practice for param stores, because those occur in a block right before
we make our call.  But param loads don't have to at the very beginning
of a function, so should be annotated as mayLoad so we don't incorrectly
optimize them.

Reviewers: jholewinski

Subscribers: jholewinski, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:44:22 +00:00
Justin Lebar
13864a0465 [NVPTX] Remove workaround for tablegen crash in NVPTXInstrInfo.td.
Summary: Looks like this was caused by a typo.

Reviewers: jholewinski

Subscribers: jholewinski, llvm-commits, tra

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:44:20 +00:00
Reid Kleckner
ecaa1e76a7 Fix -Wnon-virtual-dtor warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262378 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:39:54 +00:00
Owen Anderson
2b8030cd97 Fix an issue where fast math flags were dropped during scalarization.
Most portions of InstCombine properly propagate fast math flags, but
apparently the vector scalarization section was overlooked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:35:52 +00:00
Sanjoy Das
2a436300c1 [SCEV] Minor cleanup: rename method, C++11'ify; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:28:01 +00:00
Justin Lebar
e2c35f6c8b [NVPTX] Use different, convergent MIs for convergent calls.
Summary:
Calls sometimes need to be convergent.  This is already handled at the
LLVM IR level, but it also needs to be handled at the MI level.

Ideally we'd propagate convergence from instructions, down through the
selection DAG, and into MIs.  But this is Hard, and would affect
optimizations in the SDNs -- right now only SDNs with two operands have
any flags at all.

Instead, here's a much simpler hack: Add new opcodes for NVPTX for
convergent calls, and generate these when lowering convergent LLVM
calls.

Reviewers: jholewinski

Subscribers: jholewinski, chandlerc, joker.eph, jhen, tra, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:24:03 +00:00
Justin Lebar
eb3a3d7544 [NVPTX] Nix hack used to emit '{' and '}' for NVPTX calls.
Summary: Tablegen understands backslash as an escape char; that's sufficient.

Reviewers: jholewinski

Subscribers: llvm-commits, tra, jholewinski

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:24:00 +00:00