Commit Graph

129108 Commits

Author SHA1 Message Date
Simon Pilgrim
1372924ef8 [X86] Reduced alignment of widened vector load/stores to better match PR26953 cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263649 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 18:32:44 +00:00
Sanjay Patel
d2871a7ac1 add checks for 'unpredictable' metadata preservation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263648 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 18:15:34 +00:00
Sanjay Patel
c985878ff1 fix function names; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 18:00:09 +00:00
Evgeniy Stepanov
2f3a505991 [msan] Add a comment with a bug link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 17:39:17 +00:00
Geoff Berry
4334f66235 [LSR] Create fewer redundant instructions.
Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs.  This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.

Reviewers: atrick

Subscribers: mcrosier, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 17:29:49 +00:00
Simon Pilgrim
10e0424cf0 [X86] Regenerated + extended widened vector conversion tests
- Ensure we test X86 + X64
- sitopfp / uitofp requires testing for SSE2 and SSE42 as well (part of the fix for PR26953)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263640 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 15:33:43 +00:00
Michel Danzer
7a6090c411 AMDGPU: Verify instructions in non-debug builds as well
And emit an error if it fails.

This prevents illegal instructions from getting sent to the GPU, which
would potentially result in a hang.

This is a candidate for the stable branch(es).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 09:10:42 +00:00
Michel Danzer
eda4451117 AMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263626 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 09:10:35 +00:00
Igor Breger
81434f47ae AVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit vector because PCMPGT supported only for 128/256bit.
Differential Revision: http://reviews.llvm.org/D18204

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263624 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 08:48:26 +00:00
Vedant Kumar
9ec8fe7744 [Bitcode] Add compatibility test for the 3.8 release
Fork off compatibility.ll for the 3.8 release. The *.bc file in this
commit was produced using a Release build of the release_38 branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263620 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 05:43:03 +00:00
Haicheng Wu
691ed105b0 [JumpThreading] See through Cast Instructions
To capture more jump-thread opportunity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263618 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 04:52:52 +00:00
Lang Hames
9d837c98d3 [Support] Update Error unit test to remove implementation specific behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 01:20:54 +00:00
Lang Hames
b92213233c [Support] Add the 'Error' class for structured error handling.
This patch introduces the Error classs for lightweight, structured,
recoverable error handling. It includes utilities for creating, manipulating
and handling errors. The scheme is similar to exceptions, in that errors are
described with user-defined types. Unlike exceptions however, errors are
represented as ordinary return types in the API (similar to the way
std::error_code is used).

For usage notes see the LLVM programmer's manual, and the Error.h header.
Usage examples can be found in unittests/Support/ErrorTest.cpp.

Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the
llvm-dev and llvm-commits lists for lots of discussion and review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 01:02:46 +00:00
Simon Pilgrim
a235a96895 [X86] Regenerated widen load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 00:41:21 +00:00
Simon Pilgrim
e30740e25e [X86][SSE41] Additional tests for extracting zeroable shuffle elements
We can currently only match zeroable vector elements of the same size as the shuffle type - these tests demonstrate the problem and a solution will be shortly added in an updated D14261

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263606 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-16 00:13:36 +00:00
Haicheng Wu
35d3c7b00e Revert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"
Not sure it handles undef properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263605 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 23:38:47 +00:00
Justin Bogner
a935ab16cf llvm-bcanalyzer: Fix handling of attribute group entries
These were printing as "UnknownCode3", since we were looking for them
inside PARAMATTR blocks instead of PARAMATTR_GROUP blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263597 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 22:37:25 +00:00
Adam Nemet
5ee7b3ce18 Turn LoopLoadElimination on again
The latent bug that LLE exposed in the LoopVectorizer was resolved
(PR26952).

The pass can be disabled with -mllvm -enable-loop-load-elim=0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 22:26:12 +00:00
Mike Aizatsky
fa4edb682f [libfuzzer] speeding up corpus load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263591 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 21:47:21 +00:00
Bjorn Steinbrink
3e7b92d37d Also handle the new Rust pers fn to isCatchAll()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263585 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 20:57:07 +00:00
Bjorn Steinbrink
3eacb28864 Add Rust's personality function to the list of known personality functions
Reviewers: majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263581 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 20:35:45 +00:00
Evgeniy Stepanov
1fb8dda3be [msan] Don't put module constructors in comdats.
There is something strange going on with debug info (.eh_frame_hdr)
disappearing when msan.module_ctor are placed in comdat sections.

