OSDN Git Service

android-x86/external-llvm.git
7 years agoTarWriter: Use fitsInUstar function.
Rui Ueyama [Sat, 7 Jan 2017 08:32:07 +0000 (08:32 +0000)]
TarWriter: Use fitsInUstar function.

This change should have been commit as part of r291340.

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

7 years agoTarWriter: Use Ustar header's "prefix" field to store long filenames.
Rui Ueyama [Sat, 7 Jan 2017 08:28:56 +0000 (08:28 +0000)]
TarWriter: Use Ustar header's "prefix" field to store long filenames.

Tar's Ustar header has the "prefix" field to store a directory
part of a filename. It is not as flexible as the PAX-extended
filename because there's still a limitation on the maximum filename
size, but it mitigates the situation.

This patch should unbreak some Windows buildbots that uses very
old tar command.

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

7 years ago[X86] Disable load unfolding for 128-bit MOVDDUP instructions since the load size...
Craig Topper [Sat, 7 Jan 2017 06:56:54 +0000 (06:56 +0000)]
[X86] Disable load unfolding for 128-bit MOVDDUP instructions since the load size is smaller than the register size so unfolding would increase the load size.

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

7 years agoFix a typo. NFC
Xin Tong [Sat, 7 Jan 2017 04:30:58 +0000 (04:30 +0000)]
Fix a typo. NFC

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

7 years agoNewGVN: Reformat and fix a few newlines
Daniel Berlin [Sat, 7 Jan 2017 03:23:47 +0000 (03:23 +0000)]
NewGVN: Reformat and fix a few newlines

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

7 years ago[NewGVN] Prefer auto over explicit type. NFCI.
Davide Italiano [Sat, 7 Jan 2017 02:05:50 +0000 (02:05 +0000)]
[NewGVN] Prefer auto over explicit type. NFCI.

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

7 years ago[WebAssembly] Don't abort on code with UB.
Dan Gohman [Sat, 7 Jan 2017 01:50:01 +0000 (01:50 +0000)]
[WebAssembly] Don't abort on code with UB.

Gracefully leave code that performs function-pointer bitcasts implying
non-trivial pointer conversions alone, rather than aborting, since it's
just undefined behavior.

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

7 years ago[WebAssembly] Move a SmallVector to a more specific scope. NFC.
Dan Gohman [Sat, 7 Jan 2017 01:31:18 +0000 (01:31 +0000)]
[WebAssembly] Move a SmallVector to a more specific scope. NFC.

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

7 years agoLowerTypeTests: Thread summary and action from the API and command line into the...
Peter Collingbourne [Sat, 7 Jan 2017 01:17:24 +0000 (01:17 +0000)]
LowerTypeTests: Thread summary and action from the API and command line into the pass.

Also move command line handling out of the pass constructor and into
a separate function.

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

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

7 years agoRemove useless Forward Declaration from header (NFC)
Mehdi Amini [Sat, 7 Jan 2017 00:57:43 +0000 (00:57 +0000)]
Remove useless Forward Declaration from header (NFC)

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

7 years ago[AVR] Parenthesize a boolean expression
Dylan McKay [Sat, 7 Jan 2017 00:55:28 +0000 (00:55 +0000)]
[AVR] Parenthesize a boolean expression

Without the parentheses, clang would emit warnings while compiling the
code.

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

7 years ago[MachineBasicBlock] Add a non-assert live-in accessor for debug mode.
Quentin Colombet [Sat, 7 Jan 2017 00:46:30 +0000 (00:46 +0000)]
[MachineBasicBlock] Add a non-assert live-in accessor for debug mode.

With r291169, it is now not possible to access the live-in information
when the liveness is not properly tracked. Although this is want we want
in general, for debugging purpose we may want to still be able to
traverse this information even if it may not be accurate.

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

7 years ago[WebAssembly] Add a pass to create wrappers for function bitcasts.
Dan Gohman [Sat, 7 Jan 2017 00:34:54 +0000 (00:34 +0000)]
[WebAssembly] Add a pass to create wrappers for function bitcasts.

WebAssembly requires caller and callee signatures to match exactly. In LLVM,
there are a variety of circumstances where signatures may be mismatched in
practice, and one can bitcast a function address to another type to call it
as that type. This patch adds a pass which replaces bitcasted function
addresses with wrappers to replace the bitcasts.

This doesn't catch everything, but it does match many common cases.

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

7 years agoTest commit. Comment formatting, it's -> its.
Jacob Gravelle [Sat, 7 Jan 2017 00:22:31 +0000 (00:22 +0000)]
Test commit. Comment formatting, it's -> its.

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

7 years agoNewGVN: Fix PR 31501.
Daniel Berlin [Sat, 7 Jan 2017 00:01:42 +0000 (00:01 +0000)]
NewGVN: Fix PR 31501.

