summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make internal/private GVs implicitly dso_local.Rafael Espindola2018-01-1139-102/+122
| | | | | | | | | | | | | | | | While updating clang tests for having clang set dso_local I noticed that: - There are *a lot* of tests to update. - Many of the updates are redundant. They are redundant because a GV is "obviously dso_local". This patch starts formalizing that a bit by requiring that internal and private GVs be dso_local too. Since they all are, we don't have to print dso_local to the textual representation, making it a bit more compact and easier to read. llvm-svn: 322317
* Handle scoped_lockable objects being returned by value in C++17.Richard Smith2018-01-112-5/+77
| | | | | | | | | | | In C++17, guaranteed copy elision means that there isn't necessarily a constructor call when a local variable is initialized by a function call that returns a scoped_lockable by value. In order to model the effects of initializing a local variable with a function call returning a scoped_lockable, pretend that the move constructor was invoked within the caller at the point of return. llvm-svn: 322316
* Improve an error message.Rui Ueyama2018-01-112-2/+3
| | | | | | | | | | | | Before: $ ld.lld --plugin-opt=Os ld.lld: error: --plugin-opt: number expected, but got 's' After: $ ld.lld --plugin-opt=Os ld.lld: error: --plugin-opt=Os: number expected, but got 's' llvm-svn: 322315
* Tighten up DIFile verifier for checksumsPaul Robinson2018-01-113-5/+51
| | | | | | Differential Revision: https://reviews.llvm.org/D41965 llvm-svn: 322314
* PeepholeOptimizer: Do not form PHI with subreg argumentsMatthias Braun2018-01-112-22/+86
| | | | | | | | | | | | | | | | | | | | | When replacing a PHI the PeepholeOptimizer currently takes the register class of the register at the first operand. This however is not correct if this argument has a subregister index. As there is currently no API to query the register class resulting from applying a subregister index to all registers in a class, we can only abort in these cases and not perform the transformation. This changes findNextSource() to require the end of all copy chains to not use a subregister if there is any PHI in the chain. I had to rewrite the overly complicated inner loop there to have a good place to insert the new check. This fixes https://llvm.org/PR33071 (aka rdar://32262041) Differential Revision: https://reviews.llvm.org/D40758 llvm-svn: 322313
* [arm] Implement Target Operand Flag MIR serialization.Evgeniy Stepanov2018-01-113-2/+37
| | | | | | | | | | Reviewers: efriedma, pcc Subscribers: aemerson, javed.absar, kristof.beyls, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D39975 llvm-svn: 322312
* [Sink] Really really fix predicate in legality checkFiona Glaser2018-01-112-3/+11
| | | | | | | | | | | LoadInst isn't enough; we need to include intrinsics that perform loads too. All side-effecting intrinsics and such are already covered by the isSafe check, so we just need to care about things that read from memory. D41960, originally from D33179. llvm-svn: 322311
* [clang-tidy] Adding Fuchsia checker for statically constructed objectsJulie Hockett2018-01-118-1/+240
| | | | | | | | | | | | Adds a check to the Fuchsia module to warn if statically-stored objects are created, unless constructed with `constexpr`. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D41546 llvm-svn: 322310
* [WebAssemlby] MC: Don't write COMDAT symbols as global importsSam Clegg2018-01-114-4/+45
| | | | | | | | This was causing undefined references at link time in lld. Differential Revision: https://reviews.llvm.org/D41959 llvm-svn: 322309
* [X86] Legalize 128/256 gathers/scatters on KNL by using widening rather than ↵Craig Topper2018-01-112-164/+120
| | | | | | | | sign extending the index. We can just widen the vectors with undef and zero extend the mask. llvm-svn: 322308
* [WebAssemly] Rename and improve formatting for ctor/dtor testSam Clegg2018-01-111-3/+8
| | | | llvm-svn: 322307
* Implement an _is_allocator type trait for use in deduction guides.Marshall Clow2018-01-112-0/+51
| | | | llvm-svn: 322306
* Use size_t to represent the size of a StringMapEntry length and alignment ↵Aaron Ballman2018-01-112-11/+49
| | | | | | | | rather than unsigned. Patch by Matt Davis. llvm-svn: 322305
* dag-combine: Transfer debug information when folding (zext (truncate x))Adrian Prantl2018-01-112-1/+50
| | | | | | | | | | | -> (zext (truncate x)) This patch adds debug info support to the dagcombine rule (zext (truncate x)) -> (zext (truncate x)). Differential Revision: https://reviews.llvm.org/D41924 llvm-svn: 322304
* [Hexagon] Fix building 64-bit vector from constant valuesKrzysztof Parzyszek2018-01-112-1/+9
| | | | | | The constants were aggregated in a reverse order. llvm-svn: 322303
* [Hexagon] Cast elements to correct type when creating constant vectorKrzysztof Parzyszek2018-01-112-1/+14
| | | | llvm-svn: 322301
* DAGCombine: Let truncates negate extension through extract-subvectorZvi Rackover2018-01-112-66/+37
| | | | | | | | | | | | | | | | | | | | | | Summary: Fold cases such as: (v8i8 truncate (v8i32 extract_subvector (v16i32 sext (v16i8 V), Idx))) -> (v8i8 extract_subvector (v16i8 V), Idx) This can be generalized to cases where the truncate and extend do not fully cancel each other out, but it may require querying the target about profitability. Reviewers: RKSimon, craig.topper, spatel, efriedma Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41927 llvm-svn: 322300
* [Hexagon] Impose limits on container sizes in HexagonGenInsertKrzysztof Parzyszek2018-01-111-3/+20
| | | | | | | With over 300k virtual registers, the size of the data exceeded 12GB. Impose limits on how much information is collected. llvm-svn: 322299
* [Hexagon] Use SetVector when queuing nodes to scan in selectVectorConstantsKrzysztof Parzyszek2018-01-111-3/+4
| | | | llvm-svn: 322298
* X86 Tests: Add zext cases in (trunc (subvector)) test. NFCZvi Rackover2018-01-111-0/+138
| | | | | | Cases were missing as observed in D41927 llvm-svn: 322297
* X86: Refactor type-splitting to target-legal size vector to a helper functionZvi Rackover2018-01-111-32/+58
| | | | | | | | | | | | | | Summary: This is a preparatory step for D41811: refactoring code for breaking vector operands of binary operation to legal-types. Reviewers: RKSimon, craig.topper, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41925 llvm-svn: 322296
* Fix some too-big local arrays. Thanks to dcdillon for the patch. Reviewed as ↵Marshall Clow2018-01-111-2/+2
| | | | | | D28217 llvm-svn: 322295
* [Driver][RISCV] Another Windows file separator fix for riscv32-toolchain.c testAlex Bradbury2018-01-111-2/+2
| | | | | | | I've checking the failure log, this _should_ be the last one. Sorry for not spotting this additional case first time round. llvm-svn: 322294
* Make std::experimental::filesystem::remove and remove_all return false or 0 ↵Ekaterina Vaartis2018-01-113-7/+38
| | | | | | | | if the file doesn't exist Differential Revision: https://reviews.llvm.org/D41830 llvm-svn: 322293
* [X86][SSE] Drop old insertps stack folding testSimon Pilgrim2018-01-111-14/+0
| | | | | | Broken test from old attempt for folding tables - we don't peek through extract_subvector spills at all (which is why it doesn't fold), and we already have foldMemoryOperandCustom to handle insertps immediate correction anyway. llvm-svn: 322292
* [AArch64] Remove Unsupported = 1 flag for the WriteAtomic WriteRes.Joel Jones2018-01-111-1/+1
| | | | | | | | | | | | | In practice, this patch has no effect on scheduling. There is no test case as there already exists a comprehensive test case for LSE Atomics. Patch by Stefan Teleman Differential Revision: https://reviews.llvm.org/D40694 llvm-svn: 322291
* [docs] Update Phabricator docs about setting repository for diffs uploaded ↵Ben Hamilton2018-01-111-5/+5
| | | | | | | | | | | | | | | | via web Summary: Docs are out of date now that we have separate repositories for LLVM, Clang, etc. Reviewers: asb Reviewed By: asb Differential Revision: https://reviews.llvm.org/D41919 llvm-svn: 322290
* [NFC] Abstract out source argument index in MemTransferInst.Daniel Neilson2018-01-111-4/+7
| | | | | | | | Summary: References to the source operand within class MemTransferInst are currently by a constant 1. Abstract this out into a named constant. llvm-svn: 322289
* [Driver][RISCV] Fix r322276 for Windows (path separator issue)Alex Bradbury2018-01-111-2/+2
| | | | | | | | We were seeing test failures of riscv32-toolchain.c on windows due to the \ path separator being used for the linker. Add {{/|\\\\}} pattern (made horrible due to escaping), just like introduced in r214931. llvm-svn: 322286
* [InstCombine] Apply the fix from r322284 for sin / cos -> tan tooBenjamin Kramer2018-01-112-17/+21
| | | | llvm-svn: 322285
* [InstCombine] For cos/sin -> tan copy attributes from cos instead of theBenjamin Kramer2018-01-112-14/+18
| | | | | | | | | | | parent function Ideally we should merge the attributes from the functions somehow, but this is obviously an improvement over taking random attributes from the caller which will trip up the verifier if they're nonsensical for an unary intrinsic call. llvm-svn: 322284
* [ValueTracking] recognize min/max-of-min/max with notted ops (PR35875)Sanjay Patel2018-01-113-404/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally planned as the fix for: https://bugs.llvm.org/show_bug.cgi?id=35834 ...but simpler transforms handled that case, so I implemented a lesser solution. It turns out we need to handle the case with 'not' ops too because the real code example that we are trying to solve: https://bugs.llvm.org/show_bug.cgi?id=35875 ...has extra uses of the intermediate values, so we can't rely on smaller canonicalizations to get us to the goal. As with rL321672, I've tried to show every possibility in the codegen tests because that's the simplest way to prove we're doing the right thing in the wide variety of permutations of this pattern. We can also show an InstCombine win because we added a fold for this case in: rL321998 / D41603 An Alive proof for one variant of the pattern to show that the InstCombine and codegen results are correct: https://rise4fun.com/Alive/vd1 Name: min3_nots %nx = xor i8 %x, -1 %ny = xor i8 %y, -1 %nz = xor i8 %z, -1 %cmpxz = icmp slt i8 %nx, %nz %minxz = select i1 %cmpxz, i8 %nx, i8 %nz %cmpyz = icmp slt i8 %ny, %nz %minyz = select i1 %cmpyz, i8 %ny, i8 %nz %cmpyx = icmp slt i8 %y, %x %r = select i1 %cmpyx, i8 %minxz, i8 %minyz => %cmpxyz = icmp slt i8 %minxz, %ny %r = select i1 %cmpxyz, i8 %minxz, i8 %ny Name: min3_nots_alt %nx = xor i8 %x, -1 %ny = xor i8 %y, -1 %nz = xor i8 %z, -1 %cmpxz = icmp slt i8 %nx, %nz %minxz = select i1 %cmpxz, i8 %nx, i8 %nz %cmpyz = icmp slt i8 %ny, %nz %minyz = select i1 %cmpyz, i8 %ny, i8 %nz %cmpyx = icmp slt i8 %y, %x %r = select i1 %cmpyx, i8 %minxz, i8 %minyz => %xz = icmp sgt i8 %x, %z %maxxz = select i1 %xz, i8 %x, i8 %z %xyz = icmp sgt i8 %maxxz, %y %maxxyz = select i1 %xyz, i8 %maxxz, i8 %y %r = xor i8 %maxxyz, -1 llvm-svn: 322283
* Fixed libomp static build broken by the commit rL322202.Andrey Churbanov2018-01-111-0/+2
| | | | | | | | Patch by simone <simone@cs.utah.edu>. Differential Revision: https://reviews.llvm.org/D41945 llvm-svn: 322282
* [InstCombine] add min3-with-nots test (PR35875); NFCSanjay Patel2018-01-111-0/+31
| | | | llvm-svn: 322281
* [FuzzMutate] Avoid using swifterror as a source operandIgor Laevsky2018-01-112-1/+35
| | | | | | Differential Revision: https://reviews.llvm.org/D41107 llvm-svn: 322280
* [X86][SSE] Add ISD::VECTOR_SHUFFLE to faux shuffle decodingSimon Pilgrim2018-01-118-449/+415
| | | | | | Primarily, this allows us to use the aggressive extraction mechanisms in combineExtractWithShuffle earlier and make use of UNDEF elements that may be lost during lowering. llvm-svn: 322279
* [OpenCL] Reorder the CLK_sRGBx/sRGBA defines, NFCSven van Haastregt2018-01-111-1/+1
| | | | | | | Swap them so that all channel order defines are ordered according to their values. llvm-svn: 322278
* [Driver][RISCV] Fix r322276 by adding missing dummy crtbegin.o files to test ↵Alex Bradbury2018-01-115-0/+0
| | | | | | | | | | input The dummy crtbegin.o files were left out in r322276 (as they were ignored by svn add of test/Driver/Inputs/multilib_riscv_linux_sdk) and are necessary for the driver test to work. llvm-svn: 322277
* [RISCV] Add the RISCV target and compiler driverAlex Bradbury2018-01-1129-1/+957
| | | | | | | | | As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differential Revision: https://reviews.llvm.org/D39963 llvm-svn: 322276
* [VectorLegalizer] Remove broken code in ExpandStore.Jonas Paulsson2018-01-111-28/+0
| | | | | | | | | | | | | | The code that is supposed to "Round odd types to the next pow of two" seems broken and as well completely unused (untested). It also seems that ExpandStore really shouldn't ever change the memory VT, which this in fact does. As a first step in fixing the broken handling of vector stores (of irregular types, e.g. an i1 vector), this code is removed. For discussion, see https://bugs.llvm.org/show_bug.cgi?id=35520. Review: Eli Friedman llvm-svn: 322275
* [clang-tidy] Fix google-readability-namespace-comments handling of C++17 ↵Alexander Kornienko2018-01-113-10/+77
| | | | | | | | | | | | | | | | | | | | | | | | | nested namespaces Summary: Fixes bug 34701 When we encounter a namespace find the location of the left bracket. Then if the text between the name and the left bracket contains a ':' then it's a C++17 nested namespace. Reviewers: #clang-tools-extra, alexfh, aaron.ballman Reviewed By: aaron.ballman Subscribers: curdeius, cfe-commits, krasimir, JonasToth, JDevlieghere, xazax.hun Tags: #clang-tools-extra Patch by Alexandru Octavian Buțiu! Differential Revision: https://reviews.llvm.org/D38284 llvm-svn: 322274
* Remove leftover empty foldersPavel Labath2018-01-110-0/+0
| | | | | | | These were created by moving stuff around with git. After committing the move back to svn, the folders holding the original files remained. llvm-svn: 322273
* X86: Fix LowerBUILD_VECTORAsVariablePermute for case Src is smaller than IndicesZvi Rackover2018-01-112-0/+185
| | | | | | | | | | | | | | | | | | Summary: As RKSimon suggested in pr35820, in the case that Src is smaller in bit-size than Indices, need to widen Src to avoid type mismatch. Fixes pr35820 Reviewers: RKSimon, craig.topper Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41865 llvm-svn: 322272
* Make the bundle folders in the find-app-in-bundle test non-emptyPavel Labath2018-01-112-0/+0
| | | | | | | git will not create empty folders, which makes this test fail if the repo is checked out with git. llvm-svn: 322271
* Check existence of each required component during construction of ↵Tatyana Krasnukha2018-01-112-166/+174
| | | | | | | | | | | | | | | | | | | | | | | LLVMCDisassembler. Summary: Actually, fix two issues: # remove repeat creation of reg_info, use m_reg_info_ap for createMCAsmInfo instead; # remove possibility to dereference nullptr during createMCAsmInfo invocation, that could lead to undefined behavior. Placed checking of a component right after its creation to simplify the code and avoid same issues later. Reviewers: zturner, clayborg, jingham, jasonmolenda, labath Reviewed By: clayborg, labath Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D41584 llvm-svn: 322270
* [RISCV] Reserve an emergency spill slot for the register scavenger when ↵Alex Bradbury2018-01-113-7/+114
| | | | | | | | | | | necessary Although the register scavenger can often find a spare register, an emergency spill slot is needed to guarantee success. Reserve this slot in cases where the function is known to have a large stack (meaning the scavenger may be needed when forming stack addresses). llvm-svn: 322269
* [Lex] Use WritableMemoryBuffer in ScratchBuffer.cppPavel Labath2018-01-111-4/+4
| | | | | | | | This avoids the need to const_cast the buffer contents to write to it. NFCI. llvm-svn: 322268
* Implementation of X86Operand::print.Andrew V. Tischenko2018-01-112-42/+87
| | | | | | Differential Revision: https://reviews.llvm.org/D41610 llvm-svn: 322267
* [Mips] Handle one byte unsupported relocationsStefan Maksimovic2018-01-112-0/+15
| | | | | | | | | Fail gracefully instead of crashing upon encountering this type of relocation. Differential revision: https://reviews.llvm.org/D41857 llvm-svn: 322266
* [AArch64][SVE] Asm: Negative tests for predicated ADD/SUB register constraintsSander de Smalen2018-01-112-1/+47
| | | | | | | | | | | | | | Summary: Patch [3/3] in a series to add operand constraint checks for SVE's predicated ADD/SUB. Reviewers: rengolin, mcrosier, evandro, fhahn, echristo Reviewed By: rengolin, fhahn Subscribers: aemerson, javed.absar, tschuett, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D41447 llvm-svn: 322265
OpenPOWER on IntegriCloud