summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [AArch64, X86] Guard against both instrs being wild cardsEvandro Menezes2017-02-212-10/+12
| | | | | | If both instrs are wild cards, the result can be a crash. llvm-svn: 295776
* [AArch64] Add test case for fusion of literal generationEvandro Menezes2017-02-211-0/+46
| | | | | | | Add test case from https://reviews.llvm.org/D28698 that was somehow lost in transit. llvm-svn: 295775
* [AArch64] Add test case for fusion of AES crypto operationsEvandro Menezes2017-02-211-0/+207
| | | | | | | Add test case from https://reviews.llvm.org/D28491 that was somehow lost in transit. llvm-svn: 295774
* [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-02-2110-182/+296
| | | | | | other minor fixes (NFC). llvm-svn: 295773
* Add `-z nocopyreloc` option.Rui Ueyama2017-02-214-1/+28
| | | | | | | This option disable creating copy relocations. ld.bfd and ld.gold have the same option. llvm-svn: 295772
* [compiler-rt] Prevent symbolizer from starting itself.Vitaly Buka2017-02-211-0/+16
| | | | | | | | | | | | | | Summary: If symbolizer was instrumented with sanitizer and crash, it may try to call itself again causing infinite recursion of crashing processes. Reviewers: eugenis Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D30222 llvm-svn: 295771
* Try to fix the buildbot on OSX.Zachary Turner2017-02-211-16/+0
| | | | | | | | | Since I'm only seeing failures on OSX, and it's saying permission denied, I'm suspecting this is due to the addition of the MAP_RESILIENT_CODESIGN and/or MAP_RESILIENT_MEDIA flags. Speculatively trying to remove those to get the bots working. llvm-svn: 295770
* Try to fix Android build.Zachary Turner2017-02-211-1/+3
| | | | llvm-svn: 295769
* [Support] Add a function to check if a file resides locally.Zachary Turner2017-02-216-31/+211
| | | | | | Differential Revision: https://reviews.llvm.org/D30010 llvm-svn: 295768
* Make default value for disable-licm-promotion in licm explicit.Xin Tong2017-02-211-1/+2
| | | | llvm-svn: 295767
* [asan] Re-enable a test on i386-darwin.Anna Zaks2017-02-211-1/+0
| | | | | | | | This test has been reverted in r279918 due to flaky atos support in the OS some machines in the buildbot fleet were running. This should not be a problem anymore. llvm-svn: 295766
* Don't modify archive members unless really needed.Rafael Espindola2017-02-216-29/+80
| | | | | | | | | | | For whatever reason ld64 requires that member headers (not the member themselves) should be aligned. The only way to do that is to edit the previous member so that it ends at an aligned boundary. Since modifying data put in an archive is an undesirable property, llvm-ar should only do it when it is absolutely necessary. llvm-svn: 295765
* Only enable AddDiscriminator pass when -fdebug-info-for-profiling is trueDehao Chen2017-02-212-5/+6
| | | | | | | | | | | | | | Summary: AddDiscriminator pass is only useful for sample pgo. This patch restricts AddDiscriminator to -fdebug-info-for-profiling so that it does not introduce unecessary debug size increases for non-sample-pgo builds. Reviewers: dblaikie, aprantl Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30220 llvm-svn: 295764
* Fix copy and paste mistake in header comment, NFC.Erik Pilkington2017-02-211-1/+1
| | | | llvm-svn: 295763
* Fix PR31896.Evgeniy Stepanov2017-02-212-5/+24
| | | | | | Address of an alias of a global with offset is incorrectly lowered as an address of the global (i.e. ignoring offset). llvm-svn: 295762
* [compiler-rt][asan] Fix incorrect macro preventing ICF with MSVCEtienne Bergeron2017-02-211-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The DLL thunks are stubs added to an instrumented DLL to redirect ASAN API calls to the real ones in the main executable. These thunks must contain dummy code before __asan_init got called. Unfortunately, MSVC linker is doing ICF and is merging functions with the same body. In our case, this two ASAN thunks were incorrectly merged: ``` asan_interface.inc:16 INTERFACE_FUNCTION(__asan_before_dynamic_init) ``` ``` sanitizer_common_interface.inc:16 INTERFACE_FUNCTION(__sanitizer_verify_contiguous_container) ``` The same thunk got patched twice. After the second patching, calls to `__asan_before_dynamic_init` are redirected to `__sanitizer_verify_contiguous_container` and trigger a DCHECK on incorrect operands/ The problem was caused by the macro that is only using __LINE__ to prevent collapsing code. ``` #define INTERCEPT_SANITIZER_FUNCTION(name) extern "C" __declspec(noinline) void name() { volatile int prevent_icf = (__LINE__ << 8); (void)prevent_icf; ``` The current patch is adding __COUNTER__ which is safer than __LINE__. Also, to precent ICF (guarantee that code is different), we are using a unique attribute: - the name of the function Reviewers: rnk Reviewed By: rnk Subscribers: llvm-commits, kubamracek, chrisha, dberris Differential Revision: https://reviews.llvm.org/D30219 llvm-svn: 295761
* Try to fix line endings.Zachary Turner2017-02-212-640/+640
| | | | llvm-svn: 295759
* [InstCombine] canonicalize non-obivous forms of integer min/maxSanjay Patel2017-02-213-39/+37
| | | | | | | | | | | | | | | | This is part of trying to clean up our handling of min/max patterns in IR. By converting these to canonical form, we're more likely to recognize them because there are various places in InstCombine that don't use matchSelectPattern or m_SMax and friends. The backend fixups referenced in the now deleted TODO comment were added with: https://reviews.llvm.org/rL291392 https://reviews.llvm.org/rL289738 If there's any codegen fallout from this change, we should be able to address it in DAGCombiner or target-specific lowering. llvm-svn: 295758
* AMDGPU: Remove dead declarations in testsMatt Arsenault2017-02-212-8/+0
| | | | llvm-svn: 295757
* Remove svn:eol-style property from 2 files.Zachary Turner2017-02-212-640/+640
| | | | | | There are still over 3400 files remaining with this property set, but there are tens of thousands more with the property not set. Until we decide what to do on a global scale, this at least unblocks me temporarily. llvm-svn: 295756
* AMDGPU: Remove dead declarations from MIR testsMatt Arsenault2017-02-213-48/+5
| | | | llvm-svn: 295755
* AMDGPU: Remove llvm.AMDGPU.flbit intrinsicMatt Arsenault2017-02-213-29/+0
| | | | llvm-svn: 295754
* AMDGPU: Don't use stack space for SGPR->VGPR spillsMatt Arsenault2017-02-2111-94/+876
| | | | | | | | | | | | | | | | Before frame offsets are calculated, try to eliminate the frame indexes used by SGPR spills. Then we can delete them after. I think for now we can be sure that no other instruction will be re-using the same frame indexes. It should be easy to notice if this assumption ever breaks since everything asserts if it tries to use a dead frame index later. The unused emergency stack slot seems to still be left behind, so an additional 4 bytes is still wasted. llvm-svn: 295753
* [LoopSimplify] Simplify how we compute UniqueExitXin Tong2017-02-211-8/+1
| | | | | | | | | | | | Summary: Simplify how we compute UniqueExit. Reuse ExitBlockSet. Reviewers: sanjoy, efriedma, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30182 llvm-svn: 295751
* More comments for getUniqueExitBlocks. NFCIXin Tong2017-02-211-1/+2
| | | | llvm-svn: 295750
* Teach the IR verifier to reject conflicting debug info for function arguments.Adrian Prantl2017-02-212-0/+64
| | | | | | | | | | | Conflicting debug info for function arguments causes hard-to-debug assertions in the DWARF backend, so the Verifier should reject it. For performance reasons this only checks function arguments from non-inlined debug intrinsics for now. rdar://problem/30520286 llvm-svn: 295749
* [CodeGenPrepare] Sink and duplicate more 'and' instructions.Geoff Berry2017-02-2110-91/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Rework the code that was sinking/duplicating (icmp and, 0) sequences into blocks where they were being used by conditional branches to form more tbz instructions on AArch64. The new code is more general in that it just looks for 'and's that have all icmp 0's as users, with a target hook used to select which subset of 'and' instructions to consider. This change also enables 'and' sinking for X86, where it is more widely beneficial than on AArch64. The 'and' sinking/duplicating code is moved into the optimizeInst phase of CodeGenPrepare, where it can take advantage of the fact the OptimizeCmpExpression has already sunk/duplicated any icmps into the blocks where they are used. One minor complication from this change is that optimizeLoadExt needed to be updated to always mark 'and's it has determined should be in the same block as their feeding load in the InsertedInsts set to avoid an infinite loop of hoisting and sinking the same 'and'. This change fixes a regression on X86 in the tsan runtime caused by moving GVNHoist to a later place in the optimization pipeline (see PR31382). Reviewers: t.p.northover, qcolombet, MatzeB Subscribers: aemerson, mcrosier, sebpop, llvm-commits Differential Revision: https://reviews.llvm.org/D28813 llvm-svn: 295746
* AMDGPU : AMDGPU : Update AMDGPU Trap Handler ABI.Wei Ding2017-02-211-41/+49
| | | | | | Differential Revision: http://reviews.llvm.org/D29913 llvm-svn: 295745
* Test commitDmitry Preobrazhensky2017-02-212-0/+4
| | | | llvm-svn: 295740
* [X86] EltsFromConsecutiveLoads SDLoc argument should be const&.Simon Pilgrim2017-02-211-1/+1
| | | | | | There appears never to have been a time that the reference was updated. llvm-svn: 295739
* [RT ARM] Avoid Linux include with a redefinitionRenato Golin2017-02-211-4/+9
| | | | | | | | | To avoid depending on kernel headers, we just repeat the single define we need, which is likely never going to change. Patch by Joakim Sindholt <opensource@zhasha.com> llvm-svn: 295738
* Do not leak OpenedHandles.Vassil Vassilev2017-02-212-7/+4
| | | | | | Reviewed by Vedant Kumar (D30178) llvm-svn: 295737
* [X86][AVX512] Update VPBROADCASTQ test to combine from VPERMQ instead of ↵Simon Pilgrim2017-02-211-7/+6
| | | | | | | | VPERMI2Q. VPERMI2Q doesn't have shuffle decoding from re-materializable constants. llvm-svn: 295736
* [X86][AVX] Rename shuffle combine tests to show combined shuffle type. NFCI.Simon Pilgrim2017-02-212-9/+9
| | | | llvm-svn: 295735
* [ARM] Correct SP/PC handling in t2MOVrJohn Brawn2017-02-211-0/+100
| | | | | | Add a missing test that I forgot to svn add in my previous commit llvm-svn: 295734
* [X86][AVX2] Fix VPBROADCASTQ folding on 32-bit targets.Simon Pilgrim2017-02-213-4/+18
| | | | | | As i64 isn't a value type on 32-bit targets, we need to fold the VZEXT_LOAD into VPBROADCASTQ. llvm-svn: 295733
* [ARM] Correct SP/PC handling in t2MOVrJohn Brawn2017-02-212-4/+20
| | | | | | | | | | PC isn't allowed in the source operand of t2MOVr, so change the register class to one without PC. SP handling is slightly trickier and changes depending on if we're in ARMv8, so do that in checkTargetMatchPredicate. Differential Revision: https://reviews.llvm.org/D30199 llvm-svn: 295732
* [X86][AVX2] Add AVX512 test targets to AVX2 shuffle combines.Simon Pilgrim2017-02-211-24/+50
| | | | llvm-svn: 295731
* [compiler-rt][asan] Add support for desallocation of unhandled pointersEtienne Bergeron2017-02-217-8/+63
| | | | | | | | | | | | | | Summary: On windows 10, the ucrt DLL is performing allocations before the function hooking and there are multiple allocations not handled by Asan. When a free occur at the end of the process, asan is reporting desallocations not malloc-ed. Reviewers: rnk, kcc Reviewed By: rnk, kcc Subscribers: kcc, llvm-commits, kubamracek, chrisha, dberris Differential Revision: https://reviews.llvm.org/D25946 llvm-svn: 295730
* [X86][AVX] Add tests showing missed VPBROADCASTQ folding on 32-bit targets.Simon Pilgrim2017-02-212-0/+54
| | | | | | | | As i64 isn't a value type on 32-bit targets, we fail to fold the VZEXT_LOAD into VPBROADCASTQ. Also shows that we're not decoding VPERMIV3 shuffles very well.... llvm-svn: 295729
* [mips] Define macros related to -mabicalls in the preprocessorSimon Dardis2017-02-212-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Historically, NetBSD, FreeBSD and OpenBSD have defined the macro ABICALLS in the preprocessor when -mabicalls is in effect. Mainline GCC later defined __mips_abicalls when -mabicalls is in effect. This patch teaches the preprocessor to define these macros when appropriate. NetBSD does not require the ABICALLS macro. This resolves PR/31694. Thanks to Sean Bruno for highlighting this issue! Reviewers: slthakur, seanbruno Reviewed By: seanbruno Subscribers: joerg, brad, emaste, seanbruno, cfe-commits Differential Revision: https://reviews.llvm.org/D29032 llvm-svn: 295728
* [ELF] - Do not segfault when using --gc-sections with linker scriptGeorge Rimar2017-02-212-0/+21
| | | | | | | | | | | Patch fixes PR32024. Sections that were not marked as Live has null output section. Previously we tried to access that field and segfaulted. Differential revision: https://reviews.llvm.org/D30188 llvm-svn: 295727
* [DependenceInfo] Simplify creation and subsequent use of AccessSchedule [NFC]Tobias Grosser2017-02-211-31/+22
| | | | | | | | | | | | | | We only ever use the wrapped domain of AccessSchedule, so stop creating an entire union_map and then pulling the domain out. Reviewers: grosser Tags: #polly Contributed-by: Siddharth Bhat <siddu.druid@gmail.com> Differential Revision: https://reviews.llvm.org/D30179 llvm-svn: 295726
* Add a test for the feature introduced in r295240.Ed Schouten2017-02-211-0/+32
| | | | | | | | | | | r295240 tweaked LLD to generate a symbol table when passing in --export-dynamic, even when creating static executables. Add a test to make sure this never regresses. Reviewed by: ruiu, rafael Differential Revision: https://reviews.llvm.org/D30175 llvm-svn: 295725
* [ELF] - Shortify at-addr.s testcase.George Rimar2017-02-211-79/+16
| | | | llvm-svn: 295724
* [X86][SSE] Prefer to combine shuffles to VZEXT over VZEXT_MOVL.Simon Pilgrim2017-02-212-29/+14
| | | | | | This matches what is already done during shuffle lowering and helps prevent the need for a zero-vector in cases where shuffles match both patterns. llvm-svn: 295723
* [ELF] - Postpone evaluation of LMA offset.George Rimar2017-02-213-3/+107
| | | | | | | | | | | | | | | | | | Previously we evaluated the values of LMA incorrectly for next cases: .text : AT(ADDR(.text) - 0xffffffff80000000) { ... } .data : AT(ADDR(.data) - 0xffffffff80000000) { ... } .init.begin : AT(ADDR(.init.begin) - 0xffffffff80000000) { ... } Reason was that we evaluated offset when VA was not assigned. For case above we ended up with 3 loads that has similar LMA and it was incorrect. That is critical for linux kernel. Patch updates the offset after VA calculation. That fixes the issue. Differential revision: https://reviews.llvm.org/D30163 llvm-svn: 295722
* [X86][SSE] Added SSE41 shuffle combining test file.Simon Pilgrim2017-02-211-0/+38
| | | | | | Currently just contains one case where we combine to VZEXT_MOVL instead of VZEXT which would avoid the need for a zero vector to be generated llvm-svn: 295721
* [ELF] - Improve diagnostic messages for move location counter errors.George Rimar2017-02-215-14/+22
| | | | | | | | | | Previously LLD would error out just "ld.lld: error: unable to move location counter backward" What does not really reveal the place of issue, Patch adds location to the output. Differential revision: https://reviews.llvm.org/D30187 llvm-svn: 295720
* [InstCombine] Do not exercise nested max/min pattern on absAnna Thomas2017-02-212-1/+25
| | | | | | | | | | | | | | | | | | | Summary: This is a fix for assertion failure in `getInverseMinMaxSelectPattern` when ABS is passed in as a select pattern. We should not be invoking the simplification rule for ABS(MIN(~ x,y))) or ABS(MAX(~x,y)) combinations. Added a test case which would cause an assertion failure without the patch. Reviewers: sanjoy, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30051 llvm-svn: 295719
OpenPOWER on IntegriCloud