OSDN Git Service
Piotr Padlewski [Mon, 23 Jan 2017 16:38:10 +0000 (16:38 +0000)]
[MemorySSA] Add new tests for invariant.groups
Summary:
Next round of extra tests for MSSA.
I have a prototype invariant.group handling implementation
that fixes all the FIXMEs, and I think it will be
easier to see what is the difference if I firstly
post this, and then only fix fixits.
Reviewers: george.burgess.iv, dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292797
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 23 Jan 2017 15:22:59 +0000 (15:22 +0000)]
[InstCombine][X86] Add MULDQ/MULUDQ constant folding support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292793
91177308-0d34-0410-b5e6-
96231b3b80d8
Amaury Sechet [Mon, 23 Jan 2017 15:13:01 +0000 (15:13 +0000)]
Tweak ASCII art in Simplify CFG. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292792
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Mon, 23 Jan 2017 14:09:58 +0000 (14:09 +0000)]
[SystemZ] Mark vector immediate load instructions with useful flags.
Vector immediate load instructions should have the isAsCheapAsAMove, isMoveImm
and isReMaterializable flags set. With them, these instruction will get
hoisted out of loops.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292790
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Mon, 23 Jan 2017 13:52:08 +0000 (13:52 +0000)]
RuntimeDyldELF: add LDST128_ABS_LO12_NC reloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292788
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Mon, 23 Jan 2017 13:13:47 +0000 (13:13 +0000)]
RuntimeDyldELF: add LDST8_ABS_LO12_NC and LDST16_ABS_LO12_NC relocs
Differential revision: https://reviews.llvm.org/D28863
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292785
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 23 Jan 2017 12:07:32 +0000 (12:07 +0000)]
[InstCombine][X86] MULDQ/MULUDQ undef -> zero
Match generic mul behaviour so that <X x i64> multiply and muldq/muludq pattern act the same
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292784
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Mon, 23 Jan 2017 11:53:16 +0000 (11:53 +0000)]
[SLP] Additional test for SLP vectorizer with 31 reduction elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292783
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 23 Jan 2017 10:57:39 +0000 (10:57 +0000)]
[InstCombine][SSE] Tests showing missed opportunities to constant fold PMULDQ/PMULUDQ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292782
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 23 Jan 2017 08:33:29 +0000 (08:33 +0000)]
This test apparently requires an x86 target and is failing on numerous
bots ever since d0k fixed the CHECK lines so that it did something at
all.
It isn't actually testing SCEV directly but LSR, so move it into LSR and
the x86-specific tree of tests that already exists there. Target
dependence is common and unavoidable with the current design of LSR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292774
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 23 Jan 2017 08:33:24 +0000 (08:33 +0000)]
[PM] Replace the hard invalidate in JumpThreading for LVI with correct
invalidation of deleted functions in GlobalDCE.
This was always testing a bug really triggered in GlobalDCE. Right now
we have analyses with asserting value handles into IR. As long as those
remain, when *deleting* an IR unit, we cannot wait for the normal
invalidation scheme to kick in even though it was designed to work
correctly in the face of these kinds of deletions. Instead, the pass
needs to directly handle invalidating the analysis results pointing at
that IR unit.
I've tought the Inliner about this and this patch teaches GlobalDCE.
This will handle the asserting VH case in the existing test as well as
other issues of the same fundamental variety. I've moved the test into
the GlobalDCE directory and added a comment explaining what is going on.
Note that we cannot simply require LVI here because LVI is too lazy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292773
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 23 Jan 2017 07:53:20 +0000 (07:53 +0000)]
[PM] Add a dedicated test case for the issue fixed in r292770.
While this is covered by a clang test case, we should have something
locally to LLVM that immediately checks the inliner doesn't leave
analyses to dangling IR bodies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292772
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 23 Jan 2017 07:33:21 +0000 (07:33 +0000)]
[globalisel] Remove unused, duplicate file added in r292478
It seems it appeared during a rebase (diff 6) of D27338
and went unnoticed.
Thanks to David Majnemer for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292771
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 23 Jan 2017 07:03:41 +0000 (07:03 +0000)]
[PM] Clear any analyses for a dead function after inlining it and before
clearing its body. This is essential to avoid triggering asserting value
handles in analyses on the function's body.
I'm working on a test case for this behavior in LLVM, but Clang has
a great one that managed to trigger this on all of the bots already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292770
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 23 Jan 2017 06:35:12 +0000 (06:35 +0000)]
[PM] Teach LVI to correctly invalidate itself when its dependencies
become unavailable.
The AssumptionCache is now immutable but it still needs to respond to
DomTree invalidation if it ended up caching one.
This lets us remove one of the explicit invalidates of LVI but the
other one continues to avoid hitting a latent bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292769
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 22 Jan 2017 22:45:23 +0000 (22:45 +0000)]
[X86][SSE] Add missing X86ISD::ANDNP combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292767
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 22 Jan 2017 22:21:44 +0000 (22:21 +0000)]
[X86][SSE] Improve shuffle combining with zero insertions
Add support for handling shuffles with scalar_to_vector(0)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292766
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 21:55:46 +0000 (21:55 +0000)]
[libFuzzer] Add missing dependency for tests.
Dependency on TestBinaries was erroneously removed on r292735.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292765
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 22 Jan 2017 21:15:27 +0000 (21:15 +0000)]
[X86][SSE] Regenerate sqrt tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292764
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 22 Jan 2017 21:06:28 +0000 (21:06 +0000)]
Fix test name. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292763
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 22 Jan 2017 21:01:19 +0000 (21:01 +0000)]
Attempt to fix test in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292762
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 22 Jan 2017 20:28:56 +0000 (20:28 +0000)]
Fix some broken CHECK lines.
The colon is important.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292761
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 22 Jan 2017 17:41:10 +0000 (17:41 +0000)]
llvm-cxxfilt: support `-_`
Add the `--strip-underscore` option to llvm-cxxfilt to strip the leading
underscore. This is useful for when dealing with targets which add a
leading underscore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292759
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 22 Jan 2017 17:06:12 +0000 (17:06 +0000)]
[x86] avoid crashing with illegal vector type (PR31672)
https://llvm.org/bugs/show_bug.cgi?id=31672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 22 Jan 2017 10:34:01 +0000 (10:34 +0000)]
[PM] Fix a really nasty bug introduced when adding PGO support to the
new PM's inliner.
The bug happens when we refine an SCC after having computed a proxy for
the FunctionAnalysisManager, and then proceed to compute fresh analyses
for functions in the *new* SCC using the manager provided by the old
SCC's proxy. *And* when we manage to mutate a function in this new SCC
in a way that invalidates those analyses. This can be... challenging to
reproduce.
I've managed to contrive a set of functions that trigger this and added
a test case, but it is a bit brittle. I've directly checked that the
passes run in the expected ways to help avoid the test just becoming
silently irrelevant.
This gets the new PM back to passing the LLVM test suite after the PGO
improvements landed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292757
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 22 Jan 2017 10:33:58 +0000 (10:33 +0000)]
[PM] Add some debug logging to the new PM inliner to make it easier to
trace its behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292756
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 22 Jan 2017 10:33:54 +0000 (10:33 +0000)]
[PM] Improve the debug logging to always include the IR unit's name when
logging pass and analyses information.
This is particularly useful when filtering the debug log for
a particular function or loop where something got inappropriately
cached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292755
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 22 Jan 2017 06:53:07 +0000 (06:53 +0000)]
[IR] Add LLVM_READONLY to BasicBlock::getTerminator.
I noticed that this function got called twice in compiled code to create succ_begin and succ_end iterators. Adding this directive helps the compiler share the call.
Ideally we'd just make this method available for inlining since its quite simple, but the current header file arrangements don't allow that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292754
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 22 Jan 2017 06:53:04 +0000 (06:53 +0000)]
[IR] Use const_cast to reuse the const version of two BasicBlock methods that are duplicated for both const and non-const. NFC
Similar is already done for other methods in BasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292753
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sun, 22 Jan 2017 03:47:49 +0000 (03:47 +0000)]
[docs] Point to upstream Sphinx install instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292752
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 02:28:12 +0000 (02:28 +0000)]
[libFuzzer] Specify the CRT considered (MT or MD) for tests on Windows.
Differential Revision: https://reviews.llvm.org/D28439
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292749
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 02:28:08 +0000 (02:28 +0000)]
[libFuzzer] Fix test with shared libraries on Windows.
We need to set BINARY_DIR to: ${CMAKE_BINARY_DIR}/lib/Fuzzer/test , so the dll
is placed in the same directory than the test LLVMFuzzer-DSOTest, and is found
when executing that test.
As we are using CMAKE_CXX_CREATE_SHARED_LIBRARY to link the dll, we can't modify
the output directory for the import library. It will be created in the same
directory than the dll (in BINARY_DIR), no matter which value we set to
LIBRARY_DIR. So, if we set LIBRARY_DIR to a different directory than BINARY_DIR,
when linking LLVMFuzzer-DSOTest, cmake will look for the import library
LLVMFuzzer-DSO1.lib in LIBRARY_DIR, and won't find it, since it was created in
BINARY_DIR. So, for Windows, we need that LIBRARY_DIR and BINARY_DIR are the
same directory.
Differential Revision: https://reviews.llvm.org/D27870
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292748
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:59 +0000 (01:58 +0000)]
[libFuzzer] AlrmHandler is executed in a different thread for Windows.
Don't check for InFuzzingThread() on Windows, since the AlarmHandler() is
always executed by a different thread from a thread pool.
If we don't add these changes, the alarm handler will never execute.
Note that we decided to ignore possible problem in the synchronization.
Differential Revision: https://reviews.llvm.org/D28723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292746
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:55 +0000 (01:58 +0000)]
[libFuzzer] Leak Sanitizer is not supported for Windows.
Differential Revision: https://reviews.llvm.org/D28709
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292745
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:50 +0000 (01:58 +0000)]
[libFuzzer] Fix OutOfMemory tests to work on 32 bits.
I add 2 changes to make the tests work on 32 bits and on 64 bits.
I change the size allocated to 0x20000000 and add the flag: -rss_limit_mb=300.
Otherwise the output for 32 bits and 64 bits is different.
For 64 bits the value 0xff000000 doesn't exceed kMaxAllowedMallocSize.
For 32 bits, kMaxAllowedMallocSize is set to 0xc0000000, so the call to
Allocate() will fail earlier printing "WARNING: AddressSanitizer failed to
allocate ..." , and wont't call malloc hooks.
So, we need to consider a size smaller than 2GB (so malloc doesn't fail on
32bits) and greater that the value provided by -rss_limit_mb.
Because of that I use: 0x20000000.
Differential Revision: https://reviews.llvm.org/D28706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292744
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:45 +0000 (01:58 +0000)]
[libFuzzer] Avoid undefined behavior, properly discard output to stdout/stderr.
Fix libFuzzer when setting -close_fd_mask to a non-zero value.
In previous implementation, libFuzzer closes the file descriptors for
stdout/stderr. This has some disavantages:
For `fuzzer-fdmask.test`, we write directly to stdout and stderr using the
file streams stdout and stderr, after the file descriptors are closed, which is
undefined behavior. In Windows, in particular, this was making the test fail.
Also, if we close stdout and we open a new file in libFuzzer, we get the file
descriptor 1, which could generate problem if some code assumes file descriptors
refers to stdout and works directly writing to the file descriptor 1, but it
will be writing to the opened file (for example using std::cout).
Instead of closing the file descriptors, I redirect the output to /dev/null on
linux and nul on Windows.
Differential Revision: https://reviews.llvm.org/D28718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292743
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:40 +0000 (01:58 +0000)]
[libFuzzer] Remove lib prefix from library names on tests.
This changes is necessary on Windows, where libraries doesn't include the prefix
"lib".
Differential Revision: https://reviews.llvm.org/D28710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292742
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:36 +0000 (01:58 +0000)]
[libFuzzer] Fix ListFilesInDirRecursive() to do the same for Posix and Windows.
Update `ListFilesInDirRecursive` implementation on Windows to have the same
behavior than for Posix, when the directory doesn't exists and when it is empty.
Differential Revision: https://reviews.llvm.org/D28711
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292741
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:31 +0000 (01:58 +0000)]
[libFuzzer] Consider both possible separators for tests.
Differential Revision: https://reviews.llvm.org/D28636
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292740
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:58:26 +0000 (01:58 +0000)]
[libFuzzer] Portably disassemble and find calls to sanitizer_cov_trace_pc_guard.
Instead of directly using objdump, which is not present on Windows, we consider
different tools depending on the platform.
For Windows, we consider dumpbin and llvm-objdump.
Differential Revision: https://reviews.llvm.org/D28635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292739
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:27:47 +0000 (01:27 +0000)]
[libFuzzer] Portable implementation of `IsInterestingCoverageFile()`.
For Posix systems and Windows, we need to consider different cases.
Differential Revision: https://reviews.llvm.org/D28633
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292738
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:27:42 +0000 (01:27 +0000)]
[libFuzzer] Remove optimization flags for tests.
We need to build all the tests with -O0, otherwise optimizations may merge some
basic blocks and the tests will fail.
In this diff, I simplify the cmake implementation and I remove the flags for
Windows too (/O[123s]).
Differential Revision: https://reviews.llvm.org/D28632
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292737
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:27:38 +0000 (01:27 +0000)]
[libFuzzer] Expose Sanitizer Coverage functions from libFuzzer.
We need to expose Sanitizer Coverage's functions that are rewritten with a
different implementation, so compiler-rt's libraries have access to it.
Differential Revision: https://reviews.llvm.org/D28618
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292736
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:27:34 +0000 (01:27 +0000)]
[libFuzzer] Remove dependencies for tests on Windows.
Remove dependency on FileCheck, sancov and not for tests on Windows.
If LLVM_USE_SANITIZER=Address and LLVM_USE_SANITIZE_COVERAGE=YES, this will
trigger the building of dependencies with sanitizer instrumentation.
This will fail in Windows, since cmake will use link.exe for linking and won't
include compiler-rt libraries.
Differential Revision: https://reviews.llvm.org/D27993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292735
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Sun, 22 Jan 2017 01:26:18 +0000 (01:26 +0000)]
[libFuzzer] Disable afl tests for Windows.
On Windows, we don't have interoperability between libFuzzer and afl.
Differential Revision: https://reviews.llvm.org/D28355
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292734
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Padlewski [Sat, 21 Jan 2017 22:14:02 +0000 (22:14 +0000)]
[MemorySSA] Remove deprecated comment from test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292733
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Padlewski [Sat, 21 Jan 2017 21:56:56 +0000 (21:56 +0000)]
[MemorySSA] Fix invariant.group test and add new
Summary:
This test had a bug: !llvm.invariant.group instead
of !invariant.group.
Also add some new test for future development.
All tests passes, when MSSA will support invariant.group
only the lines with FIXIT should be changed.
Reviewers: dberlin, george.burgess.iv
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28969
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292730
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 21 Jan 2017 17:59:59 +0000 (17:59 +0000)]
[InstCombine] use m_APInt to allow ashr folds for vectors with splat constants
We may be able to assert that no shl-shl or lshr-lshr pairs ever get here
because we should have already handled those in foldShiftedShift().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292726
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 21 Jan 2017 17:51:25 +0000 (17:51 +0000)]
[ValueTracking] tighten up matchMinMax(); NFCI
This is similar to what the caller (matchSelectPattern()) does. In all
cases where we succeed in matching a min/max pattern, the values in
that pattern will be the values of the 'select', so hoist that and
remove a bunch of duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292725
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 21 Jan 2017 17:43:06 +0000 (17:43 +0000)]
[InstCombine] add tests for ashr-ashr; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292724
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 21 Jan 2017 07:46:03 +0000 (07:46 +0000)]
[Orc][RPC] Add 'removeHandler' and 'clearHandlers' methods to RPC endpoints.
This can be used to free handler resources for handlers that won't be called
again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292714
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 21 Jan 2017 06:59:38 +0000 (06:59 +0000)]
[X86] Don't allow commuting to form phsub operations.
Fixes PR31714.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292713
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 21 Jan 2017 06:59:35 +0000 (06:59 +0000)]
[X86] Add test cases that show bad commuting being allowed to create a phsub operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292712
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 21 Jan 2017 06:01:22 +0000 (06:01 +0000)]
Add missing dependency to "Module Summary Analysis" pass
This is fixing a clang crash when running `clang -flto=thin -save-temps`
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292711
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 21 Jan 2017 04:16:53 +0000 (04:16 +0000)]
[PM] Sink an LCSSA preservation assert from the LoopSimplify pass into
the library routine shared with the new PM and other code.
This assert checks that when LCSSA preservation is requested we start in
LCSSA form. Without this early assert, given *very* complex test cases
we can hit an assert or crash much later on when trying to preserve
LCSSA.
The new PM's loop simplify doesn't need to (and indeed can't) preserve
LCSSA as the new PM doesn't deal in transforms in the dependency graph.
But we asked the library to and shockingly, this didn't work very well!
Stop doing that. Now the assert will tell us immediately with existing
test cases. Before this, it took a pretty convoluted input to trigger
this.
However, sinking the assert also found a bug in LoopUnroll where we
asked simplifyLoop to preserve LCSSA *right before we reform it*. That's
kinda silly and unsurprising that it wasn't available. =D Stop doing
that too.
We also would assert that the unrolled loop was in LCSSA even if
preserving LCSSA was never requested! I don't have a test case or
anything here. I spotted it by inspection and it seems quite obvious. No
logic change anyways, that's just avoiding a spurrious assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292710
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 21 Jan 2017 03:48:51 +0000 (03:48 +0000)]
[PM] Teach the loop PM to run LoopSimplify prior to the loop pipeline.
This adds the last remaining core feature of the loop pass pipeline in
the new PM and removes the last of the really egregious hacks in the
LICM tests.
Sadly, this requires really substantial changes in the unittests in
order to provide and maintain simplified loops. This is particularly
hard because for example LoopSimplify will try to fold undef branches to
an ideal direction and simplify the loop accordingly.
Differential Revision: https://reviews.llvm.org/D28766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292709
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 21 Jan 2017 02:52:29 +0000 (02:52 +0000)]
llvm-strings: remove default for -Wcovered-switch-default
Fix the -Werror build by removing the unnecessary default case in the
covered switch. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292708
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 21 Jan 2017 02:36:28 +0000 (02:36 +0000)]
llvm-strings: add support for `-t`
Allow printing the file content offset via the `-t` or `--radix` option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292707
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 21 Jan 2017 02:36:26 +0000 (02:36 +0000)]
llvm-cxxfilt: support the `-s` option
This is a stub implementation of the `-s` or `--format` option that
allows the user to specify the demangling style. Since we only support
the Itanium (GNU) style demangling, auto is synonymous with `gnu`.
Simply swallow the option to permit some level of commandline
compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292706
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Sat, 21 Jan 2017 02:21:04 +0000 (02:21 +0000)]
LiveRegUnits: Add accumulateBackward() function
Re-Commit r292543 with a fix for the situation when the chain end is
MBB.end().
This function can be used to accumulate the set of all read and modified
register in a sequence of instructions.
Use this code in AArch64A57FPLoadBalancing::scavengeRegister() to prove
the concept.
- The AArch64A57LoadBalancing code is using a backwards analysis now
which is irrespective of kill flags. This is the main motivation for
this change.
Differential Revision: http://reviews.llvm.org/D22082
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292705
91177308-0d34-0410-b5e6-
96231b3b80d8
Xin Tong [Sat, 21 Jan 2017 02:11:40 +0000 (02:11 +0000)]
Fix Grammar. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292704
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sat, 21 Jan 2017 02:03:03 +0000 (02:03 +0000)]
[SLP] Make ReductionOpcode have the right (enum) type. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292703
91177308-0d34-0410-b5e6-
96231b3b80d8
Anmol P. Paralkar [Sat, 21 Jan 2017 02:02:56 +0000 (02:02 +0000)]
MergeFunctions: Preserve debug info in thunks, under option -mergefunc-preserve-debug-info
Summary:
Under option -mergefunc-preserve-debug-info we:
- Do not create a new function for a thunk.
- Retain the debug info for a thunk's parameters (and associated
instructions for the debug info) from the entry block.
Note: -debug will display the algorithm at work.
- Create debug-info for the call (to the shared implementation) made by
a thunk and its return value.
- Erase the rest of the function, retaining the (minimally sized) entry
block to create a thunk.
- Preserve a thunk's call site to point to the thunk even when both occur
within the same translation unit, to aid debugability. Note that this
behaviour differs from the underlying -mergefunc implementation which
modifies the thunk's call site to point to the shared implementation
when both occur within the same translation unit.
Reviewers: echristo, eeckstein, dblaikie, aprantl, friss
Reviewed By: aprantl
Subscribers: davide, fhahn, jfb, mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D28075
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292702
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 21 Jan 2017 02:02:27 +0000 (02:02 +0000)]
[ConstantFold] Remove test checking that we don't constant-fold sqrt(-2).
This depended on libm's errno behavior (we constant fold iff libm's
sqrt(-2) does not set errno) and was breaking on mac.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292701
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sat, 21 Jan 2017 01:57:44 +0000 (01:57 +0000)]
LowerTypeTests: Fix use-after-free. Found by asan/msan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292700
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Sat, 21 Jan 2017 01:34:25 +0000 (01:34 +0000)]
[AMDGPU] Fix build broken in r292688.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292699
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Sat, 21 Jan 2017 01:33:25 +0000 (01:33 +0000)]
[SLP] Delete useless helper. NFC.
The helper contained a branch for a special case that is unnecessary,
and a cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292698
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Sat, 21 Jan 2017 01:21:56 +0000 (01:21 +0000)]
[libFuzzer] Use CXX to set compiler to use
Reviewers: kcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28976
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292697
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 21 Jan 2017 01:08:22 +0000 (01:08 +0000)]
[libFuzzer] fix gcc build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292695
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 21 Jan 2017 01:00:32 +0000 (01:00 +0000)]
[NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.
Summary:
Specifically, we upgrade llvm.nvvm.:
* brev{32,64}
* clz.{i,ll}
* popc.{i,ll}
* abs.{i,ll}
* {min,max}.{i,ll,u,ull}
* h2f
These either map directly to an existing LLVM target-generic
intrinsic or map to a simple LLVM target-generic idiom.
In all cases, we check that the code we generate is lowered to PTX as we
expect.
These builtins don't need to be backfilled in clang: They're not
accessible to user code from nvcc.
Reviewers: tra
Subscribers: majnemer, cfe-commits, llvm-commits, jholewinski
Differential Revision: https://reviews.llvm.org/D28793
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292694
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 21 Jan 2017 01:00:14 +0000 (01:00 +0000)]
[NVPTX] Move getDivF32Level, usePrecSqrtF32, and useF32FTZ into out of DAGToDAG and into TargetLowering.
Summary:
DADToDAG has access to TargetLowering, but not vice versa, so this is
the more general location for these functions.
NFC
Reviewers: tra
Subscribers: jholewinski, llvm-commits
Differential Revision: https://reviews.llvm.org/D28795
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292693
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 21 Jan 2017 00:59:57 +0000 (00:59 +0000)]
[ConstantFolding] Constant-fold llvm.sqrt(x) like other intrinsics.
Summary:
Currently we return undef, but we're in the process of changing the
LangRef so that llvm.sqrt behaves like the other math intrinsics,
matching the return value of the standard libcall but not setting errno.
This change is legal even without the LangRef change because currently
calling llvm.sqrt(x) where x is negative is spec'ed to be UB. But in
practice it's also safe because we're simply constant-folding fewer
inputs: Inputs >= -0 get constant-folded as before, but inputs < -0 now
aren't constant-folded, because ConstantFoldFP aborts if the host math
function raises an fp exception.
Reviewers: hfinkel, efriedma, sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28929
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292692
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 21 Jan 2017 00:59:40 +0000 (00:59 +0000)]
[ValueTracking] Clarify comments on CannotBeOrderedLessThanZero and SignBitMustBeZero.
Reviewers: hfinkel, efriedma, sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28926
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292691
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Sat, 21 Jan 2017 00:59:23 +0000 (00:59 +0000)]
[NVPTX] Add explicit check for llvm.sqrt.f32 to intrinsics.ll.
Test-only change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292690
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Sat, 21 Jan 2017 00:53:49 +0000 (00:53 +0000)]
[AMDGPU] 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@292688
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Sat, 21 Jan 2017 00:37:53 +0000 (00:37 +0000)]
[APFloat] Add asserts and descriptions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292687
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 21 Jan 2017 00:13:50 +0000 (00:13 +0000)]
[libFuzzer] use print+exit(1) instead of assert to report an error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292685
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 21 Jan 2017 00:01:27 +0000 (00:01 +0000)]
[libFuzzer] re-enable LLVMFuzzer-RepeatedMemcmp test, cleanup the test runner nearby
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292683
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 20 Jan 2017 23:39:01 +0000 (23:39 +0000)]
[InstCombine] auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292682
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 20 Jan 2017 23:35:29 +0000 (23:35 +0000)]
[libFuzzer] call __sanitizer_dump_coverage via EF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292681
91177308-0d34-0410-b5e6-
96231b3b80d8
Guozhi Wei [Fri, 20 Jan 2017 23:35:27 +0000 (23:35 +0000)]
[PPC] Give unaligned memory access lower cost on processor that supports it
Newer ppc supports unaligned memory access, it reduces the cost of unaligned memory access significantly. This patch handles this case in PPCTTIImpl::getMemoryOpCost.
This patch fixes pr31492.
Differential Revision: https://reviews.llvm.org/D28630
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292680
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 20 Jan 2017 23:34:12 +0000 (23:34 +0000)]
[ThinLTO] Don't perform computeDeadSymbols during O0 link, as the result is never used (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292679
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 20 Jan 2017 23:29:28 +0000 (23:29 +0000)]
[NewGVN] Optimize processing for instructions found trivially dead.
Don't call `isTriviallyDeadInstructions()` once we discover that
an instruction is dead. Instead, set DFS number zero (as suggested
by Danny) and forget about it (this also speeds up things as we
won't try to reprocess that block).
Differential Revision: https://reviews.llvm.org/D28930
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292676
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 20 Jan 2017 23:25:17 +0000 (23:25 +0000)]
GlobalISel: prevent heap use-after-free when looking up VReg.
Translating the constant can create more VRegs, which can invalidate the
reference into the DenseMap. So we have to look up the value again after all
that's happened.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292675
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 20 Jan 2017 23:22:28 +0000 (23:22 +0000)]
LowerTypeTests: Simplify; always create SizeM1 with type IntPtrTy, move initialization out of if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292674
91177308-0d34-0410-b5e6-
96231b3b80d8
Dehao Chen [Fri, 20 Jan 2017 22:56:07 +0000 (22:56 +0000)]
Add indirect call promotion to SamplePGO
Summary: This patch adds metadata for indirect call promotion in the sample profile loader.
Reviewers: xur, davidxl, dnovillo
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28923
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292672
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Fri, 20 Jan 2017 22:49:13 +0000 (22:49 +0000)]
[libFuzzer] Don't use `#ifdef` for defined macros, instead use `#if`.
Differential Revision: https://reviews.llvm.org/D28972
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292670
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Fri, 20 Jan 2017 22:49:08 +0000 (22:49 +0000)]
[libFuzzer] Use clang as linker on Windows, to properly include sanitizer libraries.
In order to use sanitizers on Windows, we need to link against many runtime
libraries which will depend on the target being created (executable or dll) and
the c runtime library used (MT/MD).
By default, cmake uses link.exe for linking, which fails because we don't
specify the appropiate dependencies. As we don't want to consider all of that
possible situations which depends on the implementation of the compiler-rt, the
simplest option is to change the rules for linking executables and shared
libraries, using the compiler instead of link.exe.
Clang driver will consider the sanitizer flags, and automatically provide the
required libraries to the linker.
Differential Revision: https://reviews.llvm.org/D27869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292669
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcos Pividori [Fri, 20 Jan 2017 22:48:47 +0000 (22:48 +0000)]
[libFuzzer] Properly use compiler options supported on Windows.
Replace "-g" by "-gline-tables-only". "-g" is not supported by clang-cl.
Differential Revision: https://reviews.llvm.org/D27868
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292668
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 20 Jan 2017 22:45:34 +0000 (22:45 +0000)]
[ThinLTO] The "codegen only" path didn't honor the recently added file-based API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292667
91177308-0d34-0410-b5e6-
96231b3b80d8
Easwaran Raman [Fri, 20 Jan 2017 22:44:04 +0000 (22:44 +0000)]
Improve PGO support for the new inliner
This adds the following to the new PM based inliner in PGO mode:
* Use block frequency analysis to derive callsite's profile count and use
that to adjust thresholds of hot and cold callsites.
* Incrementally update the BFI of the caller after a callee gets inlined
into it. This incremental update is only within an invocation of the run
method - BFI is not preserved across calls to run.
Update the function entry count of the callee after inlining it into a
caller.
* I've tuned the thresholds for the hot and cold callsites using a hacked
up version of the old inliner that explicitly computes BFI on a set of
internal benchmarks and spec. Once the new PM based pipeline stabilizes
(IIRC Chandler mentioned there are known issues) I'll benchmark this
again and adjust the thresholds if required.
Inliner PGO support.
Differential revision: https://reviews.llvm.org/D28331
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292666
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 20 Jan 2017 22:42:09 +0000 (22:42 +0000)]
[pdb] Write the Named Stream mapping to Yaml and binary.
Differential Revision: https://reviews.llvm.org/D28919
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292665
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 20 Jan 2017 22:41:40 +0000 (22:41 +0000)]
[pdb] Merge NamedStreamMapBuilder and NamedStreamMap.
While the builder pattern has proven useful for certain other
larger types, in this case it was hampering the ability to use
the data structure, as for runtime access we need a map that
we can efficiently read from and write to. So the two are merged
into a single data structure that can efficiently be read to,
written from, deserialized from bytes, and serialized to bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292664
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 20 Jan 2017 22:41:15 +0000 (22:41 +0000)]
[PDB] Rename some files to be more intuitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292663
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 20 Jan 2017 22:18:52 +0000 (22:18 +0000)]
IPO, LTO: Plumb the summary from the LTO API into the pass manager.
Differential Revision: https://reviews.llvm.org/D28840
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292661
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 20 Jan 2017 22:18:47 +0000 (22:18 +0000)]
[ValueTracking] recognize variations of 'clamp' to improve codegen (PR31693)
By enhancing value tracking, we allow an existing min/max canonicalization to
kick in and improve codegen for several targets that have min/max instructions.
Unfortunately, recognizing min/max in value tracking may cause us to hit
a hack in InstCombiner::visitICmpInst() more often:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109340.html
...but I'm hoping we can remove that soon.
Correctness proofs based on Alive:
Name: smaxmin
Pre: C1 < C2
%cmp2 = icmp slt i8 %x, C2
%min = select i1 %cmp2, i8 %x, i8 C2
%cmp3 = icmp slt i8 %x, C1
%r = select i1 %cmp3, i8 C1, i8 %min
=>
%cmp2 = icmp slt i8 %x, C2
%min = select i1 %cmp2, i8 %x, i8 C2
%cmp1 = icmp sgt i8 %min, C1
%r = select i1 %cmp1, i8 %min, i8 C1
Name: sminmax
Pre: C1 > C2
%cmp2 = icmp sgt i8 %x, C2
%max = select i1 %cmp2, i8 %x, i8 C2
%cmp3 = icmp sgt i8 %x, C1
%r = select i1 %cmp3, i8 C1, i8 %max
=>
%cmp2 = icmp sgt i8 %x, C2
%max = select i1 %cmp2, i8 %x, i8 C2
%cmp1 = icmp slt i8 %max, C1
%r = select i1 %cmp1, i8 %max, i8 C1
----------------------------------------
Optimization: smaxmin
Done: 1
Optimization is correct!
----------------------------------------
Optimization: sminmax
Done: 1
Optimization is correct!
Name: umaxmin
Pre: C1 u< C2
%cmp2 = icmp ult i8 %x, C2
%min = select i1 %cmp2, i8 %x, i8 C2
%cmp3 = icmp ult i8 %x, C1
%r = select i1 %cmp3, i8 C1, i8 %min
=>
%cmp2 = icmp ult i8 %x, C2
%min = select i1 %cmp2, i8 %x, i8 C2
%cmp1 = icmp ugt i8 %min, C1
%r = select i1 %cmp1, i8 %min, i8 C1
Name: uminmax
Pre: C1 u> C2
%cmp2 = icmp ugt i8 %x, C2
%max = select i1 %cmp2, i8 %x, i8 C2
%cmp3 = icmp ugt i8 %x, C1
%r = select i1 %cmp3, i8 C1, i8 %max
=>
%cmp2 = icmp ugt i8 %x, C2
%max = select i1 %cmp2, i8 %x, i8 C2
%cmp1 = icmp ult i8 %max, C1
%r = select i1 %cmp1, i8 %max, i8 C1
----------------------------------------
Optimization: umaxmin
Done: 1
Optimization is correct!
----------------------------------------
Optimization: uminmax
Done: 1
Optimization is correct!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292660
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 20 Jan 2017 21:56:37 +0000 (21:56 +0000)]
docs: Document that !absolute_symbol { all-ones, all-ones } means the full set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292657
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Fri, 20 Jan 2017 21:54:58 +0000 (21:54 +0000)]
[ThinLTO] Drop non-prevailing non-ODR weak to declarations
Summary:
Allow non-ODR weak/linkonce non-prevailing copies to be marked
as available_externally in the index. Add support for dropping these to
declarations in the backend.
Reviewers: mehdi_amini, pcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28806
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292656
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 20 Jan 2017 21:49:41 +0000 (21:49 +0000)]
[InstCombine] add tests to show missed canonicalization of min/max; NFC
Unfortunately, recognizing these in value tracking may cause us to hit
a hack in InstCombiner::visitICmpInst() more often:
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109340.html
...but besides being the obviously Right Thing To Do, there's a clear
codegen win from identifying these patterns for several targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292655
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 20 Jan 2017 21:49:34 +0000 (21:49 +0000)]
LowerTypeTests: Implement importing of type identifiers.
To import a type identifier we read the summary and create external
references to the symbols defined when exporting.
Differential Revision: https://reviews.llvm.org/D28546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292654
91177308-0d34-0410-b5e6-
96231b3b80d8