Summary: LLVM's non-standard notion of phi nodes means we can't both try to substitute for undef in phi nodes *and* use phi nodes as leaders all the time. This changes NewGVN to use the same semantics as SimplifyPHINode to decide which phi nodes are equivalent.

Reviewers: davide

Subscribers: llvm-commits

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

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

7 years agoModuleSummaryIndexYAML: Make a few fields optional to make it easier to write tests.
Peter Collingbourne [Sat, 7 Jan 2017 00:00:22 +0000 (00:00 +0000)]
ModuleSummaryIndexYAML: Make a few fields optional to make it easier to write tests.

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

7 years ago[ThinLTO] Handle conflicting local names gracefully
Teresa Johnson [Fri, 6 Jan 2017 23:38:41 +0000 (23:38 +0000)]
[ThinLTO] Handle conflicting local names gracefully

Summary:
r285871 introduced an assert that was overly aggressive in the case
of a same-named local in different same-named files (in different
directories), where the source name and therefore the GUID ended up
the same because the files were compiled in their own directory without
any leading path. Change the handling in the promotion logic to get
the summary for the version in that module.

This also exposed an issue where we are not always importing the
right copy, which is a performance not correctness issue (because
the renaming is based on the module hash which must be different,
see the bug report for details). I will fix that as a follow-on.

Fixes PR31561.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

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

7 years ago[ThinLTO] Optionally ignore empty index file
Teresa Johnson [Fri, 6 Jan 2017 23:37:17 +0000 (23:37 +0000)]
[ThinLTO] Optionally ignore empty index file

Summary:
In order to simplify distributed build system integration, where actions
may be scheduled before the Thin Link which determines the list of
objects selected by the linker. The gold plugin currently will emit
0-sized index files for objects not selected by the link, to enable
checking for expected output files by the build system. If the build
system then schedules a backend action for these bitcode files, we want
to be able to fall back to normal compilation instead of failing.

This is the LLVM side support for optionally enabling fallback
instead of issuing an error. Return a null CombinedIndex from
llvm::getModuleSummaryIndexForFile under the option when the file
is empty. Clang can then ignore the index when it is null.

Clang patch is D28362.

Reviewers: mehdi_amini

Subscribers: llvm-commits

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

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

7 years ago[PM] Edit comments on PM Proxy and utility classes.
Justin Lebar [Fri, 6 Jan 2017 23:32:02 +0000 (23:32 +0000)]
[PM] Edit comments on PM Proxy and utility classes.

Reviewers: chandlerc

Subscribers: mehdi_amini, llvm-commits

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

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

7 years ago[gtest] Detect warning flags using the positive spelling.
Chandler Carruth [Fri, 6 Jan 2017 23:16:00 +0000 (23:16 +0000)]
[gtest] Detect warning flags using the positive spelling.

Some GCC versions will accept any warning flag name after a '-Wno-',
which would cause us to try to disable warnings with names GCC didn't
understand. This will silently succeed unless there is some other output
from GCC in which case we get weird cc1plus warnings about the warning
name being bogus.

There is still the issue that gtest sets warning flags for building
gtest-all.cc using weird 'add_definitions' and the fact that there is
a GCC version which warns on the variadic macro usage in gtest under
-pedantic, but has no flag analogous to Clang's
-Wgnu-zero-variadic-macro-argumnets to suppress this warning. I haven't
been able to come up with any good solution here. The closest is to turn
off -pedantic for those versions of GCC, but that seems really nasty.
For now, those versinos of GCC aren't warning clean. If anyone is broken
by this, I'll work on CMake logic to detect and disable -pedantic in
these cases.

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

7 years ago[BPF] Fix some Clang-tidy modernize and Include What You Use warnings; other minor...
Eugene Zelenko [Fri, 6 Jan 2017 23:06:25 +0000 (23:06 +0000)]
[BPF] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

7 years ago[InstSimplify] Optimize away udivs in the presence of range metadata
David Majnemer [Fri, 6 Jan 2017 22:58:02 +0000 (22:58 +0000)]
[InstSimplify] Optimize away udivs in the presence of range metadata

We know that udiv %V, C can be optimized away to 0 if %V is ult C.

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

7 years agoFollow-up for r291289: Fix failing global_metadata_darwin.ll test
Kuba Mracek [Fri, 6 Jan 2017 22:22:22 +0000 (22:22 +0000)]
Follow-up for r291289: Fix failing global_metadata_darwin.ll test

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

7 years agoConvert MSF Stream iterators to use llvm iterator facade.
Zachary Turner [Fri, 6 Jan 2017 22:05:12 +0000 (22:05 +0000)]
Convert MSF Stream iterators to use llvm iterator facade.

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

7 years ago[asan] Change the visibility of ___asan_globals_registered to hidden
Kuba Mracek [Fri, 6 Jan 2017 22:02:58 +0000 (22:02 +0000)]
[asan] Change the visibility of ___asan_globals_registered to hidden

This flag is used to track global registration in Mach-O and it doesn't need to be exported and visible.

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

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

