Commit Graph

36630 Commits

Author SHA1 Message Date
Matthias Braun
d8eb7dec3e MachineVerifier: subregs so not require defs/valnos on every path
It is fine for subregister ranges to be undefined on some CFG paths as
we may have a "vregX:other_subreg<read-undef> =" def on that path. We
do not (and should not) have live segments for the subregister ranges.
The MachineVerifier should not complain about this.

This is a slight variant of http://llvm.org/PR27705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 23:02:13 +00:00
Tim Shen
258d886f61 [PowerPC] Add a testcase for TCO on string rvo function
Differential Revision: http://reviews.llvm.org/D20311

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 22:42:01 +00:00
Sanjay Patel
85b08a7199 add test vector sdiv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 22:08:40 +00:00
Sanjay Patel
45022fd14b add test for vector shift
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 22:08:16 +00:00
Jacques Pienaar
0724f4d051 [lanai] Change reloc to use PIC_ by default and cleanup.
* Change reloc to PIC_;
* Cleanup (clang-format & modify test);



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 21:41:53 +00:00
Sanjay Patel
1674a46fcf add tests for vector urem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:55:17 +00:00
Adrian Prantl
d492dcbc14 dsymutil/modules: Reword the warning for static libraries without module caches
In addition to clarifying the warning message this contains a minor functional
change in that it now warns if the *immediate* parent directory in which the
missing PCM is expected to be isn't found.

This patch also includes a more comprehensive testcase.

rdar://problem/25860711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:36:06 +00:00
Sanjay Patel
ae359d99fb use FileCheck instead of grep for exact checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 20:07:18 +00:00
Rui Ueyama
59427f6dc7 pdbdump: print out symbol names referred by publics stream.
DBI stream contains a stream number of the symbol record stream.
Symbol record streams is an array of length-type-value members.
Each member represents one symbol.

Publics stream contains offsets to the symbol record stream.
This patch is to print out all symbols that are referenced by
the publics stream.

Note that even with this patch, llvm-pdbdump cannot dump all the
information in a publics stream since it contains more information
than symbol names. I'll improve it in followup patches.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:55:17 +00:00
Matthias Braun
2a73788c72 LiveIntervalAnalysis: Fix missing defs in renameDisconnectedComponents().
Fix renameDisconnectedComponents() creating vreg uses that can be
reached from function begin withouthaving a definition (or explicit
live-in). Fix this by inserting IMPLICIT_DEF instruction before
control-flow joins as necessary.

Removes an assert from MachineScheduler because we may now get
additional IMPLICIT_DEF when preparing the scheduling policy.

This fixes the underlying problem of http://llvm.org/PR27705

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 19:46:13 +00:00
Jun Bum Lim
2d7f9c2715 [AArch64] Disable narrow load merge by default
Summary:
As this optimization converts two loads into one load with two shift instructions,
it could potentially hurt performance if a loop is arithmetic operation intensive.

Reviewers: t.p.northover, mcrosier, jmolloy

Subscribers: evandro, jmolloy, aemerson, rengolin, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:45:49 +00:00
Mark Lacey
04be7e88ef Functions with differing phis should not be merged.
Check that the incoming blocks of phi nodes are identical, and block
function merging if they are not.

rdar://problem/26255167

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:39:11 +00:00
Chris Bieneman
28b72d65ff [MachOYAML] Removing duplicated field from LC_UUID YAML
The uuid_command was duplicating the load_command.cmdsize field. This removes the duplicate from the YAML mapping and from the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 18:36:52 +00:00
Chris Bieneman
54530096e5 [obj2yaml][yaml2obj] Adding enumFallback for MachO load commands
This adds support for handling unknown load commands, and a bogus_load_command tests.

Unknown or unsupported load commands can be specified in YAML by their hex value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270239 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 17:20:42 +00:00
Simon Pilgrim
11c52a1f5a [X86][AVX] Generalized matching for target shuffle combines
This patch is a first step towards a more extendible method of matching combined target shuffle masks.

Initially this just pulls out the existing basic mask matches and adds support for some 256/512 bit equivalents. Future patterns will require a number of features to be added but I wanted to keep this patch simple.

I hope we can avoid duplication between shuffle lowering and combining and share more complex pattern match functions in future commits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270230 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:19:30 +00:00
Simon Pilgrim
a7f9ea74d5 [X86][AVX] Sync with clang/test/CodeGen/avx-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270229 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 16:05:55 +00:00
Sanjay Patel
f5a8ebbd97 [SimplifyCFG] eliminate switch cases based on known range of switch condition
This was noted in PR24766:
https://llvm.org/bugs/show_bug.cgi?id=24766#c2