Moving this functionality under flag, disabled by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 20:25:47 +00:00
Mehdi Amini
3e2997601d Add missing error handling in llvm-lto
Annoyingly, ErrorOr allows to *not check* the error when things go
well. It will crash badly when there is an error though. It should
runtime assert when it is used without being checked!

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 20:17:55 +00:00
Teresa Johnson
d135b1ffea [ThinLTO] Record all global variable defs in the summary
Record all variable defs with a summary record to aid in building a
complete reference graph and locating constant variable defs to import.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 19:35:45 +00:00
Quentin Colombet
c0ed3e9a27 [MIR] Add a test case for the diagnostic of a wrongly typed generic instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263573 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 18:31:29 +00:00
Quentin Colombet
02dabc9fee [AArch64] Move GlobalISel test cases into a GlobalISel subdirectory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263572 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 18:30:00 +00:00
Chris Bieneman
dabb0a0f53 [CMake] Add PACKAGE_VENDOR for customizing version output
Summary: This change adds a PACKAGE_VENDOR variable. When set it makes the version output more closely resemble the clang version output.

Reviewers: aprantl, bogner

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263566 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 18:07:46 +00:00
Adam Nemet
31bf7f9ec0 [LV] Preserve LoopInfo when store predication is used
This was a latent bug that got exposed by the change to add LoopSimplify
as a dependence to LoopLoadElimination.  Since LoopInfo was corrupted
after LV, LoopSimplify mis-compiled nbench in the test-suite (more
details in the PR).

The problem was that when we create the blocks for predicated stores we
didn't add those to any loops.

The original testcase for store predication provides coverage for this
assuming we verify LI on the way out of LV.

Fixes PR26952.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 18:06:20 +00:00
Davide Italiano
87a6f756c2 [MC] Rename TLSDESC as it's not ARM specific.
Similarly to what was done for TLSCALL in r263515.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 17:29:52 +00:00
Changpeng Fang
53914149bf AMDGPU/SI: Implement GroupStaticSize Intrinsic for Dynamic LDS
Summary:
  Static LDS size is saved in MachineFunctionInfo::LDSSize,
We define a pseudo instruction with usesCustomInserter bit set. Then, in EmitInstrWithCustomInserter,
we replace this pseudo instruction with a mov of MachineFunctionInfo::LDSSize.

Reviewers:
    arsenm
    tstellarAMD

Subscribers
    llvm-commits, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263563 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 17:28:44 +00:00
Hemant Kulkarni
a7904d39a8 [llvm-readobj] Impl GNU style printing of sections and relocations
Differential Revision: http://reviews.llvm.org/D17523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 17:25:31 +00:00
Douglas Katzman
abae6e250e Myriad: Add new sparc CPU kinds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263557 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 16:41:47 +00:00
Benjamin Kramer
b6b0d4e7f2 [GlobalOpt] Don't look through aliases when sorting names of globals.
If both are different aliases to the same value the sorting becomes
non-deterministic as array_pod_sort is not stable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263550 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 14:18:26 +00:00
Chad Rosier
fdc3b4fbb6 [SLP] Update comment to reflect reality. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263548 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 13:27:58 +00:00
Nikolay Haustov
956ea6ab37 [AMDGPU] Assembler: Update SOP* tests
Add VI encodings.
Reformat sopp.s to match style of other files.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 07:44:57 +00:00
David Majnemer
c5335482cf [llvm-objdump] Add support for dumping the PE TLS directory
The PE TLS directory contains information about where the TLS data
resides in the image, what functions should be executed when threads are
created, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263537 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 06:14:01 +00:00
Andrew Wilkins
255ca4be00 bindings/go: reinstate TargetMachine.TargetData
Summary:
LLVMGetTargetDataLayout was removed from the C API,
and then TargetMachine.TargetData was removed. Later,
LLVMCreateTargetMachineData was added to the C API,
and we now expose this via the Go API.

Reviewers: deadalnix, pcc