7 years agoFix use after free
Xin Tong [Fri, 6 Jan 2017 21:49:08 +0000 (21:49 +0000)]
Fix use after free

Summary: Fix use after free in LoopUnswitch

Reviewers: chenli, atrick, hfinkel, mzolotukhin

Subscribers: llvm-commits

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

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

7 years ago[llvm-config] Print --system-libs only when static linking
Michal Gorny [Fri, 6 Jan 2017 21:33:54 +0000 (21:33 +0000)]
[llvm-config] Print --system-libs only when static linking

Modify the --system-libs option in llvm-config to print system libs only
when using static linking. The system libraries are irrelevant when
linking to a shared library since the library has appropriate library
dependencies embedded.

Modify the --system-libs test appropriately to force static linking, and
disable it if static libs are not available (i.e. BUILD_SHARED_LIBS is
enabled).

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

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

7 years ago[cmake] Canonicalize CMake booleans to 0/1 for lit interop
Michal Gorny [Fri, 6 Jan 2017 21:33:48 +0000 (21:33 +0000)]
[cmake] Canonicalize CMake booleans to 0/1 for lit interop

Canonicalize all CMake booleans to 0/1 before passing them to lit, to
ensure that the Python side handles all of them consistently
and correctly. 0/1 is a safe choice of values that trigger the same
boolean interpretation in CMake, Python and C++.

Furthermore, using them without quotes improves the chance Python will
explicitly fail when an incorrect value (such as ON/OFF, TRUE/FALSE,
YES/NO) is accidentally passed, rather than silently misinterpreting
the value.

This replaces a lot of different logics spread around lit site files,
attempting to partially reproduce the boolean logic used in CMake
and usually silently failing when an uncommon value was used instead.
In fact, some of them were never working correctly since different
values were assigned in CMake and checked in Python.

The alternative solution could be to create a common parser for CMake
booleans in lit and use it consistently throughout the site files.
However, it does not seem like the best idea to create redundant
implementation of the same logic and have to follow upstream if it ever
is extended to handle more values.

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

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

7 years ago[test] Remove unused 'test_examples' config var
Michal Gorny [Fri, 6 Jan 2017 21:33:39 +0000 (21:33 +0000)]
[test] Remove unused 'test_examples' config var

Remove config.test_examples from lit.site.cfg and the relevant
ENABLE_EXAMPLES definition from CMake. It is not used anywhere.

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

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

7 years ago[InstSimplify] Optimize away urems in the presence of range metadata
David Majnemer [Fri, 6 Jan 2017 21:23:51 +0000 (21:23 +0000)]
[InstSimplify] Optimize away urems in the presence of range metadata

We know that urem %V, C can be optimized away to %V if %V is ult C.

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

7 years agoFix LoopLoadElimination to keep original alignment on the inital hoisted store
Mehdi Amini [Fri, 6 Jan 2017 21:06:51 +0000 (21:06 +0000)]
Fix LoopLoadElimination to keep original alignment on the inital hoisted store

This is fixing a bug where Loop Vectorization is widening a load but
with a lower alignment. Hoisting the load without propagating the alignment
will allow inst-combine to later deduce a higher alignment that what the pointer
actually is.

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

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

7 years agoAMDGPU/R600: Don't use REGISTER_{LOAD,STORE} ISD nodes
Jan Vesely [Fri, 6 Jan 2017 21:00:46 +0000 (21:00 +0000)]
AMDGPU/R600: Don't use REGISTER_{LOAD,STORE} ISD nodes

This will make transition to SCRATCH_MEMORY easier

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

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

7 years ago[X86][SSE] Standardized triples in vector shift tests
Simon Pilgrim [Fri, 6 Jan 2017 19:56:57 +0000 (19:56 +0000)]
[X86][SSE] Standardized triples in vector shift tests

Made no sense for them to be different and caused useless diffs in assembly remarks.

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

7 years ago[CostModel][X86] Add AVX512 and 512-bit vector shift cost tests.
Simon Pilgrim [Fri, 6 Jan 2017 19:41:26 +0000 (19:41 +0000)]
[CostModel][X86] Add AVX512 and 512-bit vector shift cost tests.

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

7 years agoAArch64CollectLOH: Rewrite as block-local analysis.
Matthias Braun [Fri, 6 Jan 2017 19:22:01 +0000 (19:22 +0000)]
AArch64CollectLOH: Rewrite as block-local analysis.

Re-apply r288561: This time with a fix where the ADDs that are part of a
3 instruction LOH would not invalidate the "LastAdrp" state. This fixes
http://llvm.org/PR31361

Previously this pass was using up to 5% compile time in some cases which
is a bit much for what it is doing. The pass featured a full blown
data-flow analysis which in the default configuration was restricted to a
single block.

This rewrites the pass under the assumption that we only ever work on a
single block. This is done in a single pass maintaining a state machine
per general purpose register to catch LOH patterns.

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

