1. Aug 15, 2018
    • Derek Schuff's avatar
      [WebAssembly] SIMD Splats · 4ec8bca1
      Derek Schuff authored
      Implement and test SIMD splat ops.
      
      Patch by Thomas Lively
      
      Differential Revision: https://reviews.llvm.org/D50741
      
      llvm-svn: 339744
      4ec8bca1
    • Louis Dionne's avatar
      [libcxx] Fix XFAILs for aligned allocation tests on older OSX versions · 7c6baa21
      Louis Dionne authored
      Summary:
      Since r338934, Clang emits an error when aligned allocation functions are
      used in conjunction with a system libc++ dylib that does not support those
      functions. This causes some tests to fail when testing against older libc++
      dylibs. This commit marks those tests as UNSUPPORTED, and also documents the
      various reasons for the tests being unsupported.
      
      Reviewers: vsapsai, EricWF
      
      Subscribers: christof, dexonsmith, cfe-commits, mclow.lists, EricWF
      
      Differential Revision: https://reviews.llvm.org/D50341
      
      llvm-svn: 339743
      7c6baa21
    • Louis Dionne's avatar
      [libc++] Disable failing C11 feature tests for <cfloat> and <float.h> · feb0427c
      Louis Dionne authored
      Summary:
      Those tests are breaking the test bots. A Bugzilla has been filed to
      make sure those tests are re-enabled: https://bugs.llvm.org/show_bug.cgi?id=38572
      
      Reviewers: mclow.lists, EricWF
      
      Subscribers: krytarowski, christof, dexonsmith, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50748
      
      llvm-svn: 339742
      feb0427c
    • Louis Dionne's avatar
      [libc++] Detect C11 features on non-Clang compilers · 894ffdd8
      Louis Dionne authored
      Summary:
      The macros were inside `#if defined(_LIBCPP_COMPILER_CLANG)`, which means
      we would never detect C11 features on non-Clang compilers. According to
      Marshall Clow, this is not the intended behavior.
      
      Reviewers: mclow.lists, EricWF
      
      Subscribers: krytarowski, christof, dexonsmith, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50748
      
      llvm-svn: 339741
      894ffdd8
    • Chandler Carruth's avatar
      [SDAG] Remove the reliance on MI's allocation strategy for · 66654b72
      Chandler Carruth authored
      `MachineMemOperand` pointers attached to `MachineSDNodes` and instead
      have the `SelectionDAG` fully manage the memory for this array.
      
      Prior to this change, the memory management was deeply confusing here --
      The way the MI was built relied on the `SelectionDAG` allocating memory
      for these arrays of pointers using the `MachineFunction`'s allocator so
      that the raw pointer to the array could be blindly copied into an
      eventual `MachineInstr`. This creates a hard coupling between how
      `MachineInstr`s allocate their array of `MachineMemOperand` pointers and
      how the `MachineSDNode` does.
      
      This change is motivated in large part by a change I am making to how
      `MachineFunction` allocates these pointers, but it seems like a layering
      improvement as well.
      
      This would run the risk of increasing allocations overall, but I've
      implemented an optimization that should avoid that by storing a single
      `MachineMemOperand` pointer directly instead of allocating anything.
      This is expected to be a net win because the vast majority of uses of
      these only need a single pointer.
      
      As a side-effect, this makes the API for updating a `MachineSDNode` and
      a `MachineInstr` reasonably different which seems nice to avoid
      unexpected coupling of these two layers. We can map between them, but we
      shouldn't be *surprised* at where that occurs. =]
      
      Differential Revision: https://reviews.llvm.org/D50680
      
      llvm-svn: 339740
      66654b72
    • Alex Lorenz's avatar
      44fdf2da
    • Alex Lorenz's avatar
      [clangd] add an extension field to LSP to transfer the diagnostic's category · 37146431
      Alex Lorenz authored
      This patch adds a 'category' extension field to the LSP diagnostic that's sent
      by Clangd. This extension is always on by default.
      
      Differential Revision: https://reviews.llvm.org/D50571
      
      llvm-svn: 339738
      37146431
    • Alex Lorenz's avatar
      [clangd] add missing test from r339454 · 3738dba6
      Alex Lorenz authored
      I forgot to checkin the test for the fixits into SVN.
      
      llvm-svn: 339737
      3738dba6
    • Heejin Ahn's avatar
      [WebAssembly] Delete a specific push number from test expectations · 283e1c11
      Heejin Ahn authored
      Summary:
      This shouldn't have been a specific number but rather a regex. This was
      a part of rL339474 which got reverted.
      
      Reviewers: aardappel
      
      Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50728
      
      llvm-svn: 339736
      283e1c11
    • Cameron McInally's avatar
      [FPEnv] Scalarize StrictFP vector operations · 00b0658a
      Cameron McInally authored
      Add a helper function to scalarize constrained FP operations as needed.
      
      Differential Revision: https://reviews.llvm.org/D50720
      
      llvm-svn: 339735
      00b0658a
    • Eli Friedman's avatar
      [ARM] Make PerformSHLSimplify add nodes to the DAG worklist correctly. · 0d12e90b
      Eli Friedman authored
      Intentionally excluding nodes from the DAGCombine worklist is likely to
      lead to weird optimizations and infinite loops, so it's generally a bad
      idea.
      
      To avoid the infinite loops, fix DAGCombine to use the
      isDesirableToCommuteWithShift target hook before performing the
      transforms in question, and implement the target hook in the ARM backend
      disable the transforms in question.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=38530 . (I don't have a
      reduced testcase for that bug. But we should have sufficient test
      coverage for PerformSHLSimplify given that we're not playing weird
      tricks with the worklist. I can try to bugpoint it if necessary,
      though.)
      
      Differential Revision: https://reviews.llvm.org/D50667
      
      llvm-svn: 339734
      0d12e90b
    • Matt Morehouse's avatar
      [SanitizerCoverage] Add associated metadata to PC guards. · 0f22fac2
      Matt Morehouse authored
      Summary:
      Without this metadata LLD strips unused PC table entries
      but won't strip unused guards.  This metadata also seems
      to influence the linker to change the ordering in the PC
      guard section to match that of the PC table section.
      
      The libFuzzer runtime library depends on the ordering
      of the PC table and PC guard sections being the same.  This
      is not generally guaranteed, so we may need to redesign
      PC tables/guards/counters in the future.
      
      Reviewers: eugenis
      
      Reviewed By: eugenis
      
      Subscribers: kcc, hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50483
      
      llvm-svn: 339733
      0f22fac2
    • Vlad Tsyrklevich's avatar
      SafeStack: Disable Darwin support · cd4056c8
      Vlad Tsyrklevich authored
      SafeStack support for Darwin has not been functional and was disabled in
      r339719/r339720. Disable Darwin for the safestack debuginfo test.
      
      llvm-svn: 339732
      cd4056c8
    • Stephen Kelly's avatar
      Remove obsolete comment · cb5b4337
      Stephen Kelly authored
      This related to the code as first checked in in r266292 ([ASTImporter]
      Implement some expression-related AST node import., 2016-04-14).
      
      llvm-svn: 339731
      cb5b4337
    • Stephen Kelly's avatar
      Fix Stmt::ignoreImplicit · 0945c8b9
      Stephen Kelly authored
      Summary:
      A CXXBindTemporaryExpr can appear inside an ImplicitCastExpr, and was
      not ignored previously.
      
      Fixes the case reported in PR37327.
      
      Reviewers: rsmith, dblaikie, klimek
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50666
      
      llvm-svn: 339730
      0945c8b9
    • Stephen Kelly's avatar
      Remove vestiges of configure buildsystem · 1f656008
      Stephen Kelly authored
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50528
      
      llvm-svn: 339729
      1f656008
    • Reid Kleckner's avatar
      Fix lit fatal errors about requiring a USE_Z3_SOLVER param · b8c29d53
      Reid Kleckner authored
      llvm-svn: 339728
      b8c29d53
    • Artem Dergachev's avatar
      [CFG] [analyzer] Find argument constructors in CXXTemporaryObjectExprs. · c531d549
      Artem Dergachev authored
      CXXTemporaryObjectExpr is a sub-class of CXXConstructExpr. If it has arguments
      that are structures passed by value, their respective constructors need to be
      handled by providing a ConstructionContext, like for regular function calls and
      for regular constructors.
      
      Differential Revision: https://reviews.llvm.org/D50487
      
      llvm-svn: 339727
      c531d549
    • Artem Dergachev's avatar
      [analyzer] Add a test forgotten in r339088. · bf33a2cd
      Artem Dergachev authored
      Differential Revision: https://reviews.llvm.org/D50363
      
      llvm-svn: 339726
      bf33a2cd
    • Alina Sbirlea's avatar
      Add proper headers in CFGUpdate.h and add CFGDiff.h in the list of delayed... · 24a74835
      Alina Sbirlea authored
      Add proper headers in CFGUpdate.h and add CFGDiff.h in the list of delayed headers for LLVM_intrinsic_gen.
      
      Summary:
      Fix module build after r339694.
      Add headers needed in CFGUpdate.h.
      Add CFGDiff.h in the list of delayed headers for LLVM_intrinsic_gen.
      Up for post-commit review.
      
      Subscribers: sanjoy, jlebar, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50734
      
      llvm-svn: 339724
      24a74835
    • Vlad Tsyrklevich's avatar
      Reland "SafeStack: Delay thread stack clean-up"" · 05ee22e3
      Vlad Tsyrklevich authored
      This relands commit r339405 (reverted in commit r339408.) The original
      revert was due to tests failing on a darwin buildbot; however, after
      looking at the affected code more I realized that the Darwin safestack
      support has always been broken and disabled it in r339719. This relands
      the original commit.
      
      llvm-svn: 339723
      05ee22e3
    • Anna Thomas's avatar
      NFC: Clarify comment in loop vectorization legality · 6a1dd77f
      Anna Thomas authored
      Clarifying the comment about PSCEV and external IV users by referencing
      the bug in question.
      
      llvm-svn: 339722
      6a1dd77f
    • Craig Topper's avatar
      [InlineAsm] Update the min-legal-vector-width function attribute based on... · 2a87314e
      Craig Topper authored
      [InlineAsm] Update the min-legal-vector-width function attribute based on inputs and outputs to inline assembly
      
      Summary:
      Another piece of my ongoing to work for prefer-vector-width.
      
      min-legal-vector-width will eventually be used by the X86 backend to know whether it needs to make 512 bits type legal when prefer-vector-width=256. If the user used inline assembly that passed in/out a 512-bit register, we need to make sure 512 bits are considered legal. Otherwise we'll get an assert failure when we try to wire up the inline assembly to the rest of the code.
      
      This patch just checks the LLVM IR types to see if they are vectors and then updates the attribute based on their total width. I'm not sure if this is the best way to do this or if there's any subtlety I might have missed. So if anyone has other opinions on how to do this I'm open to suggestions.
      
      Reviewers: chandlerc, rsmith, rnk
      
      Reviewed By: rnk
      
      Subscribers: eraman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50678
      
      llvm-svn: 339721
      2a87314e
    • Vlad Tsyrklevich's avatar
      SafeStack: Disable Darwin support · 97e6819e
      Vlad Tsyrklevich authored
      Summary:
      Darwin support does not appear to be used as evidenced by the fact that
      the runtime has never supported non-trivial programs.
      
      Reviewers: pcc, kubamracek
      
      Reviewed By: pcc
      
      Subscribers: cfe-commits, kcc
      
      Differential Revision: https://reviews.llvm.org/D50724
      
      llvm-svn: 339720
      97e6819e
    • Vlad Tsyrklevich's avatar
      SafeStack: Disable Darwin support · a6446223
      Vlad Tsyrklevich authored
      Summary:
      Darwin support does not appear to be used as evidenced by the fact that
      the pthread interceptors have never worked and there is no support for
      other common threading mechanisms like GCD.
      
      Reviewers: pcc, eugenis, kubamracek
      
      Reviewed By: pcc, kubamracek
      
      Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers, kcc
      
      Differential Revision: https://reviews.llvm.org/D50718
      
      llvm-svn: 339719
      a6446223
    • Stefan Granitz's avatar
      Remove asseration from ConstString::GetConstCStringAndSetMangledCounterPart()... · 4aaa72f9
      Stefan Granitz authored
      Remove asseration from ConstString::GetConstCStringAndSetMangledCounterPart() to fix more tests first
      
      llvm-svn: 339716
      4aaa72f9
    • Raphael Isemann's avatar
      Stability improvements for CompletionTest · ffa7010b
      Raphael Isemann authored
      Summary:
      CompletionTest.DirCompletionAbsolute had a random failure on a CI node
      (in the failure, the completion count was 0, while we expected it to be 1),
      but there seems no good reason for it to fail. The sanitizers don't complain
      about the test when it's run, so I think we don't have some uninitialized
      memory that we access here.
      
      My best bet is that the unique directory selection randomly failed on the CI
      node because maybe the FS there doesn't actually guarantee the atomic fopen
      assumptions we make in the LLVM code (or some other funny race condition).
      In this case a different test run could get the same directory and clean its contents
      which would lead to 0 results.
      
      The other possible explanation is that someone changed the CI configuration
      on the node and changed the working dir to something very long, which would
      make our PATH_MAX test fail (which also leads to 0 results), but I think that case
      is unlikely.
      
      This patch is just a stab in the dark that (hopefully) fixes this random failure by
      giving each test a (more) unique working directory by appending the unique
      test name to the temp-dir prefix. Also adds one more ASSERT_NO_ERROR to
      one of our chdir calls just in case that is the reason for failing.
      
      The good thing is that this refactor gets rid of most of the static variables
      and files that we previously had as shared state between the different tests.
      
      Potentially fixes rdar://problem/43150260
      
      Reviewers: aprantl
      
      Reviewed By: aprantl
      
      Subscribers: jfb, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D50722
      
      llvm-svn: 339715
      ffa7010b
    • Adrian Prantl's avatar
      [DebugInfoMetadata] Added DIFlags interface in DIBasicType. · 55f42629
      Adrian Prantl authored
      Flags in DIBasicType will be used to pass attributes used in
      DW_TAG_base_type, such as DW_AT_endianity.
      
      Patch by Chirag Patel!
      
      Differential Revision: https://reviews.llvm.org/D49610
      
      llvm-svn: 339714
      55f42629
    • Sanjay Patel's avatar
      [InstCombine] fix typos in tests; NFC · b1546da0
      Sanjay Patel authored
      See D50036.
      
      llvm-svn: 339713
      b1546da0
    • Heejin Ahn's avatar
      [WebAssembly] SIMD encoding tests · c15a8784
      Heejin Ahn authored
      Modifies existing SIMD tests to also check that SIMD instructions are
      lowered to the expected bytes. This CL depends on D50597.
      
      Reviewers: aheejin
      
      Subscribers: sunfish, jgravelle-google, sbc100, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50660
      
      Patch by Thomas Lively (tlively)
      
      llvm-svn: 339712
      c15a8784
    • Sanjay Patel's avatar
      [InstCombine] add tests for pow->sqrt; NFC · 73b7e9f6
      Sanjay Patel authored
      D50036 should fix the missed optimizations.
      
      llvm-svn: 339711
      73b7e9f6
    • Heejin Ahn's avatar
      [WebAssembly] Fix encoding of non-SIMD vector-typed instructions · c9c711a0
      Heejin Ahn authored
      Previously SIMD_I was the same as a normal instruction except for the
      addition of a HasSIM128 predicate. However, rL339186 changed the
      encoding of SIMD_I instructions to automatically contain the SIMD
      prefix byte. This broke the encoding of non-SIMD vector-typed
      instructions, which had instantiated SIMD_I. This CL corrects this
      error.
      
      Reviewers: aheejin
      
      Subscribers: sunfish, jgravelle-google, sbc100, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50682
      
      Patch by Thomas Lively (tlively)
      
      llvm-svn: 339710
      c9c711a0
    • George Karpenkov's avatar
    • Zachary Turner's avatar
      [MS Demangler] Fix some minor formatting bugs. · 2bbb23ba
      Zachary Turner authored
      1) We print __restrict twice on member pointers.  This is fixed
         and relevant tests are re-enabled.
      
      2) Several tests were disabled because of printing slightly
         different output than undname.  These were confirmed to be
         bugs in undname, so we just re-enable the tests.
      
      3) The test for printing reference temporaries is re-enabled.  This
         is a clang mangling extension, so we have some flexibility with
         how we demangle it.  The output currently looks fine, so we just
         re-enable the test with no fixes.
      
      llvm-svn: 339708
      2bbb23ba
    • Heejin Ahn's avatar
      [WebAssembly] SIMD extract_lane · a0fd9c3e
      Heejin Ahn authored
      Implement instruction selection for all versions of the extract_lane
      instruction. Use explicit sext/zext to differentiate between
      extract_lane_s and extract_lane_u for applicable types, otherwise
      default to extract_lane_u.
      
      Reviewers: aheejin
      
      Subscribers: sunfish, jgravelle-google, sbc100, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50597
      
      Patch by Thomas Lively (tlively)
      
      llvm-svn: 339707
      a0fd9c3e
    • Andrea Di Biagio's avatar
      [Tablegen][MCInstPredicate] Removed redundant template argument from class... · 9eaf5aa0
      Andrea Di Biagio authored
      [Tablegen][MCInstPredicate] Removed redundant template argument from class TIIPredicate, and implemented verification rules for TIIPredicates.
      
      This patch removes redundant template argument `TargetName` from TIIPredicate.
      Tablegen can always infer the target name from the context. So we don't need to
      force users of TIIPredicate to always specify it.
      
      This allows us to better modularize the tablegen class hierarchy for the
      so-called "function predicates". class FunctionPredicateBase has been added; it
      is currently used as a building block for TIIPredicates. However, I plan to
      reuse that class to model other function predicate classes too (i.e. not just
      TIIPredicates). For example, this can be a first step towards implementing
      proper support for dependency breaking instructions in tablegen.
      
      This patch also adds a verification step on TIIPredicates in tablegen.
      We cannot have multiple TIIPredicates with the same name. Otherwise, this will
      cause build errors later on, when tablegen'd .inc files are included by cpp
      files and then compiled.
      
      Differential Revision: https://reviews.llvm.org/D50708
      
      llvm-svn: 339706
      9eaf5aa0
    • Kostya Kortchinsky's avatar
      [scudo] Fix race condition in deallocation path when Quarantine is bypassed · 3afc797e
      Kostya Kortchinsky authored
      Summary:
      There is a race window in the deallocation path when the Quarantine is bypassed.
      Initially we would just erase the header of a chunk if we were not to use the
      Quarantine, as opposed to using a compare-exchange primitive, to make things
      faster.
      
      It turned out to be a poor decision, as 2 threads (or more) could simultaneously
      deallocate the same pointer, and if the checks were to done before the header
      got erased, this would result in the pointer being added twice (or more) to
      distinct thread caches, and eventually be reused.
      
      Winning the race is not trivial but can happen with enough control over the
      allocation primitives. The repro added attempts to trigger the bug, with a
      moderate success rate, but it should be enough to notice if the bug ever make
      its way back into the code.
      
      Since I am changing things in this file, there are 2 smaller changes tagging
      along, marking a variable `const`, and improving the Quarantine bypass test at
      runtime.
      
      Reviewers: alekseyshl, eugenis, kcc, vitalybuka
      
      Reviewed By: eugenis, vitalybuka
      
      Subscribers: delcypher, #sanitizers, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50655
      
      llvm-svn: 339705
      3afc797e
    • Alexey Bataev's avatar
      [OPENMP] Fix processing of declare target construct. · 97b72212
      Alexey Bataev authored
      The attribute marked as inheritable since OpenMP 5.0 supports it +
      additional fixes to support new functionality.
      
      llvm-svn: 339704
      97b72212
    • Anna Thomas's avatar
      [LV] Teach about non header phis that have uses outside the loop · 60a1e4dd
      Anna Thomas authored
      Summary:
      This patch teaches the loop vectorizer to vectorize loops with non
      header phis that have have outside uses.  This is because the iteration
      dependence distance for these phis can be widened upto VF (similar to
      how we do for induction/reduction) if they do not have a cyclic
      dependence with header phis. When identifying reduction/induction/first
      order recurrence header phis, we already identify if there are any cyclic
      dependencies that prevents vectorization.
      
      The vectorizer is taught to extract the last element from the vectorized
      phi and update the scalar loop exit block phi to contain this extracted
      element from the vector loop.
      
      This patch can be extended to vectorize loops where instructions other
      than phis have outside uses.
      
      Reviewers: Ayal, mkuper, mssimpso, efriedma
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50579
      
      llvm-svn: 339703
      60a1e4dd
    • Louis Dionne's avatar
      [libc++] Fix incorrect definition of TEST_HAS_C11_FEATURES · 6513f375
      Louis Dionne authored
      Summary:
      The macro was not defined in C++11 mode when it should have been, at least
      according to how _LIBCPP_HAS_C11_FEATURES is defined.
      
      Reviewers: mclow.lists, EricWF, jfb, dexonsmith
      
      Subscribers: christof, dexonsmith, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D50719
      
      llvm-svn: 339702
      6513f375