summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix auto-upgrade for the new parameter to llvm.objectsizeErik Pilkington2019-02-123-2/+14
| | | | | | | | | | r352664 added a 'dynamic' parameter to objectsize, but the AutoUpgrade changes were incomplete. Also, fix an off-by-one error I made in the upgrade logic that is now no longer unreachable. Differential revision: https://reviews.llvm.org/D58071 llvm-svn: 353884
* [ConstProp] add test for miscompile from bitcast transform; NFCSanjay Patel2019-02-121-2/+16
| | | | | | This problem goes with the fix in D51215. llvm-svn: 353883
* Make ModuleDependencyCollector's method virtual (NFC)Jonas Devlieghere2019-02-121-5/+5
| | | | | | | | | | | | | | For reproducers in LLDB we want to hook up into the existing clang infrastructure. To make that happen we need to be able to override the ModuleDependencyCollector's methods. The alternative was to inherit from the DependencyCollector directly, but that would mean re-implementing the ModuleDependencyListener and the ModuleDependencyPPCallbacks and ModuleDependencyMMCallbacks. Differential revision: https://reviews.llvm.org/D58072 llvm-svn: 353882
* [HIP] Handle compile -m options and propagate into LLCAaron Enye Shi2019-02-122-2/+68
| | | | | | | | | | | Allow the compile options for -m such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3 to propagate into LLC args. Also add lit tests to verify features are properly passed. Differential Revision: https://reviews.llvm.org/D57977 Reviewers: yaxunl, kzhuravl llvm-svn: 353880
* [X86] Use __m128_u for _mm_loadu_ps after r353555Reid Kleckner2019-02-122-1/+2
| | | | | | | | Add secondary triple to existing SSE test for it. I audited other uses of __attribute__((__packed__)) in the intrinsic headers, and this seemed to be the only missing one. llvm-svn: 353878
* Disable PIC/PIE for MSP430 targetAnton Korobeynikov2019-02-122-0/+34
| | | | | | | | | | Relocatable code generation is meaningless on MSP430, as the platform is too small to use shared libraries. Patch by Dmitry Mikushev! Differential Revision: https://reviews.llvm.org/D56927 llvm-svn: 353877
* [llvm-dwp] Use color-formatted error reportingJordan Rupprecht2019-02-121-2/+3
| | | | llvm-svn: 353876
* [NFC] typoJF Bastien2019-02-121-1/+1
| | | | llvm-svn: 353875
* Fix undefined behaviour in PPCInstPrinter::printBranchOperand.Sean Fertile2019-02-121-1/+1
| | | | | | | | Fix the undefined behaviour introduced by my previous patch r353865 (left shifting a potentially negative value), which was caught by the bots that run UBSan. llvm-svn: 353874
* [llvm-dwp] Avoid writing the output dwp file when there is an errorJordan Rupprecht2019-02-122-6/+13
| | | | | | | | | | | | | | | | Summary: Use ToolOutputFile to clean up the output file unless dwp actually finishes successfully. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58130 llvm-svn: 353873
* [AArch64] Expand v8i8 cttz (PR39729)Nikita Popov2019-02-122-9/+125
| | | | | | | | | | | Fix for https://bugs.llvm.org/show_bug.cgi?id=39729. Rather than adding just a case for v8i8 I'm setting cttz to expand for all vector types. Differential Revision: https://reviews.llvm.org/D58008 llvm-svn: 353872
* [InlineSpiller] Fix a crash due to lack of forward progress from remat (try 2)Philip Reames2019-02-122-1/+490
| | | | | | | | | | | This is a recommit of r335091 Add more test cases for deopt-operands via regalloc, and r335077 [InlineSpiller] Fix a crash due to lack of forward progress from remat specifically for STATEPOINT. They were reverted due to a crash. This change includes the text of both original changes, but also includes three aditional pieces: 1) A bug fix for the observed crash. I had failed to record the failed remat value as live which resulted in an instruction being deleted which still had uses. With the machine verifier, this is caught quickly. Without it, we fail in StackSlotColoring due to an empty live interval from LiveStack. 2) A test case which demonstrates the fix for (1). See @test11. 3) A control flag which defaults to disabling this for the moment. Once I've run more extensive validaton, I will switch the default and then remove this flag. llvm-svn: 353871
* [AMDGPU] Require at least protected visibility for certain symbolsScott Linder2019-02-123-0/+95
| | | | | | | | | This allows the global visibility controls to be restrictive while still populating the dynamic symbol table where required. Differential Revision: https://reviews.llvm.org/D56871 llvm-svn: 353870
* [lldb-instr] Pass PCHContainerOperations to ClangToolJonas Devlieghere2019-02-122-1/+8
| | | | | | | | | | | | On a local modules build this would cause an error. > fatal error: no handler registered for module format 'obj' > LLVM ERROR: unknown module format Interestingly enough, this didn't trigger on the GreenDragon CMake bot, which is configured with modules. llvm-svn: 353869
* [lldb] [unittest] Avoid mixing '127.0.0.1' and 'localhost'Michal Gorny2019-02-122-3/+3
| | | | | | | | | | | | | | | | | | | Fix the tests not to use '127.0.0.1' and 'localhost' interchangeably. More specifically, since tests bind specifically to 127.0.0.1, connect to that address as well; using 'localhost' can resolve to IPv6 address which can cause issues -- for example, if the matching port happens to be used by some other process, the tests hang forever waiting for the client to connect. While technically the case of randomly selected IPv4 port being taken on IPv6 loopback is not very likely, NetBSD happens to be suffering from some weird kernel issue where connection to that port succeeds nevertheless. Until we can really figure out what goes wrong there, this saves us from the tests hanging randomly. Differential Revision: https://reviews.llvm.org/D58131 llvm-svn: 353868
* [SystemZ] Use VGM whenever possible to load FP immediates.Jonas Paulsson2019-02-125-3/+122
| | | | | | | | | | | | | isFPImmLegal() has been extended to recognize certain FP immediates that can be built with VGM (Vector Generate Mask). These scalar FP immediates (that were previously loaded from the constant pool) are now selected as VGMF/VGMG in Select(). Review: Ulrich Weigand https://reviews.llvm.org/D58003 llvm-svn: 353867
* [PPC64] Update tests to reflect change in printing of call operand. [NFC]Sean Fertile2019-02-128-14/+13
| | | | | | | The printing of branch operands for call instructions was changed to properly handle negative offsets. Updating the tests to reflect that. llvm-svn: 353866
* [PowerPC] Fix printing of negative offsets in call instruction dissasembly.Sean Fertile2019-02-125-2/+60
| | | | llvm-svn: 353865
* [GlobalISel][NFC] Gardening: Make translateSimpleUnaryIntrinsic generalJessica Paquette2019-02-122-32/+24
| | | | | | | | | | | | | | Instead of only having this code work for unary intrinsics, have it work for an arbitrary number of parameters. Factor out the cases that fall under this (fma, pow). This makes it a bit easier to add more intrinsics which don't require any special work. Differential Revision: https://reviews.llvm.org/D58079 llvm-svn: 353863
* [tablegen] Add locations to many PrintFatalError() callsDaniel Sanders2019-02-1213-80/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While working on the GISel Combiner, I noticed I was producing location-less error messages fairly often and set about fixing this. In the process, I noticed quite a few places elsewhere in TableGen that also neglected to include a relevant location. This patch adds locations to errors that relate to a specific record (or a field within it) and also have easy access to the relevant location. This is particularly useful when multiclasses are involved as many of these errors refer to the full name of a record and it's difficult to guess which substring is grep-able. Unfortunately, tablegen currently only supports Record granularity so it's not currently possible to point at a specific Init so these sometimes point at the record that caused the error rather than the precise origin of the error. Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, nhaehnle Reviewed By: nhaehnle Subscribers: jdoerfert, nhaehnle, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58077 llvm-svn: 353862
* [GlobalISel][AArch64] Select llvm.bswap* for non-vector typesJessica Paquette2019-02-124-1/+58
| | | | | | | | | | | | | | | | This teaches the IRTranslator to emit G_BSWAP when it runs into Intrinsic::bswap. This allows us to select G_BSWAP for non-vector types in AArch64. Add a select-bswap.mir test, and add global isel checks to a couple existing tests in test/CodeGen/AArch64. This doesn't handle every bswap case, since some of these rely on known bits stuff. This just lets us handle the naive case. Differential Revision: https://reviews.llvm.org/D58081 llvm-svn: 353861
* [X86][AVX] Enable shuffle combining support for zero_extend Simon Pilgrim2019-02-122-11/+28
| | | | | | A more limited version of rL352997 that had to be disabled in rL353198 - allow extension of any 128/256/512 bit vector that at least uses byte sized scalars. llvm-svn: 353860
* [DAGCombiner] convert logic-of-setcc into bit magic (PR40611)Sanjay Patel2019-02-123-18/+40
| | | | | | | | | | | | | | | | | | | | If we're comparing some value for equality against 2 constants and those constants have an absolute difference of just 1 bit, then we can offset and mask off that 1 bit and reduce to a single compare against zero: and/or (setcc X, C0, ne), (setcc X, C1, ne/eq) --> setcc ((add X, -C1), ~(C0 - C1)), 0, ne/eq https://rise4fun.com/Alive/XslKj This transform is disabled by default using a TLI hook ("convertSetCCLogicToBitwiseLogic()"). That should be overridden for AArch64, MIPS, Sparc and possibly others based on the asm shown in: https://bugs.llvm.org/show_bug.cgi?id=40611 llvm-svn: 353859
* [OpenMP] Fix broken link to browse sourcesJonathan Peyton2019-02-121-1/+1
| | | | llvm-svn: 353858
* [clangd] Fix a lit-test.Kadir Cetinkaya2019-02-121-1/+1
| | | | | | | | | | | | | | | | | | Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=40593. Non-percent-encoded chars doesn't cause any problems on the input-side since we assume everything after authority section is data and don't interpret them as delimeters. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58126 llvm-svn: 353857
* Fix Xcode project for RemoteAwarePlatform files.Greg Clayton2019-02-121-7/+10
| | | | llvm-svn: 353856
* [x86] add negative tests for setcc folds; NFCSanjay Patel2019-02-121-0/+70
| | | | llvm-svn: 353855
* [SelectionDAG] Fix return calling convention in expansion of ?MULOwhitequark2019-02-122-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The SMULO/UMULO DAG nodes, when not directly supported by the target, expand to a multiplication twice as wide. In case that the resulting type is not legal, the legalizer cannot directly call the intrinsic with the wide arguments; instead, it "pre-lowers" them by splitting them in halves. rL283203 made sure that on big endian targets, the legalizer passes the argument halves in the correct order. It did not do the same for the return value halves because the existing code used a hack; it put an illegal type into DAG and hoped that nothing would break and it would be correctly lowered elsewhere. rL307207 fixed this, handling return value halves similar to how argument handles are handled, but did not take big-endian targets into account. This commit fixes the expansion on big-endian targets, such as the out-of-tree OR1K target. Reviewers: eli.friedman, vadimcn Subscribers: george-hopkins, efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D45355 llvm-svn: 353854
* [CMake][Fuchsia] Pass -ldl -lpthread LDFLAGS to second stagePetr Hosek2019-02-121-0/+6
| | | | | | | We're using static libc++ for the second stage which requires explicitly linking -ldl and -lpthread. llvm-svn: 353853
* [MCA] Improved debug prints. NFCAndrea Di Biagio2019-02-123-18/+25
| | | | llvm-svn: 353852
* [PowerPC] Regenerate testSimon Pilgrim2019-02-121-153/+170
| | | | llvm-svn: 353851
* [libc++] Avoid UB in the no-exceptions mode in a few placesLouis Dionne2019-02-1214-50/+301
| | | | | | | | | | | | | | | | | | | | | | | Summary: A few places in the library seem to behave unexpectedly when the library is compiled or used with exceptions disabled. For example, not throwing an exception when a pointer is NULL can lead us to dereference the pointer later on, which is UB. This patch fixes such occurences. It's hard to tell whether there are other places where the no-exceptions mode misbehaves like this, because the replacement for throwing an exception does not always seem to be abort()ing, but at least this patch will improve the situation somewhat. See http://lists.llvm.org/pipermail/libcxx-dev/2019-January/000172.html Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D57761 llvm-svn: 353850
* [PPC64] Sort .toc sections accessed with small code model relocs.Sean Fertile2019-02-125-20/+27
| | | | | | | | | | | | | A follow up to the intial patch that unblocked linking against libgcc. For lld we don't need to bother tracking which objects have got based small code model relocations. This is due to the fact that the compilers on powerpc64 use the .toc section to generate indirections to symbols (rather then using got relocations) which keeps the got small. This makes overflowing a small code model got relocation very unlikely. Differential Revision: https://reviews.llvm.org/D57245 llvm-svn: 353849
* AMDGPU/GlobalISel: Add more insert/extract testcasesMatt Arsenault2019-02-122-115/+918
| | | | llvm-svn: 353848
* [Codegen] Make sure kill flags are not incorrect from removed machine phi'sDavid Green2019-02-122-3/+42
| | | | | | | | | We need to clear the kill flags on both SingleValReg and OldReg, to ensure they remain conservatively correct. Differential Revision: https://reviews.llvm.org/D58114 llvm-svn: 353847
* [llvm-dwp] Abort when dwo_id is unsetJordan Rupprecht2019-02-125-5/+13
| | | | | | | | | | | | | | | | | | | Summary: An empty dwo_id indicates a degenerate .dwo file that should not have been generated in the first place. Instead of discovering this error later when merging with another degenerate .dwo file, print an error immediately when noticing an unset dwo_id, including the filename of the offending file. Test case created by compiling a trivial file w/ `-fno-split-dwarf-inlining -gmlt -gsplit-dwarf -c` prior to r353771 Reviewers: dblaikie Reviewed By: dblaikie Subscribers: jdoerfert, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58085 llvm-svn: 353846
* AMDGPU/GlobalISel: Only make f16 constants legal on f16 targetsMatt Arsenault2019-02-122-14/+32
| | | | | | We could deal with it, but there's no real point. llvm-svn: 353845
* GlobalISel: Use default rounding mode when extending fconstantMatt Arsenault2019-02-121-3/+8
| | | | | | | I don't think this matters since the values should all be exactly representable. llvm-svn: 353844
* GlobalISel: Move some more legalize cases into functionsMatt Arsenault2019-02-122-165/+196
| | | | llvm-svn: 353843
* [LoopSimplifyCFG] Fix test broken in release mode in r353813Sam McCall2019-02-121-0/+1
| | | | llvm-svn: 353842
* Have Stream::PutCStringAsRawHex8 take llvm::StringRefPavel Labath2019-02-129-52/+50
| | | | | | | | | This enables the function to be called with a StringRef without jumping through any hoops. I rename the function to "PutStringAsRawHex8" to honor the extended interface. I also remove ".c_str()" from any calls to this function I could find. llvm-svn: 353841
* [Sema] Fix a crash in access checking for deduction guidesIlya Biryukov2019-02-122-1/+16
| | | | | | | | | | | | | | | | Summary: See the added test for a repro. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58111 llvm-svn: 353840
* Renaming yet another diagnostic to not conflict; NFC.Aaron Ballman2019-02-122-2/+3
| | | | llvm-svn: 353839
* Renaming this diagnostic to not conflict with another; NFC.Aaron Ballman2019-02-122-2/+2
| | | | | | Amends r353837 which renamed the diagnostics to conflict. llvm-svn: 353838
* Fixing a typo; NFC.Aaron Ballman2019-02-122-4/+4
| | | | llvm-svn: 353837
* Disable test after r353718, r353725, r353729 while I investigateNico Weber2019-02-121-13/+17
| | | | llvm-svn: 353836
* [NFC] Simplify code & reduce nest slightlyMax Kazantsev2019-02-121-33/+35
| | | | llvm-svn: 353832
* [DebugInfo] Don't salvage load operations (PR40628).Jeremy Morse2019-02-125-19/+69
| | | | | | | | | | | | | | | | | | | | | | | | Salvaging a redundant load instruction into a debug expression hides a memory read from optimisation passes. Passes that alter memory behaviour (such as LICM promoting memory to a register) aren't aware of these debug memory reads and leave them unaltered, making the debug variable location point somewhere unsafe. Teaching passes to know about these debug memory reads would be challenging and probably incomplete. Finding dbg.value instructions that need to be fixed would likely be computationally expensive too, as more analysis would be required. It's better to not generate debug-memory-reads instead, alas. Changed tests: * DeadStoreElim: test for salvaging of intermediate operations contributing to the dead store, instead of salvaging of the redundant load, * GVN: remove debuginfo behaviour checks completely, this behaviour is still covered by other tests, * InstCombine: don't test for salvaged loads, we're removing that behaviour. Differential Revision: https://reviews.llvm.org/D57962 llvm-svn: 353824
* [DebugInfo] Keep parameter DBG_VALUEs before prologue codeDavid Stenberg2019-02-123-1/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a preparatory change for removing the code from DebugHandlerBase::beginFunction() which changes the starting label for the first non-overlapping DBG_VALUEs of parameters to the beginning of the function. It does that to be able to show parameters when entering a function. However, that code does not consider what defines the values, which can result in the ranges for the debug values starting before their defining instructions. That code is removed in a follow-up patch. When prologue code is inserted, it leads to DBG_VALUEs that start directly in the entry block being moved down after the prologue instructions. This patch fixes that by stashing away DBG_VALUEs for parameters before emitting the prologue, and then reinserts them at the start of the block. This assumes that there is no target that somehow clobbers parameter registers in the frame setup; there is no such case in the lit tests at least. See PR40188 for more information. Reviewers: aprantl, dblaikie, rnk, jmorse Reviewed By: aprantl Subscribers: bjope, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D57510 llvm-svn: 353823
* [clangd] Fix use-after-free in XRefsSam McCall2019-02-121-8/+8
| | | | llvm-svn: 353821
OpenPOWER on IntegriCloud