This reverts commit 9e6cedb0a4f14364d6511597a9160305e7d34493.

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

7 years ago[InstCombine] add a vector version of a test added in r291262; NFC
Sanjay Patel [Fri, 6 Jan 2017 19:14:05 +0000 (19:14 +0000)]
[InstCombine] add a vector version of a test added in r291262; NFC

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

7 years ago[InstCombine] move and add tests for icmp + shl nsw; NFC
Sanjay Patel [Fri, 6 Jan 2017 18:57:54 +0000 (18:57 +0000)]
[InstCombine] move and add tests for icmp + shl nsw; NFC

As discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/108749.html
...we should be able to better optimize this pattern.

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

7 years ago[DWARF] Null out the debug locs of (loop invariant) instructions hoisted by LICM in
Wolfgang Pieb [Fri, 6 Jan 2017 18:38:57 +0000 (18:38 +0000)]
[DWARF] Null out the debug locs of (loop invariant) instructions hoisted by LICM in
order to avoid jumpy line tables. Calls are left alone because they may be inlined.

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

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

7 years agoUse %z for size_t and avoid deprecated string functions
Reid Kleckner [Fri, 6 Jan 2017 18:22:18 +0000 (18:22 +0000)]
Use %z for size_t and avoid deprecated string functions

This usage of strcpy and snprintf was certainly safe, but using them
sets off various deprecation and lint warnings. Easier to just write the
belt and suspenders version.

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

7 years ago[AArch64] Reduce vector insert/extract cost for Falkor.
Chad Rosier [Fri, 6 Jan 2017 18:03:26 +0000 (18:03 +0000)]
[AArch64] Reduce vector insert/extract cost for Falkor.

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

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

7 years ago[X86][SSE] Pass float domain flag to shuffle combine match functions. NFCI.
Simon Pilgrim [Fri, 6 Jan 2017 17:34:30 +0000 (17:34 +0000)]
[X86][SSE] Pass float domain flag to shuffle combine match functions. NFCI.

Early step towards ignoring domain above a certain shuffle depth.

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

7 years ago[AMDGPU] Remove extra semicolon. NFC
Konstantin Zhuravlyov [Fri, 6 Jan 2017 17:23:21 +0000 (17:23 +0000)]
[AMDGPU] Remove extra semicolon. NFC

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

7 years ago[AMDGPU] Do not emit .AMDGPU.config section for amdhsa
Konstantin Zhuravlyov [Fri, 6 Jan 2017 17:02:10 +0000 (17:02 +0000)]
[AMDGPU] Do not emit .AMDGPU.config section for amdhsa

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

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

7 years ago[X86][SSE] Simplify float domain requirement in unary shuffle matching.
Simon Pilgrim [Fri, 6 Jan 2017 17:00:59 +0000 (17:00 +0000)]
[X86][SSE] Simplify float domain requirement in unary shuffle matching.

The AVX1-only limit is never actually required in matchUnaryVectorShuffle

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

7 years ago[X86][AVX] Regenerate shuffle 128-bit tests.
Simon Pilgrim [Fri, 6 Jan 2017 15:56:52 +0000 (15:56 +0000)]
[X86][AVX] Regenerate shuffle 128-bit tests.

The EVEX -> VEX fix means that AVX/AVX512 code is more likely the same now.

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

7 years ago[X86][AVX] Regenerate tzcnt tests.
Simon Pilgrim [Fri, 6 Jan 2017 15:54:23 +0000 (15:54 +0000)]
[X86][AVX] Regenerate tzcnt tests.

The EVEX -> VEX fix means that AVX/AVX512 code is more likely the same now.

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

7 years agoRemove trailing whitespace. NFCI.
Simon Pilgrim [Fri, 6 Jan 2017 15:31:52 +0000 (15:31 +0000)]
Remove trailing whitespace. NFCI.

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

7 years ago[X86] Add X86Subtarget argument. NFCI.
Simon Pilgrim [Fri, 6 Jan 2017 15:29:17 +0000 (15:29 +0000)]
[X86] Add X86Subtarget argument. NFCI.

All callers of getTargetVShiftNode have access to X86Subtarget already so pass it along instead of re-extracting it.

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

7 years ago[ASan] Make ASan instrument variable-masked loads and stores
Filipe Cabecinhas [Fri, 6 Jan 2017 15:24:51 +0000 (15:24 +0000)]
[ASan] Make ASan instrument variable-masked loads and stores

Summary: Previously we only supported constant-masked loads and stores.

Reviewers: kcc, RKSimon, pgousseau, gbedwell, vitalybuka

Subscribers: llvm-commits

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

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

