1. Mar 06, 2018
    • Daniel Neilson's avatar
      [InstCombine] Don't blow up in foldICmpWithCastAndCast on vector icmp instructions. · bdda115e
      Daniel Neilson authored
      Summary:
      Presently, InstCombiner::foldICmpWithCastAndCast() implicitly assumes that it is
      only invoked with icmp instructions of integer type. If that assumption is broken,
      and it is called with an icmp of vector type, then it fails (asserts/crashes).
      
      This patch addresses the deficiency. It allows it to simplify
      icmp (ptrtoint x), (ptrtoint/c) of vector type into a compare of the inputs,
      much as is done when the type is integer.
      
      Reviewers: apilipenko, fedor.sergeev, mkazantsev, anna
      
      Reviewed By: anna
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D44063
      
      llvm-svn: 326730
      bdda115e
    • Craig Topper's avatar
      [InstCombine] Add constant vector support to getMinimumFPType for visitFPTrunc. · 8452face
      Craig Topper authored
      This patch teaches getMinimumFPType to support shrinking a vector of ConstantFPs. This should improve our ability to combine vector fptrunc with fp binops.
      
      Differential Revision: https://reviews.llvm.org/D43774
      
      llvm-svn: 326729
      8452face
    • Andrey Churbanov's avatar
      Fixed build of the OpenMP stubs library. · 75bc70fb
      Andrey Churbanov authored
      Differential Revision: https://reviews.llvm.org/D44019
      
      llvm-svn: 326728
      75bc70fb
    • Raphael Isemann's avatar
      Including <functional> for std::bind · 1fe3ee18
      Raphael Isemann authored
      Differential Revision: https://reviews.llvm.org/D44099
      
      llvm-svn: 326727
      1fe3ee18
    • Daniel Sanders's avatar
      Revert r326723: Make STATISTIC() values available programmatically · 7612f85d
      Daniel Sanders authored
      Despite building cleanly on my machine in three separate configs, it's failing on pretty much all bots due to missing includes among other things. Investigating.
      
      llvm-svn: 326726
      7612f85d
    • Yaxun Liu's avatar
      1578a0a5
    • Evandro Menezes's avatar
      [AArch64] Harden test case · f29e35af
      Evandro Menezes authored
      NFC
      
      llvm-svn: 326724
      f29e35af
    • Daniel Sanders's avatar
      Make STATISTIC() values available programmatically · edcf110b
      Daniel Sanders authored
      Summary:
      It can be useful for tools to be able to retrieve the values of variables
      declared via STATISTIC() directly without having to emit them and parse
      them back. Use cases include:
      * Needing to report specific statistics to a test harness
      * Wanting to post-process statistics. For example, to produce a percentage of
        functions that were fully selected by GlobalISel
      
      Make this possible by adding llvm::GetStatistics() which returns an
      iterator_range that can be used to inspect the statistics that have been
      touched during execution. When statistics are disabled (NDEBUG and not
      LLVM_ENABLE_STATISTICS) this method will return an empty range.
      
      This patch doesn't address the effect of multiple compilations within the same
      process. In such situations, the statistics will be cumulative for all
      compilations up to the GetStatistics() call.
      
      Reviewers: qcolombet, rtereshin, aditya_nandakumar, bogner
      
      Reviewed By: rtereshin, bogner
      
      Subscribers: llvm-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D43901
      
      llvm-svn: 326723
      edcf110b
    • Sebastian Pop's avatar
      fix PR36582 · ac0bfb59
      Sebastian Pop authored
      The error occurs when reading i16 elements (as in the testcase) from a v8i8
      with a pattern of <0,2,4,6>. As all the data in the vector is accessed, the
      operation is not a VUZP. The patch stops the pattern recognition of VUZP when
      EXTRACT_VECTOR_ELT has a different element type than BUILD_VECTOR.
      
      llvm-svn: 326722
      ac0bfb59
    • Sam McCall's avatar
      [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it. · 77a719cb
      Sam McCall authored
      Summary:
      The intent was that [ar] doesn't match "FooBar"; the first character must match
      a Head character (hard requirement, not just a low score).
      This matches VSCode, and was "tested" but the tests were defective.
      
      The tests expected matches("FooBar") to fail for lack of a match. But instead
      it fails because the string should be annotated - matches("FooB[ar]").
      This patch makes matches("FooBar") ignore annotations, as was intended.
      
      Fixing the code to reject weak matches for the first char causes problems:
      -  [bre] no longer matches "HTMLBRElement".
         We allow matching against an uppercase char even if we don't think it's head.
         Only do this if there's at least one lowercase, to avoid triggering on MACROS
      -  [print] no longer matches "sprintf".
         This is hard to fix without false positives (e.g. [int] vs "sprintf"])
         This patch leaves this case broken. A future patch will add a dictionary
         providing custom segmentation to common names from the standard library.
      
      Fixed a couple of index tests that indirectly relied on broken fuzzy matching.
      Added const in a couple of missing places for consistency with new code.
      
      Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D44003
      
      llvm-svn: 326721
      77a719cb
    • Florian Hahn's avatar
      [IPSCCP] Add getCompare which returns either true, false, undef or null. · 0b7c6422
      Florian Hahn authored
      getCompare returns true, false or undef constants if the comparison can
      be evaluated, or nullptr if it cannot. This is in line with what
      ConstantExpr::getCompare returns. It also allows us to use
      ConstantExpr::getCompare for comparing constants.
      
      Reviewers: davide, mssimpso, dberlin, anna
      
      Reviewed By: davide
      
      Differential Revision: https://reviews.llvm.org/D43761
      
      llvm-svn: 326720
      0b7c6422
    • Sam McCall's avatar
      [clangd] Extract ClangdServer::Options struct. · 7363a2f2
      Sam McCall authored
      Summary:
      This subsumes most of the params to ClangdServer and ClangdLSPServer.
      Adjacent changes:
       - tests use a consistent set of options, except when testing specific options
       - tests that previously used synchronous mode for convenience no longer do
       - added a runAddDocument helper to SyncAPIs to mitigate the extra code
       - rearranged main a bit to follow the structure of the options
      
      Reviewers: ilya-biryukov
      
      Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D44088
      
      llvm-svn: 326719
      7363a2f2
    • Evandro Menezes's avatar
      [AArch64] Improve code generation of constant vectors · cd855f70
      Evandro Menezes authored
      Use the whole gammut of constant immediates available to set up a vector.
      Instead of using, for example, `mov w0, #0xffff; dup v0.4s, w0`, which
      transfers between register files, use the more efficient `movi v0.4s, #-1`
      instead.  Not limited to just a few values, but any immediate value that can
      be encoded by all the variants of `FMOV`, `MOVI`, `MVNI`, thus eliminating
      the need to there be patterns to optimize special cases.
      
      Differential revision: https://reviews.llvm.org/D42133
      
      llvm-svn: 326718
      cd855f70
    • Erik Pilkington's avatar
      [demangler] Modernize parse_name. · 3402e876
      Erik Pilkington authored
      llvm-svn: 326717
      3402e876
    • Jonas Paulsson's avatar
      [MachineScheduler] Dump SUnits before calling SchedImpl->initialize() · bc32f7db
      Jonas Paulsson authored
      This is a NFC simple patch that changes the DEBUG dumping in the
      MachineScheduler so that the dumping of the built SUnits is done before the
      SchedImpl->initialize() is called.
      
      This is better on SystemZ, since it has a strategy that does some dumping at
      the start of the region, and it is not possible to easily read it if it is
      output above a long list of SU.
      
      Review: Javed Absar
      https://reviews.llvm.org/D44089
      
      llvm-svn: 326716
      bc32f7db
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Add InstrMapping for G_EXTRACT · e31ab94e
      Matt Arsenault authored
      llvm-svn: 326715
      e31ab94e
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Make some G_EXTRACTs legal · 71272e6d
      Matt Arsenault authored
      As far as I can tell legalization of weird sizes for the
      output type isn't implemented.
      
      llvm-svn: 326714
      71272e6d
    • Matt Arsenault's avatar
      AMDGPU: Fix build warning about override · 4cc0b852
      Matt Arsenault authored
      llvm-svn: 326713
      4cc0b852
    • Sanjay Patel's avatar
      [CVP] fix formatting; NFC · 53ffabdf
      Sanjay Patel authored
      llvm-svn: 326711
      53ffabdf
  2. Mar 05, 2018