summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* type_traits: aligned_union is NOT the same as __uncvref [NFC]Casey Carter2018-07-081-25/+25
| | | | llvm-svn: 336502
* [X86] Remove __builtin_ia32_vfnmsubsd3_mask3 and ↵Craig Topper2018-07-071-2/+0
| | | | | | | | __builtin_ia32_vfnmsubss3_mask3 from clang. They are no longer used by clang. llvm-svn: 336500
* [X86] Remove some unnecessarily escaped new lines from avx512fintrin.hCraig Topper2018-07-071-10/+10
| | | | llvm-svn: 336499
* [X86] Fix a few intrinsics that were ignoring their rounding mode argument ↵Craig Topper2018-07-072-49/+49
| | | | | | | | | | and hardcoded _MM_FROUND_CUR_DIRECTION internally. I believe these have been broken since their introduction into clang. I've enhanced the tests for these intrinsics to using a real rounding mode and checking all the intrinsic arguments instead of just the name. llvm-svn: 336498
* [analyzer] Add support for data() in DanglingInternalBufferChecker.Reka Kovacs2018-07-072-14/+59
| | | | | | | | | DanglingInternalBufferChecker now tracks use-after-free problems related to the incorrect usage of std::basic_string::data(). Differential Revision: https://reviews.llvm.org/D48532 llvm-svn: 336497
* [X86] Regenerate PR14088 test. NFCI.Simon Pilgrim2018-07-071-13/+38
| | | | llvm-svn: 336496
* [analyzer] Highlight c_str() call in DanglingInternalBufferChecker.Reka Kovacs2018-07-074-15/+105
| | | | | | | | | | Add a bug visitor to DanglingInternalBufferChecker that places a note at the point where the dangling pointer was obtained. The visitor is handed over to MallocChecker and attached to the report there. Differential Revision: https://reviews.llvm.org/D48522 llvm-svn: 336495
* Add LLDB_API to SBAddress's operator==.Alexander Polyakov2018-07-071-2/+2
| | | | | | | | | | Summary: Add LLDB_API to SBAddress's operator== to fix lldb-mi build on Windows. Patch by Aleksandr Urakov! Differential Revision: https://reviews.llvm.org/D49006 llvm-svn: 336494
* [analyzer] Fix -Wcovered-switch-default warning in MallocChecker.Reka Kovacs2018-07-071-1/+0
| | | | | | Remove unnecessary default case that caused buildbot failures. llvm-svn: 336493
* [SelectionDAG] Split float and integer isKnownNeverZero testsSimon Pilgrim2018-07-073-9/+26
| | | | | | | | | | Splits off isKnownNeverZeroFloat to handle +/- 0 float cases. This will make it easier to be more aggressive with the integer isKnownNeverZero tests (similar to ValueTracking), use computeKnownBits etc. Differential Revision: https://reviews.llvm.org/D48969 llvm-svn: 336492
* Use const APInt& to avoid extra copy. NFCI.Simon Pilgrim2018-07-071-1/+1
| | | | | | As discussed on D48825. llvm-svn: 336491
* [DAGCombiner] Add EXTRACT_SUBVECTOR to SimplifyDemandedVectorEltsSimon Pilgrim2018-07-075-70/+59
| | | | | | | | As discussed on PR37989, this patch adds EXTRACT_SUBVECTOR handling to TargetLowering::SimplifyDemandedVectorElts and calls it from DAGCombiner::visitEXTRACT_SUBVECTOR. Differential Revision: https://reviews.llvm.org/D48825 llvm-svn: 336490
* [analyzer] Highlight container object destruction in MallocChecker.Reka Kovacs2018-07-072-18/+50
| | | | | | | | | Extend MallocBugVisitor to place a note at the point where objects with AF_InternalBuffer allocation family are destroyed. Differential Revision: https://reviews.llvm.org/D48521 llvm-svn: 336489
* [X86] Change _mm512_shuffle_pd and _mm512_shuffle_ps to use target specific ↵Craig Topper2018-07-071-28/+4
| | | | | | | | shuffle builtins instead of generic __builtin_shufflevector. I added the builtins for 128, 256, and 512 bits recently but looks like I failed to convert to using the 512 bit one. llvm-svn: 336488
* [X86] Fix various type mismatches in intrinsic headers and intrinsic tests ↵Craig Topper2018-07-077-80/+80
| | | | | | | | that cause extra bitcasts to be emitted in the IR. Found via imprecise grepping of the -O0 IR. There could still be more bugs out there. llvm-svn: 336487
* [CostModel][X86] Add SREM/UREM general and constant costs (PR38056)Simon Pilgrim2018-07-072-219/+779
| | | | | | | | | | We penalize general SDIV/UDIV costs but don't do the same for SREM/UREM. This patch makes general vector SREM/UREM x20 as costly as scalar, the same approach as we do for SDIV/UDIV. The patch also extends the existing SDIV/UDIV constant costs for SREM/UREM - at the moment this means the additional cost of a MUL+SUB (see D48975). Differential Revision: https://reviews.llvm.org/D48980 llvm-svn: 336486
* Test commitChijun Sima2018-07-071-1/+0
| | | | llvm-svn: 336485
* NFC - Typo fixes in X86 flags-copy-lowering.mir testGabor Buella2018-07-071-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D48934 llvm-svn: 336484
* Fix build on Windows with SDK build version >= 17134.Tatyana Krasnukha2018-07-071-5/+0
| | | | | | Platform.h doesn't define signal() and SIGINT since commit r263858. Code was compiled successfully because signal.h didn't have "ifndef" include guard in previous versions of Windows SDK. Now it does. llvm-svn: 336483
* [MachineOutliner] Add missing liveness tracking info in MIR test.Yvan Roux2018-07-071-0/+1
| | | | | | This should bring the bots back to green state. llvm-svn: 336482
* [MachineOutliner] Assert that Liveness tracking is accurate (NFC)Yvan Roux2018-07-072-0/+4
| | | | | | | | | | The checking is done deeper inside MachineBasicBlock, but this will hopefully help to find issues when porting the machine outliner to a target where Liveness tracking is broken (like ARM). Differential Revision: https://reviews.llvm.org/D49023 llvm-svn: 336481
* P0806R2 Implicit capture of this with a capture-default of [=] isRichard Smith2018-07-074-2/+28
| | | | | | | | | | deprecated. Add a -Wdeprecated warning for this in C++2a onwards. (In C++17 and before, there isn't a reasonable alternative because [=,this] is ill-formed.) llvm-svn: 336480
* [Support] Clear errno before calling the function in RetryAfterSignal.Chandler Carruth2018-07-072-2/+6
| | | | | | | | | | | | | | | | | | | | | | For certain APIs, the return value of the function does not distinguish between failure (which populates errno) and other non-error conditions (which do not set errno). For example, `fgets` returns `NULL` both when an error has occurred, or upon EOF. If `errno` is already `EINTR` for whatever reason, then ``` RetryAfterSignal(nullptr, fgets, ...); ``` on a stream that has reached EOF would infinite loop. Fix this by setting `errno` to `0` before each attempt in `RetryAfterSignal`. Patch by Ricky Zhou! Differential Revision: https://reviews.llvm.org/D48755 llvm-svn: 336479
* [Sema] Emit -Wincomplete-implementation for partial methods.Erik Pilkington2018-07-072-10/+9
| | | | | | Fixes rdar://40634455 llvm-svn: 336478
* [PM/LoopUnswitch] Fix PR37889, producing the correct loop nest structureChandler Carruth2018-07-073-3/+1243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after trivial unswitching. This PR illustrates that a fundamental analysis update was not performed with the new loop unswitch. This update is also somewhat fundamental to the core idea of the new loop unswitch -- we actually *update* the CFG based on the unswitching. In order to do that, we need to update the loop nest in addition to the domtree. For some reason, when writing trivial unswitching, I thought that the loop nest structure cannot be changed by the transformation. But the PR helps illustrate that it clearly can. I've expanded this to a number of different test cases that try to cover the different cases of this. When we unswitch, we move an exit edge of a loop out of the loop. If this exit edge changes which loop reached by an exit is the innermost loop, it changes the parent of the loop. Essentially, this transformation may hoist the inner loop up the nest. I've added the simple logic to handle this reliably in the trivial unswitching case. This just requires updating LoopInfo and rebuilding LCSSA on the impacted loops. In the trivial case, we don't even need to handle dedicated exits because we're only hoisting the one loop and we just split its preheader. I've also ported all of these tests to non-trivial unswitching and verified that the logic already there correctly handles the loop nest updates necessary. Differential Revision: https://reviews.llvm.org/D48851 llvm-svn: 336477
* [X86] Merge INTR_TYPE_3OP_RM with INTR_TYPE_3OP. Remove unused INTR_TYPE_1OP_RM.Craig Topper2018-07-072-40/+21
| | | | llvm-svn: 336476
* Check returned type is valid before using it.Richard Trieu2018-07-072-0/+11
| | | | | | Add a .isNull() check to returned QualType. Fixes PR38077 llvm-svn: 336475
* Revert "Make __gcov_flush flush counters for all shared libraries"Michael Zolotukhin2018-07-0720-678/+85
| | | | | | | This reverts r336365: the added tests are failing on various configurations (e.g. on green-dragon). llvm-svn: 336474
* Revert "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)."Tim Shen2018-07-0618-70/+55
| | | | | | This reverts commit r336140. Our tests shows that LSR assert fails with it. llvm-svn: 336473
* [X86] When creating a select for scalar masked sqrt and div builtins make ↵Craig Topper2018-07-062-106/+109
| | | | | | | | | | sure we optimize the all ones mask case. This case occurs in the intrinsic headers so we should avoid emitting the mask in those cases. Factor the code into a helper function to make this easy. llvm-svn: 336472
* [MachineOutliner] Properly pass -moutline along to the toolchainJessica Paquette2018-07-064-13/+19
| | | | | | | | | | This moves the LTO-specific code for outlining from ToolChains/Clang.cpp to ToolChains/Darwin.cpp. Passing -mllvm flags isn't sufficient for making sure that the specified pass will actually run in LTO. This makes sure that when -moutline is passed, the MachineOutliner will actually be added to the LTO pass pipeline as expected. llvm-svn: 336471
* [X86] Add missing scalar fma intrinsics with rounding, but no mask.Craig Topper2018-07-062-24/+120
| | | | | | | | We had the mask versions of the rounding intrinsics, but not one without masking. Also change the rounding tests to not use the CUR_DIRECTION rounding mode. llvm-svn: 336470
* [PDB] memicmp only exists on Windows, use StringRef::compare_lower insteadBenjamin Kramer2018-07-061-2/+2
| | | | llvm-svn: 336469
* [ASTMatchers] A matcher for Objective-C @autoreleasepoolGeorge Karpenkov2018-07-065-8/+94
| | | | | | Differential Revision: https://reviews.llvm.org/D48910 llvm-svn: 336468
* [OPENMP] Fix PR38026: Link -latomic when -fopenmp is used.Alexey Bataev2018-07-062-9/+13
| | | | | | | On Linux atomic constructs in OpenMP require libatomic library. Patch links libatomic when -fopenmp is used. llvm-svn: 336467
* Fix DIExpression::ExprOperand::appendToVectorVedant Kumar2018-07-062-7/+3
| | | | | | | | | | | | appendToVector used the wrong overload of SmallVector::append, resulting in it appending the same element to a vector `getSize()` times. This did not cause a problem when initially committed because appendToVector was only used to append 1-element operands. This changes appendToVector to use the correct overload of append(). Testing: ./unittests/IR/IRTests --gtest_filter='*DIExpressionTest*' llvm-svn: 336466
* Remove a redundant null-check in DIExpression::prepend, NFCVedant Kumar2018-07-061-13/+14
| | | | | | | Code outside of an `if (Expr)` block dereferenced `Expr`, so the null check was redundant. llvm-svn: 336465
* [PDB] One more fix for hasing GSI records.Zachary Turner2018-07-066-9/+199
| | | | | | | | | | | | | | | | The reference implementation uses a case-insensitive string comparison for strings of equal length. This will cause the string "tEo" to compare less than "VUo". However we were using a case sensitive comparison, which would generate the opposite outcome. Switch to a case insensitive comparison. Also, when one of the strings contains non-ascii characters, fallback to a straight memcmp. The only way to really test this is with a DIA test. Before this patch, the test will fail (but succeed if link.exe is used instead of lld-link). After the patch, it succeeds even with lld-link. llvm-svn: 336464
* [test-suite] Add a decorator for the lack of libstdcxx on the system.Davide Italiano2018-07-0610-26/+21
| | | | | | | | | This generalizes a bunch of target-specific tests. MacOS has no libstdcxx anymore, and neither does FreeBSD (or Windows). <rdar://problem/41896105> llvm-svn: 336463
* Use Type::isIntOrPtrTy where possible, NFCVedant Kumar2018-07-068-37/+22
| | | | | | | | | | | It's a bit neater to write T.isIntOrPtrTy() over `T.isIntegerTy() || T.isPointerTy()`. I used Python's re.sub with this regex to update users: r'([\w.\->()]+)isIntegerTy\(\)\s*\|\|\s*\1isPointerTy\(\)' llvm-svn: 336462
* libFuzzer: always print line-break for NEW_FUNC/PC outputKostya Serebryany2018-07-061-3/+6
| | | | | | | | | | | | | | Summary: This is a minor cosmetic change. When function/path exceed ~1000 characters, the output is truncated before the line-break. I noticed this for NEW_FUNC. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D48799 llvm-svn: 336461
* [OPENMP] Make clauses closing loc point to right bracket.Alexey Bataev2018-07-063-16/+24
| | | | | | | | For some of the clauses the closing location erroneously points to the beginning of the next clause rather than on the location of the closing bracket of the clause. llvm-svn: 336460
* [IR] Fix inconsistent declaration parameter nameFangrui Song2018-07-063-6/+6
| | | | llvm-svn: 336459
* [X86] Remove patterns for MOVLPD/MOVLPS nodes with integer types.Craig Topper2018-07-061-8/+0
| | | | | | Lowering shouldn't generate these. If we need to use them for integer types, it should use a bitcast. llvm-svn: 336458
* [X86] Add more FMA3 memory folding patterns. Remove patterns that are no ↵Craig Topper2018-07-062-53/+49
| | | | | | | | longer needed. We've removed the legacy FMA3 intrinsics and are now using llvm.fma and extractelement/insertelement. So we don't need patterns for the nodes that could only be created by the old intrinscis. Those ISD opcodes still exist because we haven't dropped the AVX512 intrinsics yet, but those should go to EVEX instructions. llvm-svn: 336457
* [llvm-mca] Add HardwareUnit and Context classes.Matt Davis2018-07-069-25/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the construction of the default backend from llvm-mca.cpp and into mca::Context. The Context class is responsible for holding ownership of the simulated hardware components. These components are subclasses of HardwareUnit. Right now the HardwareUnit is pretty bare-bones, but eventually we might want to add some common functionality across all hardware components, such as isReady() or something similar. I have a feeling this patch will probably need some updates, but it's a start. One thing I am not particularly fond of is the rather large interface for createDefaultPipeline. That convenience routine takes a rather large set of inputs from the llvm-mca driver, where many of those inputs are generated via command line options. One item I think we might want to change is the separating of ownership of hardware components (owned by the context) and the pipeline (which owns Stages). In short, a Pipeline owns Stages, a Context (currently) owns hardware. The Pipeline's Stages make use of the components, and thus there is a lifetime dependency generated. The components must outlive the pipeline. We could solve this by having the Context also own the Pipeline, and not return a unique_ptr<Pipeline>. Now that I think about it, I like that idea more. Differential Revision: https://reviews.llvm.org/D48691 llvm-svn: 336456
* [llvm-objcopy] Add support for static librariesAlexander Shaposhnikov2018-07-067-87/+372
| | | | | | | | | | | This diff adds support for handling static libraries to llvm-objcopy and llvm-strip. Test plan: make check-all Differential revision: https://reviews.llvm.org/D48413 llvm-svn: 336455
* [InstCombine] add more tests for potentially poisonous shifts; NFCSanjay Patel2018-07-061-0/+43
| | | | llvm-svn: 336454
* Revert 336426 (and follow-ups 428, 440), it very likely caused PR38084.Nico Weber2018-07-064-318/+20
| | | | llvm-svn: 336453
* [Debugify] Allow unsigned values narrower than their variablesVedant Kumar2018-07-062-5/+19
| | | | | | | | Suppress the diagnostic for mis-sized dbg.values when a value operand is narrower than the unsigned variable it describes. Assume that a debugger would implicitly zero-extend these values. llvm-svn: 336452
OpenPOWER on IntegriCloud