7 years ago[globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.
Daniel Sanders [Fri, 6 Jan 2017 14:29:34 +0000 (14:29 +0000)]
[globalisel] Stop requiring -debug/-debug-only=registerbankinfo for assertions.

Summary:
I've noticed that these assertions don't trigger when the condition is false.
The problem is that the DEBUG(x) macro only executes x when the pass is
emitting debug output via the -debug and -debug-only=registerbankinfo command
line arguments.

Debug builds should always execute the assertions so use '#ifndef NDEBUG' instead.

Also removed an assertion that is only true the first time it's tested. <Target>RegisterBankInfo's constructor will re-use register banks causing them to be valid on subsequent tests. That
assertion will fail on the first test too in the near future.

Reviewers: t.p.northover, ab, rovka, qcolombet

Subscribers: dberris, llvm-commits, kristof.beyls

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

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

7 years ago[CostModel][X86] Fix 512-bit SDIV/UDIV 'big' costs.
Simon Pilgrim [Fri, 6 Jan 2017 11:12:53 +0000 (11:12 +0000)]
[CostModel][X86] Fix 512-bit SDIV/UDIV 'big' costs.

Set the costs on the lowest target that supports the type.

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

7 years ago[CostModel][X86] Add SDIV/UDIV cost tests for a wider range of targets
Simon Pilgrim [Fri, 6 Jan 2017 11:02:40 +0000 (11:02 +0000)]
[CostModel][X86] Add SDIV/UDIV cost tests for a wider range of targets

Added a test demonstrating bug in AVX512 division costs

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

7 years agoMove test input to directory called Inputs.
Daniel Jasper [Fri, 6 Jan 2017 10:22:15 +0000 (10:22 +0000)]
Move test input to directory called Inputs.

It is a common convention that our internal test runner depends upon.

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

7 years ago[llvm-config] Add --cmakedir to obtain CMake module location
Michal Gorny [Fri, 6 Jan 2017 08:23:33 +0000 (08:23 +0000)]
[llvm-config] Add --cmakedir to obtain CMake module location

Add a --cmakedir option to llvm-config that returns the correct path to
built/installed CMake modules (i.e. lib/cmake/llvm). This is mostly
intended as a convenience option for stand-alone builds of other LLVM
projects that frequently reconstruct LLVM_CMAKE_PATH after querying
llvm-config.

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

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

7 years ago[Orc][RPC] Fix an obvious locking-order bug in RawByteChannel::startSendMessage.
Lang Hames [Fri, 6 Jan 2017 06:22:31 +0000 (06:22 +0000)]
[Orc][RPC] Fix an obvious locking-order bug in RawByteChannel::startSendMessage.

The lock needs to be acquired before the data is sent, not afterwards. This
think-o slipped in during the refactor in r286620, but went unnoticed as the
resulting bug only manifests in multi-threaded clients (of which there are none
in-tree).

No unit test as the bug depends on thread scheduling.

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

7 years agoTarWriter: Emit PAX headers only when needed.
Rui Ueyama [Fri, 6 Jan 2017 05:33:45 +0000 (05:33 +0000)]
TarWriter: Emit PAX headers only when needed.

We use PAX headers to store long filenames (>= 100 bytes).
It is not needed to emit PAX headers if filenames fit in the
Ustar header. This patch implements that optimization.

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

7 years ago[AVX-512] Add EXTRACT_SUBVECTOR support to combineBitcastForMaskedOp.
Craig Topper [Fri, 6 Jan 2017 05:18:48 +0000 (05:18 +0000)]
[AVX-512] Add EXTRACT_SUBVECTOR support to combineBitcastForMaskedOp.

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

7 years ago[AVX-512] Add more masked vector extract test cases with and without a bitcast betwee...
Craig Topper [Fri, 6 Jan 2017 05:18:44 +0000 (05:18 +0000)]
[AVX-512] Add more masked vector extract test cases with and without a bitcast between the select.

The ones with the bitcast need additional work to fold the mask operation properly. This will be fixed in a future commit.

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

7 years ago[SelectionDAG] Rework lowerRangeToAssertZExt
David Majnemer [Fri, 6 Jan 2017 02:43:28 +0000 (02:43 +0000)]
[SelectionDAG] Rework lowerRangeToAssertZExt

Utilize ConstantRange to make it easier to interpret range metadata.

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

7 years agoAdd a class to create a tar archive file.
Rui Ueyama [Fri, 6 Jan 2017 02:29:48 +0000 (02:29 +0000)]
Add a class to create a tar archive file.

In LLD, we create cpio archive files for --reproduce command.
cpio was not a bad choice because it is very easy to create, but
it was sometimes hard to use because people are not familiar with
cpio command.

I noticed that creating a tar archive isn't as hard as I thought.
So I implemented it in this patch.

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

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

7 years agoRevert "Use _Unwind_Backtrace on Apple platforms."
Bob Wilson [Fri, 6 Jan 2017 02:26:33 +0000 (02:26 +0000)]
Revert "Use _Unwind_Backtrace on Apple platforms."

This reverts commit 63165f6ae3bac1623be36d4b3ce63afa1d51a30a.

After making this change, I discovered that _Unwind_Backtrace is
unable to unwind past a signal handler after an assertion failure.
I filed a bug report about that issue in rdar://29866587 but even if
we get a fix soon, it will be awhile before it get released.

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

7 years agoDisable sigaltstack on Apple platforms
Bob Wilson [Fri, 6 Jan 2017 02:26:30 +0000 (02:26 +0000)]
Disable sigaltstack on Apple platforms

Using sigaltstack on Apple platforms is a bad idea. Darwin's backtrace()
function does not work with sigaltstack, and my change in r286851 was
supposed to solve that by using _Unwind_Backtrace instead. I tested that
_Unwind_Backtrace works for crashes but then discovered that it does not
work for assertion failures when using sigaltstack, at least on macOS.
The stack trace shows only the frames on the alternate stack.
I also saw some reports of this happening for crashes, but it fails
consistently for assertion failures. I tried various things to get it to
work but the problem seems to be in _Unwind_Backtrace itself. Disabling
sigaltstack is unfortunate since it would be nice to get backtraces for
stack overflows, but at least this gets us backtraces for the more common
cases. rdar://problem/29662459

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

7 years agoLowerTypeTests: Split the pass in two: a resolution phase and a lowering phase.
Peter Collingbourne [Fri, 6 Jan 2017 02:22:47 +0000 (02:22 +0000)]
LowerTypeTests: Split the pass in two: a resolution phase and a lowering phase.

This change separates how type identifiers are resolved from how intrinsic
calls are lowered. All information required to lower an intrinsic call
is stored in a new TypeIdLowering data structure. The idea is that this
data structure can either be initialized using the module itself during
regular LTO, or using the module summary in ThinLTO backends.

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

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

7 years agoRemove unused private fields to fix the clang -Werror build.
David Blaikie [Fri, 6 Jan 2017 00:48:24 +0000 (00:48 +0000)]
Remove unused private fields to fix the clang -Werror build.

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

7 years ago[AArch64, Lanai] Fix some Clang-tidy modernize and Include What You Use warnings...
Eugene Zelenko [Fri, 6 Jan 2017 00:30:53 +0000 (00:30 +0000)]
[AArch64, Lanai] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

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

7 years ago[SelectionDAG] Correctly transform range metadata to AssertZExt
David Majnemer [Fri, 6 Jan 2017 00:11:46 +0000 (00:11 +0000)]
[SelectionDAG] Correctly transform range metadata to AssertZExt

We used the logBase2 of the high instead of the ceilLogBase2 resulting
in the wrong result for certain values.  For example, it resulted in an
i1 AssertZExt when the exclusive portion of the range was 3.

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

7 years ago[libFuzzer] remove dead code, NFC
Kostya Serebryany [Fri, 6 Jan 2017 00:09:40 +0000 (00:09 +0000)]
[libFuzzer] remove dead code, NFC

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

7 years agoAdd iterator support to DWARFDie to allow child DIE iteration.
Greg Clayton [Thu, 5 Jan 2017 23:47:37 +0000 (23:47 +0000)]
Add iterator support to DWARFDie to allow child DIE iteration.

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

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

7 years agoCode cleanup: Remove tab indents.
Logan Chien [Thu, 5 Jan 2017 23:41:33 +0000 (23:41 +0000)]
Code cleanup: Remove tab indents.

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

7 years ago[APFloatTest] Add tests for various operations
Tim Shen [Thu, 5 Jan 2017 22:57:54 +0000 (22:57 +0000)]
[APFloatTest] Add tests for various operations

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

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

7 years ago[CostModel][X86] Tidyup arithmetic costs code. NFCI.
Simon Pilgrim [Thu, 5 Jan 2017 22:48:02 +0000 (22:48 +0000)]
[CostModel][X86] Tidyup arithmetic costs code. NFCI.

Remove unnecessary braces, remove one use variables and keep LUTs to similar naming convention.

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

7 years ago[libFuzzer] improve error handling during the merge (handle various IO failures)
Kostya Serebryany [Thu, 5 Jan 2017 22:05:47 +0000 (22:05 +0000)]
[libFuzzer] improve error handling during the merge (handle various IO failures)

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

7 years ago[AArch64] Fold some filled/spilled subreg COPYs
Geoff Berry [Thu, 5 Jan 2017 21:51:42 +0000 (21:51 +0000)]
[AArch64] Fold some filled/spilled subreg COPYs

Summary:
Extend AArch64 foldMemoryOperandImpl() to handle folding spills of
subreg COPYs with read-undef defs like:

  %vreg0:sub_32<def,read-undef> = COPY %WZR; GPR64:%vreg0

by widening the spilled physical source reg and generating:

  STRXui %XZR <fi#0>

as well as folding fills of similar COPYs like:

  %vreg0:sub_32<def,read-undef> = COPY %vreg1; GPR64:%vreg0, GPR32:%vreg1

by generating:

  %vreg0:sub_32<def,read-undef> = LDRWui <fi#0>

Reviewers: MatzeB, qcolombet

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

7 years agoFix typo. NFC
Xin Tong [Thu, 5 Jan 2017 21:40:08 +0000 (21:40 +0000)]
Fix typo. NFC

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

7 years agoThinLTO: add early "dead-stripping" on the Index
Teresa Johnson [Thu, 5 Jan 2017 21:34:18 +0000 (21:34 +0000)]
ThinLTO: add early "dead-stripping" on the Index

Summary:
Using the linker-supplied list of "preserved" symbols, we can compute
the list of "dead" symbols, i.e. the one that are not reachable from
a "preserved" symbol transitively on the reference graph.
Right now we are using this information to mark these functions as
non-eligible for import.

The impact is two folds:
- Reduction of compile time: we don't import these functions anywhere
  or import the function these symbols are calling.
- The limited number of import/export leads to better internalization.

Patch originally by Mehdi Amini.

Reviewers: mehdi_amini, pcc

Subscribers: llvm-commits

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

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

7 years agoPR 31534: When emitting both DWARF unwind tables and debug information,
Joerg Sonnenberger [Thu, 5 Jan 2017 20:55:28 +0000 (20:55 +0000)]
PR 31534: When emitting both DWARF unwind tables and debug information,
do not use .cfi_sections. This requires checking if any non-declaration
function in the module needs an unwind table.

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

7 years ago[LICM] Allow promotion of some stores that are not guaranteed to execute.
Michael Kuperstein [Thu, 5 Jan 2017 20:42:06 +0000 (20:42 +0000)]
[LICM] Allow promotion of some stores that are not guaranteed to execute.

Promotion is always legal when a store within the loop is guaranteed to execute.

However, this is not a necessary condition - for promotion to be memory model
semantics-preserving, it is enough to have a store that dominates every exit
block. This is because if the store dominates every exit block, the fact the
exit block was executed implies the original store was executed as well.

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

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

7 years agoCodeGen: Assert that liveness is up to date when reading block live-ins.
Matthias Braun [Thu, 5 Jan 2017 20:01:19 +0000 (20:01 +0000)]
CodeGen: Assert that liveness is up to date when reading block live-ins.

Add an assert that checks whether liveins are up to date before they are
used.

- Do not print liveins into .mir files anymore in situations where they
  are out of date anyway.
- The assert in the RegisterScavenger is superseded by the new one in
  livein_begin().
- Skip parts of the liveness updating logic in IfConversion.cpp when
  liveness isn't tracked anymore (just enough to avoid hitting the new
  assert()).

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

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