We may not know whether the sign bit(s) are zero or one, but we can still
optimize based on knowing that the sign bit is repeated.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:53:09 +00:00
Sanjay Patel
760078b188 [MCExpr] avoid UB via negation of INT_MIN
I accidentally exposed a bug in MCExpr::evaluateAsRelocatableImpl() with the test file added in:
http://reviews.llvm.org/rL269977

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:09:41 +00:00
Krzysztof Parzyszek
9798d4211d [Hexagon] Use pipe instead of temporary files in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 14:01:34 +00:00
Rafael Espindola
dddfc0bb56 Refactor X86 symbol access classification.
This refactors the logic in X86 to avoid code duplication. It also
splits it in two steps: it first decides if a symbol is local to the DSO
and then uses that information to decide how to access it.

The first part is implemented by shouldAssumeDSOLocal. It is not in any
way specific to X86. In a followup patch I intend to move it to
somewhere common and reused it in other backends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 12:20:10 +00:00
Rafael Espindola
f5a1debd28 Simplify handling of hidden stubs on PowerPC.
We now handle them just like non hidden ones. This was already the case
on x86 (r207518) and arm (r207517).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270205 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 12:00:52 +00:00
Igor Kudrin
88a127497f [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.
If an inline function is observed but unused in a translation unit, dummy
coverage mapping data with zero hash is stored for this function.
If such a coverage mapping section came earlier than real one, the latter
was ignored. As a result, llvm-cov was unable to show coverage information
for those functions.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:14:24 +00:00
Chris Dewhurst
564e8812da [Sparc] Enable more inline assembly constraints.
Note: This is specifically to allow GCC's test pr44707 to pass.

Trivial change, not put for differential revision. Test included.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270192 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:03:01 +00:00
Craig Topper
2f6808a785 [X86] Run the AVX/AVX2 intrinsic tests in AVX512VL mode too just to make sure we don't break any older intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270183 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 05:10:32 +00:00
Craig Topper
264bca366b Revert accidental commit of a test command line addition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270175 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 02:01:51 +00:00
Craig Topper
af1ca0f2aa [X86] Fix some AVX patterns to only be disabled if VLX and BWI are supported. Without this we get isel failures on the avx-intrinsics-x86.ll test in AVX512VL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270174 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 02:00:08 +00:00
Chris Bieneman
5a8295114e [obj2yaml] [yaml2obj] Adding a test for r270124
This test covers strings after load command structs and zero fill bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270159 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 23:26:39 +00:00
Chris Bieneman
e90cbf6c44 [yaml2obj] Removing debug code that scribbled 0xDEADBEEF
Now that MachO load command fields are fully covered we can fill unaccounted for bytes with 0. That allows us to sparsely specify YAML to simplify tests.

Simplifying load_commands test accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 23:26:31 +00:00
Lang Hames
8c34a3f83c [RuntimeDyld][MachO] Add support for SUBTRACTOR relocations between anonymous
symbols on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270157 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 23:26:05 +00:00
Easwaran Raman
ed8d5eadcc Allow -inline-threshold to override default threshold.
Before r257832, the threshold used by SimpleInliner was explicitly specified or generated from opt levels and passed to the base class Inliner's constructor. There, it was first overridden by explicitly specified -inline-threshold. The refactoring in r257832 did not preserve this behavior for all opt levels. This change brings back the original behavior.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 23:02:09 +00:00
Sanjoy Das
4dace2a82e [GuardWidening] Introduce range check merging
Sequences of range checks expressed using guards, like

  guard((I - 2) u< L)
  guard((I - 1) u< L)
  guard((I + 0) u< L)
  guard((I + 1) u< L)
  guard((I + 2) u< L)

can sometimes be combined into a smaller sequence:

  guard((I - 2) u< L AND (I + 2) u< L)

if we can prove that (I - 2) u< L AND (I + 2) u< L implies all of checks
expressed in the previous sequence.

This change teaches GuardWidening to do this kind of merging when
feasible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 22:55:46 +00:00
Matthew Simpson
e40864cee2 [ARM, AArch64] Match additional patterns to ldN instructions
When matching an interleaved load to an ldN pattern, the interleaved access
pass checks that all users of the load are shuffles. If the load is used by an
instruction other than a shuffle, the pass gives up and an ldN is not
generated. This patch considers users of the load that are extractelement
instructions. It attempts to modify the extracts to use one of the available
shuffles rather than the load. After the transformation, the load is only used
by shuffles and will then be matched with an ldN pattern.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270142 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 21:39:00 +00:00
Guozhi Wei
4f4b87e938 [InstCombine] Avoid combining the bitcast of a var that is used as both address and result of load instructions
This patch fixes https://llvm.org/bugs/show_bug.cgi?id=27703.

If there is a sequence of one or more load instructions, each loaded value is used as address of later load instruction, bitcast is necessary to change the value type, don't optimize it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 21:07:01 +00:00
Sanjay Patel
890e6002dc comment out line that is causing UBSAN bot failures
Patch is awaiting review here:
http://reviews.llvm.org/D20434


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 21:00:02 +00:00
Wei Mi
7aaac1e6e2 Recommit r255691 since PR26509 has been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270113 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 20:38:03 +00:00
Hans Wennborg
eda241a530 X86: Don't reset the stack after calls that don't return (PR27117)
Since the calls don't return, the instruction afterwards will never run,
and is just taking up unnecessary space in the binary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 20:15:33 +00:00
Sanjay Patel
57c3a79e65 [x86] add tests for urem lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:57:54 +00:00
Rui Ueyama
cc76d42fd3 pdbdump: Rename NumberOfSymbols -> SymbolRecordStreamIndex.
Differential Revision: http://reviews.llvm.org/D20441

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 18:05:58 +00:00
Simon Pilgrim
9ea46b8e15 [X86][SSE] Added fast-isel tests to sync with clang/test/CodeGen/sse-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 16:55:52 +00:00
Simon Pilgrim
625707515f [X86][SSE2] Fixed shuffle of results in _mm_cmpnge_sd/_mm_cmpngt_sd tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 16:49:53 +00:00
George Rimar
b29ea6447e Temporarily revert r270070
It broke buildbot:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/4817/steps/ninja%20check%201/logs/stdio

Actually it is just because D20273 not yet commited, but these 2 were crossing with each other,
and I`ll better find the way to land them separatelly soon.

Initial commit message:

[llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.

Before this patch llvm-mc generated zlib-gnu styled sections. 
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.

Differential revision: http://reviews.llvm.org/D20331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:58:05 +00:00
Matthew Simpson
204e3200ad [LAA] Check independence of strided accesses before forward case
This patch changes the order in which we attempt to prove the independence of
strided accesses. We previously did this after we knew the dependence distance
was positive. With this change, we check for independence before handling the
negative distance case. The patch prevents LAA from reporting forward
dependences for independent strided accesses.

This change was requested in the review of D19984.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270072 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:37:19 +00:00
George Rimar
c9c693751f [llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.
Before this patch llvm-mc generated zlib-gnu styled sections. 
That means no SHF_COMPRESSED flag was set, magic 'zlib' signature
was used in combination with full size field. Sections were renamed to "*.z*".
This patch reimplements the compression style to zlib one as zlib-gnu looks
to be depricated everywhere.

Differential revision: http://reviews.llvm.org/D20331

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 15:08:31 +00:00
Chad Rosier
ae7c8ddf94 [AArch64 ] Generate a BFXIL from 'or (and X, Mask0Imm),(and Y, Mask1Imm)'.
Mask0Imm and ~Mask1Imm must be equivalent and one of the MaskImms is a shifted
mask (e.g., 0x000ffff0).  Both 'and's must have a single use.

This changes code like:

  and w8, w0, #0xffff000f
  and w9, w1, #0x0000fff0
  orr w0, w9, w8

into

  lsr w8, w1, #4
  bfi w0, w8, #4, #12

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 14:19:47 +00:00
Ranjeet Singh
ab4af72527 [ARM] Add cdp intrinsic tests.
- Renamed intrinsics.ll to intrinsics-coprocessor.ll
  as all the tests were testing coprocessor instructions,
  also made the test checks match the full instruction.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:59:17 +00:00
Artem Tamazov
d8bb9ecd8c [AMDGPU][llvm-mc] Fixes to support buffer atomics.
Fixes for MUBUF_Atomic instructions to make operand list valid:
 - For RTN insns, make a copy of $vdata_in operand as $vdata.
 - Do not add operand for GLC, it is hardcoded and comes as a token.
Workaround to avoid adding multiple default optional operands.
Tests added.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:22:39 +00:00
Zoran Jovanovic
785d7f7fbf ps][microMIPS] Add R_MICROMIPS_PC21_S1 relocation
Differential Revision: http://reviews.llvm.org/D15526


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 12:20:40 +00:00
Simon Pilgrim
e4c02144d1 [X86][SSE2] Added _mm_move_* tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270046 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 11:59:57 +00:00
Simon Pilgrim
a861f2e16e [X86][SSE2] Added _mm_cast* and _mm_set* tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270041 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 10:58:54 +00:00
Daniel Sanders
7b27dc2e11 [mips][mips16] Fix ZERO is not a CPU16Regs register error from the machine verifier.
Summary: Partially fixes PR27458

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-19 10:42:14 +00:00