summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] canonicalize min/max constant to select's false valueSanjay Patel2016-11-217-117/+275
| | | | | | | | | | | | | | | | | | | | This is a first step towards canonicalization and improved folding/codegen for integer min/max as discussed here: http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html Here, we're just matching the simplest min/max patterns and adjusting the icmp predicate while swapping the select operands. I've included FIXME tests in test/Transforms/InstCombine/select_meta.ll so it's easier to see how this might be extended (corresponds to the TODO comment in the code). That's also why I'm using matchSelectPattern() rather than a simpler check; once the backend is patched, we can just remove some of the restrictions to allow the obfuscated min/max patterns in the FIXME tests to be matched. Differential Revision: https://reviews.llvm.org/D26525 llvm-svn: 287585
* LSR debug fix.Evgeny Stupachenko2016-11-211-1/+1
| | | | | | | | | | | Summary: Dump instruction instead of address. Reviewers: hfinkel Differential Revision: http://reviews.llvm.org/D26877 From: Evgeny Stupachenko <evstupac@gmail.com> llvm-svn: 287584
* reassociate-deadinst.ll: avoid accidental match on pathHubert Tong2016-11-211-1/+1
| | | | | | Pipe from stdin to avoid accidentally matching on the path. llvm-svn: 287583
* fix formatting; NFCSanjay Patel2016-11-211-1/+0
| | | | llvm-svn: 287582
* [asan] Specialize the initialization-bug.cc testcase for Darwin (it needs a ↵Kuba Mracek2016-11-212-1/+5
| | | | | | | | | | deployment target of 10.11+) The ODR detection in initialization-bug.cc now works on Darwin (due to the recently enabled "live globals" on-by-default), but only if the deployment target is 10.11 or higher. Let's adjust the testcases. Differential Revision: https://reviews.llvm.org/D26927 llvm-svn: 287581
* Add a test for vcall on a null ptr.Ivan Krasin2016-11-211-6/+26
| | | | | | | | | | | | | | | | Summary: Turns out that in the case of -fsanitize=null and a virtual call, the type check was generated *after* reading from vtable, which causes a non-interpretable segfault. The check has been moved up in https://reviews.llvm.org/D26559 and this CL adds a test for this case. Reviewers: pcc Subscribers: cfe-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D26560 llvm-svn: 287578
* [asan] Un-XFAIL Windows global dead stripping test casesReid Kleckner2016-11-212-6/+0
| | | | | | Test update for r287576 llvm-svn: 287577
* [asan] Make ASan compatible with linker dead stripping on WindowsReid Kleckner2016-11-213-51/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is similar to what was done for Darwin in rL264645 / http://reviews.llvm.org/D16737, but it uses COFF COMDATs to achive the same result instead of relying on new custom linker features. As on MachO, this creates one metadata global per instrumented global. The metadata global is placed in the custom .ASAN$GL section, which the ASan runtime will iterate over during initialization. There are no other references to the metadata, so normal linker dead stripping would discard it. However, the metadata is put in a COMDAT group with the instrumented global, so that it will be discarded if and only if the instrumented global is discarded. I didn't update the ASan ABI version check since this doesn't affect non-Windows platforms, and the WinASan ABI isn't really stable yet. Implementing this for ELF will require extending LLVM IR and MC a bit so that we can use non-COMDAT section groups. Reviewers: pcc, kcc, mehdi_amini, kubabrecka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26770 llvm-svn: 287576
* [MemorySSA] Fix unit tests broken by D26704Mandeep Singh Grang2016-11-212-9/+9
| | | | | | | | | | | | | | | | | Summary: D26704 fixed the non-determinism in codegen by sorting basic blocks before iteration so as to have a defined iteration order. As a result we need to fix the names (numbers) of the temporaries in the following unit tests: test/Transforms/Util/MemorySSA/multi-edges.ll test/Transforms/Util/MemorySSA/multiple-backedges-hal.ll Reviewers: dberlin, david2050, mgrang Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26926 llvm-svn: 287575
* [mips] Add tests for half precision floating point support.Simon Dardis2016-11-212-0/+1175
| | | | | | These should have been part of r287349. llvm-svn: 287574
* [mips] seq macro supportSimon Dardis2016-11-213-0/+162
| | | | | | | | | | | | | | This patch adds the seq macro. This partially resolves PR/30381. Thanks to Sean Bruno for reporting the issue! Reviewers: zoran.jovanovic, vkalintiris, seanbruno Differential Revision: https://reviews.llvm.org/D24607 llvm-svn: 287573
* Update comment for r287566Hongbin Zheng2016-11-211-2/+2
| | | | llvm-svn: 287572
* Check proper live range in extendPHIRangesKrzysztof Parzyszek2016-11-212-7/+17
| | | | | | | | | | | | | The function extendPHIRanges checks the main range of the original live interval, even when dealing with a subrange. This could also lead to an assert when the subrange is not live at the extension point, but the main range is. To avoid this, check the corresponding subrange of the original live range, instead of always checking the main range. Review (as a part of a bigger set of changes): https://reviews.llvm.org/D26359 llvm-svn: 287571
* [TLI] Fix breakage introduced by D21739.Marcin Koscielnicki2016-11-211-19/+19
| | | | | | | | | The initialize function has an early return for AMDGPU targets. If taken, the ShouldExtI32* initialization code will not be executed, resulting in invalid values in the corresponding fields. Fix this by moving the code to the top of the function. llvm-svn: 287570
* Use the correct page size.Rafael Espindola2016-11-212-1/+22
| | | | | | | Config->MaxPageSize is what we use for the segment alignment, so that is the one that we have to use for placing the header. llvm-svn: 287569
* Fix formatHongbin Zheng2016-11-211-1/+2
| | | | llvm-svn: 287568
* [AsmPrinter] Enable codeview for windows-itaniumShoaib Meenai2016-11-212-1/+6
| | | | | | | | | | Enable codeview emission for windows-itanium targets. Co-opt an existing test (which is derived from a C source file and should therefore be identical across the Itanium and MS ABIs). Differential Revision: https://reviews.llvm.org/D26693 llvm-svn: 287567
* Split ScopInfo::addScopStmt into two versions. NFCHongbin Zheng2016-11-213-19/+27
| | | | | | One for adding statement for region, another one for BB llvm-svn: 287566
* Fix address computation for headers.Rafael Espindola2016-11-213-19/+44
| | | | | | | | | | | | | | | | If the linker script has SECTIONS, the address computation is now always done in LinkerScript::assignAddresses, like for any other section. Before fixHeaders would do a tentative computation that assignAddresses would sometimes override. This patch also splits the cases where assignAddresses needs to add the headers to the first PT_LOAD and the address computation. The net effect is that we no longer create an empty page for no reason in the included test case, which matches bfd behavior. llvm-svn: 287565
* Move a function definition to SyntheticSections.cpp.Rui Ueyama2016-11-212-5/+5
| | | | | | This should have been moved along with r287554. llvm-svn: 287564
* [MemorySSA] Fix for non-determinism in codegenMandeep Singh Grang2016-11-216-54/+64
| | | | | | | | | | | | | | | | | | | | This patch fixes the non-determinism caused due to iterating SmallPtrSet's which was uncovered due to the experimental "reverse iteration order " patch: https://reviews.llvm.org/D26718 The following unit tests failed because of the undefined order of iteration. LLVM :: Transforms/Util/MemorySSA/cyclicphi.ll LLVM :: Transforms/Util/MemorySSA/many-dom-backedge.ll LLVM :: Transforms/Util/MemorySSA/many-doms.ll LLVM :: Transforms/Util/MemorySSA/phi-translation.ll Reviewers: dberlin, mgrang Subscribers: dberlin, llvm-commits, david2050 Differential Revision: https://reviews.llvm.org/D26704 llvm-svn: 287563
* Minor changeHongbin Zheng2016-11-211-1/+1
| | | | llvm-svn: 287562
* [VectorLegalizer] Remove EVT::getSizeInBits code duplications. NFCI.Simon Pilgrim2016-11-211-8/+6
| | | | | | We were calling SVT.getSizeInBits() several times in a row - just call it once and reuse the result. llvm-svn: 287556
* Do plumbing work for CodeView debug info.Rui Ueyama2016-11-218-5/+174
| | | | | | | | | | Previously, we discarded .debug$ sections. This patch adds them to files so that PDB.cpp can access them. This patch also adds a debug option, /dumppdb, to dump debug info fed to createPDB so that we can verify that valid data has been passed. llvm-svn: 287555
* [ELF] Convert Version*** sections to input sectionsEugene Leviant2016-11-215-288/+279
| | | | | | Differential revision: https://reviews.llvm.org/D26918 llvm-svn: 287554
* [CodeGenPrep] Skip merging empty case blocksJun Bum Lim2016-11-216-43/+291
| | | | | | | | | | | | | | | | Summary: Merging an empty case block into the header block of switch could cause ISel to add COPY instructions in the header of switch, instead of the case block, if the case block is used as an incoming block of a PHI. This could potentially increase dynamic instructions, especially when the switch is in a loop. I added a test case which was reduced from the benchmark I was targetting. Reviewers: t.p.northover, mcrosier, manmanren, wmi, davidxl Subscribers: qcolombet, danielcdh, hfinkel, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D22696 llvm-svn: 287553
* Set task->td_dephash to NULL after freeJonathan Peyton2016-11-211-0/+1
| | | | llvm-svn: 287552
* Fix for D25504 - segfault because of double free()-ing in shutdown code.Jonathan Peyton2016-11-211-1/+2
| | | | | | | | | | Paul Osmialowski pointed out a double free bug in shutdown code. This patch Moves the freeing of the implicit task to above the freeing of all fast memory to prevent the double-free issue. Differential Revision: https://reviews.llvm.org/D26860 llvm-svn: 287551
* clang-tidy: improve my test for readability-redundant-declarationDaniel Marjamaki2016-11-211-2/+2
| | | | llvm-svn: 287550
* [ELF] Convert EhFrameHeader to input sectionEugene Leviant2016-11-215-95/+97
| | | | | | Differential revision: https://reviews.llvm.org/D26906 llvm-svn: 287549
* small fixup which enables the issuing of the aforementioned instruction (w/o ↵Coby Tayree2016-11-212-1/+3
| | | | | | | | operands), on MS/Intel syntax. Differential Revision: https://reviews.llvm.org/D26913 llvm-svn: 287548
* [ELF] Better error reporting for linker scriptsEugene Leviant2016-11-217-61/+129
| | | | | | Differential revision: https://reviews.llvm.org/D26795 llvm-svn: 287547
* clang-tidy: Attempt to fix build bot failure with mismatching size_t ↵Daniel Marjamaki2016-11-211-1/+1
| | | | | | platform type. llvm-svn: 287546
* Fix known zero bits for addrspacecast.Yaxun Liu2016-11-213-28/+24
| | | | | | | | | | Currently LLVM assumes that a pointer addrspacecasted to a different addr space is equivalent to trunc or zext bitwise, which is not true. For example, in amdgcn target, when a null pointer is addrspacecasted from addr space 4 to 0, its value is changed from i64 0 to i32 -1. This patch teaches LLVM not to assume known bits of addrspacecast instruction to its operand. Differential Revision: https://reviews.llvm.org/D26803 llvm-svn: 287545
* [include-fixer plugin] Make the plugin emit proper fixits in case multiple ↵Benjamin Kramer2016-11-213-17/+42
| | | | | | | | | | | errors are found. The standalone tool only fixes the first one and we managed to bake that assumption into the code :( Also fix a crash when no header is found at all. llvm-svn: 287544
* [X86][SSE] Add SSE reciprocal estimate testsSimon Pilgrim2016-11-212-35/+244
| | | | llvm-svn: 287543
* Fix remote-linux regression due to stringRef changesOmair Javaid2016-11-211-1/+1
| | | | | | | | This is to fix a regression in remote-linux lldb-server connections. We were wrongly passing a copy of uri and expecting a stringRef back. llvm-svn: 287542
* [SelectionDAG] Add ComputeNumSignBits support for CONCAT_VECTORS opcodeSimon Pilgrim2016-11-212-30/+15
| | | | llvm-svn: 287541
* readability-redundant-declaration: Fix crashDaniel Marjamaki2016-11-212-0/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D26911 llvm-svn: 287540
* [llvm-cov] Avoid 0% when reporting something that's 0/0Alex Lorenz2016-11-216-20/+74
| | | | | | | | | | | | | This commit makes llvm-cov avoid showing 0% (0/0) coverage for things like file function coverage, etc. in reports and HTML output. This can happen for files like headers that have macros but no functions. This commit makes llvm-cov report - (0/0) instead. rdar://29246480 Differential Revision: https://reviews.llvm.org/D26615 llvm-svn: 287539
* [ELF] Attempt to fix Windows buidbotEugene Leviant2016-11-212-5/+5
| | | | llvm-svn: 287538
* Change the way how we print out line numbers.Rui Ueyama2016-11-2128-54/+54
| | | | | | | | | | | | | | | | | | | LLD's error messages contain line numbers, function names or section names. Currently they are formatter as follows. foo.c (32): symbol 'foo' not found foo.c (function bar): symbol 'foo' not found foo.c (.text+0x1234): symbol 'foo' not found This patch changes them so that they are consistent with Clang's output. foo.c:32: symbol 'foo' not found foo.c:(function bar): symbol 'foo' not found foo.c:(.text+0x1234): symbol 'foo' not found Differential Revision: https://reviews.llvm.org/D26901 llvm-svn: 287537
* Adjust arm64-irtranslator.ll test to changes from r287368Benjamin Kramer2016-11-211-3/+3
| | | | | | | | | | The test is currently broken, and this CL should fix it. Patch by Adrian Kuegel! Differential Revision: https://reviews.llvm.org/D26910 llvm-svn: 287536
* [X86][SSE] Allow PACKSS to be used to truncate any type of all/none sign ↵Simon Pilgrim2016-11-212-53/+41
| | | | | | | | | | bits input At the moment we only use truncateVectorCompareWithPACKSS with direct vector comparison results (just one example of a known all/none signbits input). This change relaxes the direct matching of a SETCC opcode by moving the logic up into SelectionDAG::ComputeNumSignBits and accepting any input with a known splatted signbit. llvm-svn: 287535
* [InstrProfiling] Mark __llvm_profile_instrument_target last parameter as i32 ↵Marcin Koscielnicki2016-11-213-12/+49
| | | | | | | | | | | | | | | | | zeroext if appropriate. On some architectures (s390x, ppc64, sparc64, mips), C-level int is passed as i32 signext instead of plain i32. Likewise, unsigned int may be passed as i32, i32 signext, or i32 zeroext depending on the platform. Mark __llvm_profile_instrument_target properly (its last parameter is unsigned int). This (together with the clang change) makes compiler-rt profile testsuite pass on s390x. Differential Revision: http://reviews.llvm.org/D21736 llvm-svn: 287534
* [TLI] Add functions determining if int parameters/returns should be ↵Marcin Koscielnicki2016-11-212-2/+73
| | | | | | | | | | | | | | | zeroext/signext. On some architectures (s390x, ppc64, sparc64, mips), C-level int is passed as i32 signext instead of plain i32. Likewise, unsigned int may be passed as i32, i32 signext, or i32 zeroext depending on the platform. Add this information to TargetLibraryInfo, to be used whenever some LLVM pass inserts a compiler-rt call to a function involving int parameters or returns. Differential Revision: http://reviews.llvm.org/D21739 llvm-svn: 287533
* Fixing a small typo (A->U). Michael Zuckerman2016-11-211-1/+1
| | | | | | | | | This seem to fixes PR30992. - HasAVX512 ? X86::VMOVAPSZ128rm_NOVLX + HasAVX512 ? X86::VMOVUPSZ128rm_NOVLX llvm-svn: 287532
* Revert r287435 because of OS X test failuresEric Fiselier2016-11-215-87/+369
| | | | llvm-svn: 287531
* [ObjC] Prevent infinite loops when iterating over redeclarationAlex Lorenz2016-11-212-0/+27
| | | | | | | | | | | | | | | | of a method that was declared in an invalid interface This commit fixes an infinite loop that occurs when clang tries to iterate over redeclaration of a method that was declared in an invalid @interface. The existing validity checks don't catch this as that @interface is a duplicate of a previously declared valid @interface declaration, so we have to verify that the found redeclaration is in a valid declaration context. rdar://29220965 Differential Revision: https://reviews.llvm.org/D26664 llvm-svn: 287530
* [Frontend] Add a predefined macro that describes the Objective-C bool typeAlex Lorenz2016-11-212-0/+16
| | | | | | | | | | | | | This commit adds a new predefined macro named __OBJC_BOOL_IS_BOOL that describes the Objective-C boolean type: its value is zero if the Objective-C boolean uses the signed character type, otherwise its value is one as the Objective-C boolean uses the builtin boolean type. rdar://21170440 Differential Revision: https://reviews.llvm.org/D26234 llvm-svn: 287529
OpenPOWER on IntegriCloud