7 years agoRevert "Reapply r291025 ("AMDGPU: Remove unneccessary intermediate vector")"
Evgeniy Stepanov [Thu, 5 Jan 2017 19:51:13 +0000 (19:51 +0000)]
Revert "Reapply r291025 ("AMDGPU: Remove unneccessary intermediate vector")"

Summary: This reverts commit r291144. It breaks build bots.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/3270, http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/2058

lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:1638:12: error: could not convert ‘(const unsigned int*)(& Variants)’ from ‘const unsigned int*’ to ‘llvm::ArrayRef<unsigned int>’
     return Variants;

Reviewers: eugenis, tstellarAMD

Patch by Alex Shlyapnikov.

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

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

7 years ago[CostModel][X86] Move vXi32 MUL costs into existing tables. NFCI.
Simon Pilgrim [Thu, 5 Jan 2017 19:42:43 +0000 (19:42 +0000)]
[CostModel][X86] Move vXi32 MUL costs into existing tables. NFCI.

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

7 years agoRemove trailing whitespace. NFCI.
Simon Pilgrim [Thu, 5 Jan 2017 19:24:25 +0000 (19:24 +0000)]
Remove trailing whitespace. NFCI.

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

7 years ago[CostModel][X86] Reordered SSE42 arithmetic cost LUT into descending order. NFCI.
Simon Pilgrim [Thu, 5 Jan 2017 19:19:39 +0000 (19:19 +0000)]
[CostModel][X86] Reordered SSE42 arithmetic cost LUT into descending order. NFCI.

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

