summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [SLP] Additional test for SLP vectorizer with 31 reduction elements.Alexey Bataev2017-01-231-0/+196
| | | | llvm-svn: 292783
* [InstCombine][SSE] Tests showing missed opportunities to constant fold ↵Simon Pilgrim2017-01-231-0/+58
| | | | | | PMULDQ/PMULUDQ llvm-svn: 292782
* This test apparently requires an x86 target and is failing on numerousChandler Carruth2017-01-231-0/+0
| | | | | | | | | | | 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. llvm-svn: 292774
* [PM] Replace the hard invalidate in JumpThreading for LVI with correctChandler Carruth2017-01-234-10/+29
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 292773
* [PM] Add a dedicated test case for the issue fixed in r292770.Chandler Carruth2017-01-231-0/+33
| | | | | | | | 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. llvm-svn: 292772
* [globalisel] Remove unused, duplicate file added in r292478Daniel Sanders2017-01-231-16/+0
| | | | | | | | | It seems it appeared during a rebase (diff 6) of D27338 and went unnoticed. Thanks to David Majnemer for noticing. llvm-svn: 292771
* [PM] Clear any analyses for a dead function after inlining it and beforeChandler Carruth2017-01-231-2/+3
| | | | | | | | | | 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. llvm-svn: 292770
* [PM] Teach LVI to correctly invalidate itself when its dependenciesChandler Carruth2017-01-235-7/+80
| | | | | | | | | | | | 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. llvm-svn: 292769
* [X86][SSE] Add missing X86ISD::ANDNP combines.Simon Pilgrim2017-01-223-41/+22
| | | | llvm-svn: 292767
* [X86][SSE] Improve shuffle combining with zero insertionsSimon Pilgrim2017-01-223-59/+39
| | | | | | Add support for handling shuffles with scalar_to_vector(0) llvm-svn: 292766
* [libFuzzer] Add missing dependency for tests.Marcos Pividori2017-01-221-0/+1
| | | | | | Dependency on TestBinaries was erroneously removed on r292735. llvm-svn: 292765
* [X86][SSE] Regenerate sqrt testsSimon Pilgrim2017-01-221-13/+15
| | | | llvm-svn: 292764
* Fix test name. NFCI.Simon Pilgrim2017-01-221-6/+6
| | | | llvm-svn: 292763
* Attempt to fix test in release builds.Benjamin Kramer2017-01-221-5/+5
| | | | llvm-svn: 292762
* Fix some broken CHECK lines.Benjamin Kramer2017-01-2228-54/+54
| | | | | | The colon is important. llvm-svn: 292761
* llvm-cxxfilt: support `-_`Saleem Abdulrasool2017-01-222-6/+34
| | | | | | | | 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. llvm-svn: 292759
* [x86] avoid crashing with illegal vector type (PR31672)Sanjay Patel2017-01-222-14/+159
| | | | | | https://llvm.org/bugs/show_bug.cgi?id=31672 llvm-svn: 292758
* [PM] Fix a really nasty bug introduced when adding PGO support to theChandler Carruth2017-01-223-19/+137
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 292757
* [PM] Add some debug logging to the new PM inliner to make it easier toChandler Carruth2017-01-221-0/+3
| | | | | | trace its behavior. llvm-svn: 292756
* [PM] Improve the debug logging to always include the IR unit's name whenChandler Carruth2017-01-221-3/+4
| | | | | | | | | | 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. llvm-svn: 292755
* [IR] Add LLVM_READONLY to BasicBlock::getTerminator.Craig Topper2017-01-221-1/+1
| | | | | | | | 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. llvm-svn: 292754
* [IR] Use const_cast to reuse the const version of two BasicBlock methods ↵Craig Topper2017-01-222-11/+6
| | | | | | | | that are duplicated for both const and non-const. NFC Similar is already done for other methods in BasicBlock. llvm-svn: 292753
* [docs] Point to upstream Sphinx install instructions.Sean Silva2017-01-221-0/+2
| | | | llvm-svn: 292752
* [libFuzzer] Specify the CRT considered (MT or MD) for tests on Windows.Marcos Pividori2017-01-221-2/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D28439 llvm-svn: 292749
* [libFuzzer] Fix test with shared libraries on Windows.Marcos Pividori2017-01-223-6/+20
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 292748
* [libFuzzer] AlrmHandler is executed in a different thread for Windows.Marcos Pividori2017-01-221-0/+3
| | | | | | | | | | | 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 llvm-svn: 292746
* [libFuzzer] Leak Sanitizer is not supported for Windows.Marcos Pividori2017-01-221-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D28709 llvm-svn: 292745
* [libFuzzer] Fix OutOfMemory tests to work on 32 bits.Marcos Pividori2017-01-222-3/+3
| | | | | | | | | | | | | | | | | 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 llvm-svn: 292744
* [libFuzzer] Avoid undefined behavior, properly discard output to stdout/stderr.Marcos Pividori2017-01-224-2/+20
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 292743
* [libFuzzer] Remove lib prefix from library names on tests.Marcos Pividori2017-01-221-2/+2
| | | | | | | | | This changes is necessary on Windows, where libraries doesn't include the prefix "lib". Differential Revision: https://reviews.llvm.org/D28710 llvm-svn: 292742
* [libFuzzer] Fix ListFilesInDirRecursive() to do the same for Posix and Windows.Marcos Pividori2017-01-221-2/+4
| | | | | | | | | 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 llvm-svn: 292741
* [libFuzzer] Consider both possible separators for tests.Marcos Pividori2017-01-221-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D28636 llvm-svn: 292740
* [libFuzzer] Portably disassemble and find calls to sanitizer_cov_trace_pc_guard.Marcos Pividori2017-01-224-2/+33
| | | | | | | | | | 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 llvm-svn: 292739
* [libFuzzer] Portable implementation of `IsInterestingCoverageFile()`.Marcos Pividori2017-01-224-12/+24
| | | | | | | | For Posix systems and Windows, we need to consider different cases. Differential Revision: https://reviews.llvm.org/D28633 llvm-svn: 292738
* [libFuzzer] Remove optimization flags for tests.Marcos Pividori2017-01-221-11/+1
| | | | | | | | | | | 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 llvm-svn: 292737
* [libFuzzer] Expose Sanitizer Coverage functions from libFuzzer.Marcos Pividori2017-01-222-12/+22
| | | | | | | | | 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 llvm-svn: 292736
* [libFuzzer] Remove dependencies for tests on Windows.Marcos Pividori2017-01-221-1/+6
| | | | | | | | | | | | 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 llvm-svn: 292735
* [libFuzzer] Disable afl tests for Windows.Marcos Pividori2017-01-221-11/+12
| | | | | | | | On Windows, we don't have interoperability between libFuzzer and afl. Differential Revision: https://reviews.llvm.org/D28355 llvm-svn: 292734
* [MemorySSA] Remove deprecated comment from testPiotr Padlewski2017-01-211-3/+0
| | | | llvm-svn: 292733
* [MemorySSA] Fix invariant.group test and add newPiotr Padlewski2017-01-211-2/+75
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 292730
* [InstCombine] use m_APInt to allow ashr folds for vectors with splat constantsSanjay Patel2017-01-212-27/+30
| | | | | | | 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(). llvm-svn: 292726
* [ValueTracking] tighten up matchMinMax(); NFCISanjay Patel2017-01-211-40/+14
| | | | | | | | | 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. llvm-svn: 292725
* [InstCombine] add tests for ashr-ashr; NFCSanjay Patel2017-01-211-6/+47
| | | | llvm-svn: 292724
* [Orc][RPC] Add 'removeHandler' and 'clearHandlers' methods to RPC endpoints.Lang Hames2017-01-212-0/+44
| | | | | | | This can be used to free handler resources for handlers that won't be called again. llvm-svn: 292714
* [X86] Don't allow commuting to form phsub operations.Craig Topper2017-01-212-6/+31
| | | | | | Fixes PR31714. llvm-svn: 292713
* [X86] Add test cases that show bad commuting being allowed to create a phsub ↵Craig Topper2017-01-211-0/+33
| | | | | | operation. llvm-svn: 292712
* Add missing dependency to "Module Summary Analysis" passMehdi Amini2017-01-211-0/+1
| | | | | | This is fixing a clang crash when running `clang -flto=thin -save-temps` llvm-svn: 292711
* [PM] Sink an LCSSA preservation assert from the LoopSimplify pass intoChandler Carruth2017-01-212-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 292710
* [PM] Teach the loop PM to run LoopSimplify prior to the loop pipeline.Chandler Carruth2017-01-216-110/+269
| | | | | | | | | | | | | | | 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 llvm-svn: 292709
* llvm-strings: remove default for -Wcovered-switch-defaultSaleem Abdulrasool2017-01-211-1/+0
| | | | | | | Fix the -Werror build by removing the unnecessary default case in the covered switch. NFC llvm-svn: 292708
OpenPOWER on IntegriCloud