summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix asserts in AMDGCN fmed3 folding by handling more cases of NaNMatt Arsenault2018-07-052-10/+63
| | | | | | | | | | | | | | | Better NaN handling for AMDGCN fmed3. All operands are checked for NaN now. The checks were moved before the canonicalization to provide a better mapping from fclamp. Changed the behaviour of fmed3(x,y,NaN) to return max(x,y) instead of min(x,y) in light of this. Updated tests as a result and added some new cases to cover the fix. Patch by Alan Baker llvm-svn: 336375
* AMDGPU: Don't use spir_kernel in a testMatt Arsenault2018-07-051-3/+2
| | | | | | Also use verify-machineinstrs. llvm-svn: 336374
* AMDGPU/GlobalISel: Implement custom kernel arg loweringMatt Arsenault2018-07-056-52/+829
| | | | | | | | | | | | | Avoid using allocateKernArg / AssignFn. We do not want any of the type splitting properties of normal calling convention lowering. For now at least this exists alongside the IR argument lowering pass. This is necessary to handle struct padding correctly while some arguments are still skipped by the IR argument lowering pass. llvm-svn: 336373
* Simplify PPC64::calcEFlags().Rui Ueyama2018-07-052-40/+20
| | | | | | | | | | In this file we only have to handle the v2 ABI, so what we need to do is to just make sure that all object files have v2 or unspecified version number. Differential Revision: https://reviews.llvm.org/D48112 llvm-svn: 336372
* [CostModel][X86] Add UDIV/UREM by pow2 costsSimon Pilgrim2018-07-053-189/+450
| | | | | | Normally InstCombine would have simplified these to SRL/AND instructions but we may still see these during SLP vectorization etc. llvm-svn: 336371
* [llvm-objdump] Removed archive-headers-disas testPaul Semel2018-07-051-29/+0
| | | | | | | | This test is failing because of the disas part. For the moment, I will juste remove it. I will add it again tomorrow with a proper fix. llvm-svn: 336370
* [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITYLouis Dionne2018-07-0530-387/+377
| | | | | | | | | | | | | | | | | | | | Summary: We never actually mean to always inline a function -- all the uses of the macro I could find are actually attempts to control the visibility of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which is actually always defined the same. This change is orthogonal to the decision of what we're actually going to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by having one canonical way of doing things. Reviewers: EricWF Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists Differential Revision: https://reviews.llvm.org/D48892 llvm-svn: 336369
* [NFC] Add <initializer_list> to the synopsis of <utility>Louis Dionne2018-07-051-0/+2
| | | | | | | | | | | | | | Summary: It is part of the synopsis in the Standard and <utility> does include it, but it was left out of the synopsis comment. Reviewers: EricWF, mclow.lists Subscribers: christof, llvm-commits Differential Revision: https://reviews.llvm.org/D48611 llvm-svn: 336368
* [llvm-mca] Fix RegisterFile debug prints. NFCAndrea Di Biagio2018-07-052-3/+9
| | | | llvm-svn: 336367
* Make a test more robust.Rui Ueyama2018-07-051-0/+5
| | | | | | Reported by Chris Jackson. llvm-svn: 336366
* Make __gcov_flush flush counters for all shared librariesMarco Castelluccio2018-07-0520-85/+678
| | | | | | | | | | | | | | | | | Summary: This will make the behavior of __gcov_flush match the GCC behavior. I would like to rename __gcov_flush to __llvm_gcov_flush (in case of programs linking to libraries built with different compilers), but I guess we can't for compatibility reasons. Reviewers: davidxl Reviewed By: davidxl Subscribers: samsonov, vitalybuka, pcc, kcc, junbuml, glider, fhahn, eugenis, dvyukov, davidxl, srhines, chh, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D48538 llvm-svn: 336365
* Fix __builtin_*_overflow when out-param isn't constexprErich Keane2018-07-052-1/+18
| | | | | | | | | | | | | | | As brought up on cfe-commits[1], r334650 causes the dependency of the out parameter to the __builtin_*_overflow functions to be ignored. The result was a usage that was otherwise constexpr (both operands to the operation were constexpr) would be evaluated, but the out parameter wouldn't be modified, so it would still be 'undef'. This patch correctly handles the return value of handleAssignment to ensure that this value is properly considered/evaluated. [1] http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180702/233667.html llvm-svn: 336364
* [llvm-objcopy] Fix timezone dependant testsPaul Semel2018-07-052-18/+18
| | | | llvm-svn: 336363
* [ScopInfo] Move foldSizeConstantsToRight() to isl++Tobias Grosser2018-07-051-61/+30
| | | | | | | | | | | | | | Summary: This patch updates the isl interface used in `foldSizeConstantsToRight()` to the new C++ interface. Reviewers: chelini, grosser, philip.pfaffe, Meinersbur Reviewed By: grosser Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48965 llvm-svn: 336362
* [Power9] Add lib calls for float128 operations with no equivalent PPC ↵Lei Huang2018-07-052-1/+165
| | | | | | | | | | | instructions Map the following instructions to the proper float128 lib calls: pow[i], exp[2], log[2|10], sin, cos, fmin, fmax Differential Revision: https://reviews.llvm.org/D48544 llvm-svn: 336361
* [X86][SSE] Add srem x, (1 << c) combine testsSimon Pilgrim2018-07-051-0/+227
| | | | | | Now that D45806 has landed we can start trying to avoid scalarizing srem by constant - these tests demonstrate some example cases. llvm-svn: 336360
* [ELF] - Add test case for checking PT_INTERP behavior.George Rimar2018-07-051-0/+21
| | | | | | | | | | | | | When PT_INTERP is specified in PHDRS command, it should be created. (if other conditions met) We had no test for the folowing line: https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1108 And for this header itself. Patch fixes that. llvm-svn: 336359
* [clang-move] ClangMoveTests: Remove dots in output pathsSimon Marchi2018-07-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Following D48903 ([VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name), the paths output by clang-move in the FileToReplacements map may contain leading "./". For example, where we would get "foo.h", we'll now get "./foo.h". This breaks the tests, because we are doing exact string lookups in the FileToFileID and Results maps (they contain "foo.h", but we search for "./foo.h"). To mitigate this, try to normalize a little bit the paths output by clang-move to remove that leading "./". This patch should be safe to merge before D48903, remove_dots will just be a no-op. Reviewers: ilya-biryukov, hokein Reviewed By: hokein Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D48951 llvm-svn: 336358
* [llvm-objdump] Add --archive-headers (-a) optionPaul Semel2018-07-055-10/+133
| | | | llvm-svn: 336357
* [ELF] - Eliminate dead "if". NFC.George Rimar2018-07-051-2/+0
| | | | | | | | | | | | We call switchTo() from assignAddresses() for switching to Aether, and from assignOffsets(). First calls assignOffsets() one by one for each output section. (https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1045) That I believe means the condition removed in this patch is dead. llvm-svn: 336356
* [X86] Fix some vector cmp builtins - TRUE/FALSE predicatesGabor Buella2018-07-054-153/+120
| | | | | | | | | | | | | | | | | This patch removes on optimization used with the TRUE/FALSE predicates, as was suggested in https://reviews.llvm.org/D45616 for r335339. The optimization was buggy, since r335339 used it also for *_mask builtins, without actually applying the mask -- the mask argument was just ignored. Reviewers: craig.topper, uriel.k, RKSimon, andrew.w.kaylor, spatel, scanon, efriedma Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D48715 llvm-svn: 336355
* [ELF] - Convert excessive dyn_cast -> cast. NFC.George Rimar2018-07-051-3/+2
| | | | | | | | | Currently, there are only OutputSection and SymbolAssignment commands possible at the first level under SECTIONS tag. Hence, dyn_cast was excessive. llvm-svn: 336354
* [ELF] - Test we are able to assign version to symbols that are not "_Z*"George Rimar2018-07-051-0/+22
| | | | | | | | | | This is to test the following line of the code: https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L681 If symbol does not start from _Z prefix and we have extern "C++", we do not call demangler and use its name as is. llvm-svn: 336353
* [llvm-exegesis] Add uop computation for more X87 instruction classes.Clement Courbet2018-07-054-70/+85
| | | | | | | | | | | | | | Summary: This allows measuring comparisons (UCOM_FpIr32,UCOM_Fpr32,...), conditional moves (CMOVBE_Fp32,...) Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48713 llvm-svn: 336352
* Fix comment typo. NFCI.Simon Pilgrim2018-07-051-1/+1
| | | | llvm-svn: 336351
* [CodeGen] Fix potential null pointer dereference. NFC.Michael Kruse2018-07-051-3/+5
| | | | | | | | | | ScalarEvolution::getSCEV dereferences its argument, s.t. passing nullptr leads to undefined behaviour. Check for nullptr before calling it instead of checking its argument afterwards. llvm-svn: 336350
* [ELF] - Check we do not assign version to undefined symbol when using extern ↵George Rimar2018-07-051-0/+19
| | | | | | | | | C++. This tests the following 'continue' line in getDemangledSyms(): https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L677 llvm-svn: 336349
* [AArch64, PowerPC, x86] add tests for signbit bit hacks; NFCSanjay Patel2018-07-053-0/+459
| | | | llvm-svn: 336348
* [mips] Add '-mcrc', '-mno-crc' options to enable/disable CRC ASEVladimir Stefanovic2018-07-053-2/+18
| | | | | | | | | '-mcrc' is shared with ARM. '-mno-crc' is Mips-only (ARM uses '-mnocrc'). Differential revision: https://reviews.llvm.org/D48169 llvm-svn: 336347
* [X86] NFC - add more test cases for vector cmp intrinsicsGabor Buella2018-07-053-222/+3152
| | | | | | | | | | | | | | | | | | | | | | | | | | Add test cases with each predicate using the following intrinsics: _mm_cmp_pd _mm_cmp_ps _mm256_cmp_pd _mm256_cmp_ps _mm_cmp_pd_mask _mm_cmp_ps_mask _mm256_cmp_pd_mask _mm256_cmp_ps_mask _mm512_cmp_pd_mask _mm512_cmp_ps_mask _mm_mask_cmp_pd_mask _mm_mask_cmp_ps_mask _mm256_mask_cmp_pd_mask _mm256_mask_cmp_ps_mask _mm512_mask_cmp_pd_mask _mm512_mask_cmp_ps_mask Some of these are marked with FIXME, as there is bug in lowering e.g. _mm512_mask_cmp_ps_mask. llvm-svn: 336346
* [ELF] - Add test to check we don't crash when tracing reserved symbol.George Rimar2018-07-051-0/+3
| | | | | | | | | This is to test the following line of code: https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L601 Without that line linker would crash. llvm-svn: 336345
* [SLPVectorizer] Begin abstracting InstructionsState alternate matching away ↵Simon Pilgrim2018-07-051-42/+55
| | | | | | | | | | from opcodes. NFCI. This is an early step towards matching Instructions by attributes other than the opcode. This will be necessary for cast/call alternates which share the same opcode but have different types/intrinsicIDs etc. - which we could vectorize as long as we split them using the alternate mechanism. Differential Revision: https://reviews.llvm.org/D48945 llvm-svn: 336344
* [llvm-exegesis][NFC]clang-formatClement Courbet2018-07-051-7/+7
| | | | llvm-svn: 336343
* [ELF] - Test LLD creates empty .imports file.George Rimar2018-07-051-2/+6
| | | | | | | | | This covers the following code line with a test: https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L213 After that, coverage of LTO.cpp is 100%. llvm-svn: 336342
* Revert "[CMake] Run libFuzzer tests with check-all."Yvan Roux2018-07-051-0/+2
| | | | | | | Revert due to AArch64 bots breakage, upstream PR raised to track the issue: https://bugs.llvm.org/show_bug.cgi?id=38034 llvm-svn: 336341
* [ELF] - Add test to check we produce an error if unable to write an empty ↵George Rimar2018-07-051-0/+10
| | | | | | | | | | | | index file. Test case ensures lld generates an error if unable to write an empty index file for lazy object file that is not added to link. This covers the following line with a test: https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L206 llvm-svn: 336340
* [AMDGPU] Add VALU to V_INTERP InstructionsRyan Taylor2018-07-052-0/+20
| | | | | | | | | | | | Wait states are not properly being inserted after buffer_store for v_interp instructions. Add VALU to V_INTERP instructions so that the GCNHazardRecognizer can check and insert the appropriate wait states when needed. Differential Revision: https://reviews.llvm.org/D48772 Change-Id: Id540c9b074fc69b5c1de6b182276aa089c74aa64 llvm-svn: 336339
* [ELF] - Remove dead code. NFC.George Rimar2018-07-051-3/+0
| | | | | | | | | | | | | I think code is dead, because the only way to see Path as empty seems would be if replaceThinLTOSuffix() replaced some prefix with empty prefix (making the result Path empty). But it is impossible to pass the empty prefix, we would file in driver: https://github.com/llvm-mirror/lld/blob/master/ELF/Driver.cpp#L669 llvm-svn: 336338
* [ADT] Switch to indirect even the trivial case through an object pointerChandler Carruth2018-07-051-30/+26
| | | | | | | | | | | | | | | | | that has required alignment. This avoids issues that keep coming up with function pointers being less aligned. I'm pretty annoyed that we can't take advantage of function alignment even on platforms where they *are* aligned, but build modes and other things make taking advantage of it somewhere between hard and impossible. The best case scenario would still embed various build modes into the ABI causing really hard to debug issues if you compiled one object file differently from another. =/ This should at least bring the bots back that were having trouble with this. llvm-svn: 336337
* Partially revert r336268 in address-offsets.llKrasimir Georgiev2018-07-051-40/+40
| | | | | | | | | | | | | | Summary: There the typos are intentional, explicitly introduced to disable these cases in r280285. Reviewers: bkramer Reviewed By: bkramer Subscribers: dschuff, sbc100, jgravelle-google, aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D48962 llvm-svn: 336336
* [ELF] - Advance position in a memory region when change the Dot.George Rimar2018-07-053-0/+41
| | | | | | | | | | | | This is https://bugs.llvm.org//show_bug.cgi?id=37836 Previously LLD could assign to Dot or set the address for the section with address expression but did not advance the position in a memory region. Patch fixes the issue. llvm-svn: 336335
* [TableGen] Increase the number of supported decoder fix-ups.Sander de Smalen2018-07-054-36/+58
| | | | | | | | | | | | | | | | The vast number of added instructions for SVE causes TableGen to fail with an assertion: Assertion `Delta < 65536U && "disassembler decoding table too large!"' This patch increases the number of supported decoder fix-ups. Reviewers: dmgreen, stoklund, petpav01 Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D48937 llvm-svn: 336334
* [X86][SSE] Add extra v16i16 shl x,c -> pmullw testSimon Pilgrim2018-07-051-0/+27
| | | | | | We want to compare shifts with repeated vs non-repeated v8i16 shuffle masks (for PBLENDW ymm) llvm-svn: 336333
* [ASTImporter] Fix import of objects with anonymous typesGabor Marton2018-07-052-11/+31
| | | | | | | | | | | | | | | | Summary: Currently, anonymous types are merged into the same redecl chain even if they are structurally inequivalent. This results that global objects are not imported, if there are at least two global objects with different anonymous types. This patch provides a fix. Reviewers: a.sidorin, balazske, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D48773 llvm-svn: 336332
* Try to fix -Wimplicit-fallthrough warning. NFCI.Simon Pilgrim2018-07-051-0/+1
| | | | llvm-svn: 336331
* [NFS] Wipe trailing whitespacesKirill Bobyrev2018-07-053-810/+811
| | | | | | | | This patch is a preparation for another one containing meaningful changes. This patch simply removes trailing whitespaces in few files affected by the upcoming patch and reformats llvm-svn: 336330
* Fix -Wunused-variable warning. NFCI.Simon Pilgrim2018-07-051-1/+1
| | | | llvm-svn: 336329
* [mips] Fix atomic operations at O0, v3Aleksandar Beserminji2018-07-0512-765/+10095
| | | | | | | | | | | | | | | | | | | | | | | Similar to PR/25526, fast-regalloc introduces spills at the end of basic blocks. When this occurs in between an ll and sc, the stores can cause the atomic sequence to fail. This patch fixes the issue by introducing more pseudos to represent atomic operations and moving their lowering to after the expansion of postRA pseudos. This version addresses issues with the initial implementation and covers all atomic operations. This resolves PR/32020. Thanks to James Cowgill for reporting the issue! Patch By: Simon Dardis Differential Revision: https://reviews.llvm.org/D31287 llvm-svn: 336328
* Dropped non-supoorted "--no-as-needed" flag from OMPT tests for macOSJoachim Protze2018-07-053-4/+8
| | | | | | | | | | | | | | | | | The flag "--no-as-needed" is not recognized by the linker on macOS making the following tests fail: ompt/loadtool/tool_available/tool_available.c ompt/loadtool/tool_not_available/tool_not_available.c This patch removes this flag for macOS and adds it only for Linux and Windows. I tested it on Ubuntu 16.04 and macOS HighSierra, with Clang/LLVM 6.0.1 and OpenMP trunk. This solution was also discussed in the OpenMP-dev mailing list. Patch provided by Simone Atzeni Differential Revision: https://reviews.llvm.org/D48888 llvm-svn: 336327
* [OMPT] Add synchronization to threads_nested.c testcaseJoachim Protze2018-07-051-2/+4
| | | | | | | | | | | The testcase potentially fails when a thread is reused. The added synchronization makes sure this does not happen. Patch provided by Simon Convent Differential Revision: https://reviews.llvm.org/D48932 llvm-svn: 336326
OpenPOWER on IntegriCloud