7 years ago[CostModel][X86] Move vXi64 MUL costs into existing tables. NFCI.
Simon Pilgrim [Thu, 5 Jan 2017 19:01:50 +0000 (19:01 +0000)]
[CostModel][X86] Move vXi64 MUL costs into existing tables. NFCI.

Removes need for yet another LUT.

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

7 years ago[LICM] Small update to note changes made in hoistRegion
Andrew Kaylor [Thu, 5 Jan 2017 18:53:24 +0000 (18:53 +0000)]
[LICM] Small update to note changes made in hoistRegion

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

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

7 years ago[CostModel][X86] Strip unused 256-bit vector shift costs. NFCI.
Simon Pilgrim [Thu, 5 Jan 2017 18:36:48 +0000 (18:36 +0000)]
[CostModel][X86] Strip unused 256-bit vector shift costs. NFCI.

Remove SSE2 256-bit entries - AVX targets will have used the SSE42 costs instead.

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

7 years ago[x86] add test to show bug in select lowering; NFC
Sanjay Patel [Thu, 5 Jan 2017 18:35:44 +0000 (18:35 +0000)]
[x86] add test to show bug in select lowering; NFC

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

7 years ago[CostModel][X86] Include the cost of 256-bit upper subvector extract/insertion in...
Simon Pilgrim [Thu, 5 Jan 2017 18:20:25 +0000 (18:20 +0000)]
[CostModel][X86] Include the cost of 256-bit upper subvector extract/insertion in AVX1 v4i64 MUL