Subscribers: cierniak, llvm-commits, axw

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263530 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 05:04:06 +00:00
Lang Hames
767c5c3079 [MachO] Extend the alt_entry support for aliases added in r263521 to
expressions of the form 'a = .' and 'a = Ltmp'.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263528 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 04:20:49 +00:00
Eric Christopher
6e5efead5e Use some braces to format this a little better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263527 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 03:01:31 +00:00
Teresa Johnson
153a492740 BitcodeWriter dyn_cast cleanup for r263275 (NFC)
Address review suggestions from dblaikie: change a few dyn_cast to cast
and fold a cast into if condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263526 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 02:41:29 +00:00
Eric Christopher
0bf674e247 Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest
parentheses around '&&' within '||' [-Werror=parentheses].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263525 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 02:19:06 +00:00
Teresa Johnson
54d058ed76 Move global ID computation from Function to GlobalValue (NFC)
Since the static getGlobalIdentifier and getGUID methods are now called
for global values other than functions, reflect that by moving these
methods to the GlobalValue class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263524 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 02:13:19 +00:00
Fiona Glaser
33ae313f2a DenseMap: make .resize() do the intuitive thing
In some places, like InstCombine, we resize a DenseMap to fit the elements
we intend to put in it, then insert those elements (to avoid continual
reallocations as it grows). But .resize(foo) doesn't actually do what
people think; it resizes to foo buckets (which is really an
implementation detail the user of DenseMap probably shouldn't care about),
not the space required to fit foo elements. DenseMap grows if 3/4 of its
buckets are full, so this actually causes one forced reallocation every
time instead of avoiding a reallocation.

This patch makes .resize(foo) do the intuitive thing: it grows to the size
necessary to fit foo elements without new allocations.

Also include a test to verify that .resize() actually does what we think it
does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263522 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 01:50:46 +00:00
Lang Hames
875b7560fb [MachO] Add MachO alt-entry directive support.
This patch adds support for the MachO .alt_entry assembly directive, and uses
it for global aliases with non-zero GEP offsets. The alt_entry flag indicates
that a symbol should be layed out immediately after the preceding symbol.
Conceptually it introduces an alternate entry point for a function or data
structure. E.g.:

safe_foo:
  // check preconditions for foo
.alt_entry fast_foo
fast_foo:
  // body of foo, can assume preconditions.

The .alt_entry flag is also implicitly set on assembly aliases of the form:

a = b + C

where C is a non-zero constant, since these have the same effect as an
alt_entry symbol: they introduce a label that cannot be moved relative to the
preceding one. Setting the alt_entry flag on aliases of this form fixes
http://llvm.org/PR25381.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 01:43:05 +00:00
Kostya Serebryany
2f2c2e3539 [libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263518 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 01:28:00 +00:00
Sanjoy Das
b6d287bef8 [StatepointLowering] Move an assertion; NFCI
Instead of running an explicit loop over `gc.relocate` calls hanging off
of a `gc.statepoint`, assert the validity of the type of the value being
relocated in `visitRelocate`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263516 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 01:16:31 +00:00
Davide Italiano
3255600d08 [MC] Rename TLSCALL as it's not ARM specific.
`MCSymbolRefExpr` variant kind for TLSCALL is prefixed with 
_ARM_ since this is how it was originally implemented.
The X86_64 version is exactly the same so there's no reason
to create a new variant, we can just rename the existing
one to be machine-independent.
This generalization is the first step to implement support
for GNU2 TLS dialect in MC.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263515 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 00:25:22 +00:00
Teresa Johnson
f2403fe5b5 [ThinLTO] Renaming of function index to module summary index (NFC)
(Resubmitting after fixing missing file issue)

With the changes in r263275, there are now more than just functions in
the summary. Completed the renaming of data structures (started in
r263275) to reflect the wider scope. In particular, changed the
FunctionIndex* data structures to ModuleIndex*, and renamed related
variables and comments. Also renamed the files to reflect the changes.

A companion clang patch will immediately succeed this patch to reflect
this renaming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-15 00:04:37 +00:00
Eric Christopher
a27966ebf6 Temporarily Revert "[X86][SSE] Simplify vector LOAD + EXTEND on
pre-SSE41 hardware" as it seems to be causing crashes during code
generation in halide. PR forthcoming.

This reverts commit r263303.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14 23:59:57 +00:00
Justin Lebar
64d996c3f3 [LoopUnroll] Respect the convergent attribute.
Summary:
Specifically, when we perform runtime loop unrolling of a loop that
contains a convergent op, we can only unroll k times, where k divides
the loop trip multiple.

Without this change, we'll happily unroll e.g. the following loop

  for (int i = 0; i < N; ++i) {
    if (i == 0) convergent_op();
    foo();
  }

into

  int i = 0;
  if (N % 2 == 1) {
    convergent_op();
    foo();
    ++i;
  }
  for (; i < N - 1; i += 2) {
    if (i == 0) convergent_op();
    foo();
    foo();
  }.

This is unsafe, because we've just added a control-flow dependency to
the convergent op in the prelude.

In general, runtime unrolling loops that contain convergent ops is safe
only if we don't have emit a prelude, which occurs when the unroll count
divides the trip multiple.

Reviewers: resistor

Subscribers: llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263509 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-14 23:15:34 +00:00