Matches other MUL/ADD/SUB 256-bit case on AVX1

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

7 years agoTypo
Joerg Sonnenberger [Thu, 5 Jan 2017 17:59:22 +0000 (17:59 +0000)]
Typo

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

7 years ago[CostModel][X86] Merged SK_PermuteSingleSrc/SK_PermuteTwoSrc into common shuffle...
Simon Pilgrim [Thu, 5 Jan 2017 17:56:19 +0000 (17:56 +0000)]
[CostModel][X86] Merged SK_PermuteSingleSrc/SK_PermuteTwoSrc into common shuffle cost LUTs. NFCI.

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

7 years agoReapply r291025 ("AMDGPU: Remove unneccessary intermediate vector")
Matt Arsenault [Thu, 5 Jan 2017 17:36:11 +0000 (17:36 +0000)]
Reapply r291025 ("AMDGPU: Remove unneccessary intermediate vector")

Arrays are supposed to be static const

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

7 years ago[AArch64][CostModel] Add coverage for bswap intrinsics.
Chad Rosier [Thu, 5 Jan 2017 16:55:32 +0000 (16:55 +0000)]
[AArch64][CostModel] Add coverage for bswap intrinsics.

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

7 years ago[Docs] Update docs to indicate that CUDA compilation is supported on Windows.
Justin Lebar [Thu, 5 Jan 2017 16:54:28 +0000 (16:54 +0000)]
[Docs] Update docs to indicate that CUDA compilation is supported on Windows.

Subscribers: cfe-commits, llvm-commits

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

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

7 years agoRemove a unnecessary hasLoopInvariantOperands check in loop sink.
Xin Tong [Thu, 5 Jan 2017 16:52:37 +0000 (16:52 +0000)]
Remove a unnecessary hasLoopInvariantOperands check in loop sink.

Summary:
Preheader instruction's operands will always be invariant w.r.t. the loop which its the preheader
for.

Memory aliases are handled in canSinkOrHoistInst.

Reviewers: danielcdh, davidxl

Subscribers: mzolotukhin, llvm-commits

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

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

7 years ago[X86] Add test cases that cover pr31551. NFC.
Zvi Rackover [Thu, 5 Jan 2017 16:48:28 +0000 (16:48 +0000)]
[X86] Add test cases that cover pr31551. NFC.

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

7 years agoless braces; NFC
Sanjay Patel [Thu, 5 Jan 2017 16:47:32 +0000 (16:47 +0000)]
less braces; NFC

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

7 years ago[CostModel][X86] Add support for broadcast shuffle costs
Simon Pilgrim [Thu, 5 Jan 2017 15:56:08 +0000 (15:56 +0000)]
[CostModel][X86] Add support for broadcast shuffle costs

Currently only for broadcasts with input and output of the same width.

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

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

7 years ago[X86] Optimize vector shifts with variable but uniform shift amounts
Zvi Rackover [Thu, 5 Jan 2017 15:11:43 +0000 (15:11 +0000)]
[X86] Optimize vector shifts with variable but uniform shift amounts

Summary:
For instructions such as PSLLW/PSLLD/PSLLQ a variable shift amount may be passed in an XMM register.
The lower 64-bits of the register are evaluated to determine the shift amount.
This patch improves the construction of the vector containing the shift amount.

Reviewers: craig.topper, delena, RKSimon

Subscribers: llvm-commits

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

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

7 years ago[ThinLTO] Add parenthesis as per build warning
Teresa Johnson [Thu, 5 Jan 2017 15:10:10 +0000 (15:10 +0000)]
[ThinLTO] Add parenthesis as per build warning

Fixes a warning about "||" and "&&" due to r291108.

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

7 years ago[AArch64] Remove mcpu option as this test is not target specific. NFC.
Chad Rosier [Thu, 5 Jan 2017 15:05:03 +0000 (15:05 +0000)]
[AArch64] Remove mcpu option as this test is not target specific. NFC.

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

7 years ago[PowerPC] Implement missing ISA 2.06 instructions.
Tony Jiang [Thu, 5 Jan 2017 15:00:45 +0000 (15:00 +0000)]
[PowerPC] Implement missing ISA 2.06 instructions.

Instructions: fctidu[.], fctiwu[.], ftdiv, ftsqrt are not implemented. Implement
them and add corresponding test cases in this patch.

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