1. Aug 14, 2020
    • Simon Pilgrim's avatar
      [X86][SSE] Add HADD combine regression case from rG9bd97d03 · 3a2645e4
      Simon Pilgrim authored
      rG9bd97d03 caused a miscompile of this internal test case
      3a2645e4
    • Jonas Devlieghere's avatar
      [lldb] Set the launch flags to GetLaunchInfo().GetLaunchFlags() · 2ddba09e
      Jonas Devlieghere authored
      Instead of clearing the launch flags, always pass the target's current
      launch flags.
      2ddba09e
    • Alexander Belyaev's avatar
      [mlir] Test CallOp STD->LLVM conversion. · fed9ff51
      Alexander Belyaev authored
      This exercises the corner case that was fixed in
      https://reviews.llvm.org/rG8979a9cdf226066196f1710903d13492e6929563.
      
      The bug can be reproduced when there is a @callee with a custom type argument and @caller has a producer of this argument passed to the @callee.
      
      Example:
      func @callee(!test.test_type) -> i32
      func @caller() -> i32 {
        %arg = "test.type_producer"() : () -> !test.test_type
        %out = call @callee(%arg) : (!test.test_type) -> i32
        return %out : i32
      }
      
      Even though there is a type conversion for !test.test_type, the output IR (before the fix) contained a DialectCastOp:
      
      module {
        llvm.func @callee(!llvm.ptr<i8>) -> !llvm.i32
        llvm.func @caller() -> !llvm.i32 {
          %0 = llvm.mlir.null : !llvm.ptr<i8>
          %1 = llvm.mlir.cast %0 : !llvm.ptr<i8> to !test.test_type
          %2 = llvm.call @callee(%1) : (!test.test_type) -> !llvm.i32
          llvm.return %2 : !llvm.i32
        }
      }
      
      instead of
      
      module {
        llvm.func @callee(!llvm.ptr<i8>) -> !llvm.i32
        llvm.func @caller() -> !llvm.i32 {
          %0 = llvm.mlir.null : !llvm.ptr<i8>
          %1 = llvm.call @callee(%0) : (!llvm.ptr<i8>) -> !llvm.i32
          llvm.return %1 : !llvm.i32
        }
      }
      
      Differential Revision: https://reviews.llvm.org/D85914
      fed9ff51
    • David Green's avatar
      [ARM] Mark VMINNMA/VMAXNMA as commutative · 2632c625
      David Green authored
      These operations take Qda and Rn register operands, which are
      commutative so long as the instruction is not predicated.
      
      Differential Revision: https://reviews.llvm.org/D85813
      2632c625
    • peter klausler's avatar
      [flang] Implement shape analysis of TRANSFER intrinsic function result · fad31d60
      peter klausler authored
      The shape (esp. the size) of the result of a call to TRANSFER
      is implemented according to the definition in the standard.
      
      Differential Revision: https://reviews.llvm.org/D85866
      fad31d60
    • Jonas Devlieghere's avatar
      [lldb] Skip TestStepScripted with reproducers · 180d6ed6
      Jonas Devlieghere authored
      Some of the test methods were already skipped because of an unexpected
      packet. The test started failing after it was expanded. Skip the whole
      test with reproducers so we don't have to add the decorator for every
      method.
      180d6ed6
    • Cameron McInally's avatar
      e1a87f0a
    • Kadir Cetinkaya's avatar
      [clangd] Move clang-tidy check modifications into ClangdServer · 0464acd0
      Kadir Cetinkaya authored
      Summary:
      This enables sharing the logic between standalone clangd and embedders
      of it. The new approach should be same performance-wise, as it is only called
      once per addDocument call.
      
      This patch also introduces a blacklisting code path for disabling crashy or
      high-noise tests, until we figure out a way to make them work with clangd-setup.
      
      The biggest difference is the way we make use of preambles, hence those checks
      can't see directives coming from the preamble section of the file. The second
      thing is the fact that code might-not be compiling while clangd is trying to
      build an AST, hence some checks might choke on those incomplete ASTs.
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, aaron.ballman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D83224
      0464acd0
    • Kadir Cetinkaya's avatar
      [clangd] Send EOF before resetting diagnostics consumer · 66a2e3a5
      Kadir Cetinkaya authored
      Summary:
      Some clang-tidy checkers, e.g. llvm-include-order can emit diagnostics
      at this callback (as mentioned in the comments).
      
      Clangd was resetting diag consumer to IgnoreDiags before sending EOF, hence we
      were unable to emit diagnostics for such checkers.
      
      This patch changes the order of that reset and preprocosser event to make sure
      we emit that diag.
      
      Fixes https://github.com/clangd/clangd/issues/314.
      
      Reviewers: sammccall
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D83178
      66a2e3a5
    • Aditya Kumar's avatar
    • Aditya Kumar's avatar
      Add cold attribute to one time construction APIs · d54f5979
      Aditya Kumar authored
      _cxa_guard_acquire is used for only one purpose,
      namely guarding local static variable initialization,
      and since that purpose is definitionally cold,
      it should be attributed as cold
      
      Reviewed By: ldionne
      
      Reviewers: mclow.lists, ldionne, jfb, yfeldblum
      
      Differential Revision: https://reviews.llvm.org/D85873
      d54f5979
    • Bjorn Pettersson's avatar
      [VectorCombine] Fix for non-zero addrspace when creating vector load from scalar load · 11446b02
      Bjorn Pettersson authored
      This is a fixup to commit 43bdac29, to make sure the
      address space from the original load pointer is retained in the
      vector pointer.
      
      Resolves problem with
        Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
      due to address space mismatch.
      
      Reviewed By: spatel
      
      Differential Revision: https://reviews.llvm.org/D85912
      11446b02
    • Serguei Katkov's avatar
      [InstCombine] Handle gc.relocate(null) in one iteration · 98ba0a5f
      Serguei Katkov authored
      InstCombine adds users of transformed instruction to working list to
      process on the same iteration. However gc.relocate may have a hidden
      user (next gc.relocate) which is connected through gc.statepoint intrinsic and
      there is no direct def-use chain between them.
      
      In this case if the next gc.relocation is already processed it will not be added
      to worklist and will not be able to be processed on the same iteration.
      Let's we have the following case:
      A = gc.relocate(null)
      B = statepoint(A)
      C = gc.relocate(B, hidden(A))
      If C is already considered then after replacement of A with null, statepoint B
      instruction will be added to the queue but not C.
      C can be processed only on the next iteration.
      
      If the chain of relocation is pretty long the many iteration may be required.
      This change is to reduce the number of iteration to meet the latest changes
      related to reducing infinite loop threshold.
      
      This is a quick (not best) fix. In the follow up patches I plan to move gc relocation
      handling into statepoint handler. This should also help to remove unused gc live
      entries in statepoint bundle.
      
      Reviewers: reames, dantrushin
      Reviewed By: reames
      Subscribers: llvm-commits
      Differential Revision: https://reviews.llvm.org/D75598
      98ba0a5f
    • Sam McCall's avatar
      [clangd] Extract BackgroundIndex::Options struct. NFC · b36e22d6
      Sam McCall authored
      I've dropped the background context parameter, since we in practice just pass the
      current context there, and we now have a different way to specify context too.
      While here, clean up a couple of comments.
      
      Reviewed By: kadircet
      
      Differential Revision: https://reviews.llvm.org/D83157
      b36e22d6
    • Fangrui Song's avatar
      [ELF] --gdb-index: skip SHF_GROUP .debug_info · fb141292
      Fangrui Song authored
      -gdwarf-5 -fdebug-types-section may produce multiple .debug_info sections.  All
      except one are type units (.debug_types before DWARF v5). When constructing
      .gdb_index, we should ignore these type units. We use a simple heuristic: the
      compile unit does not have the SHF_GROUP flag. (This needs to be revisited if
      people place compile unit .debug_info in COMDAT groups.)
      
      This issue manifests as a data race: because an object file may have multiple
      .debug_info sections, we may concurrently construct `LLDDwarfObj` for the same
      file in multiple threads. The threads may access `InputSectionBase::data()`
      concurrently on the same input section. `InputSectionBase::data()` does a lazy
      uncompress() and rewrites the member variable `rawData`. A thread running zlib
      `inflate()` (transitively called by uncompress()) on a buffer with `rawData`
      tampered by another thread may fail with `uncompress failed: zlib error: Z_DATA_ERROR`.
      
      Even if no data race occurred in an optimistic ...
      fb141292
    • Peter Steinfeld's avatar
      [flang] Fix assert on character literal substrings as arguments · 19d7cc2e
      Peter Steinfeld authored
      Character literal substrings used as arguments were causing asserts.  This
      happened when the code was trying to get the DynamicType of the substring.  We
      were only recording the DynamicType of the Designator on which the substring
      was based.  For character literal substrings, the Designator was a character
      literal, and we weren't handling getting its type.
      
      I fixed this by changing the `GetType()` method for `DynamicType` to check to
      see if we were getting the type of a `Substring` and calculating the type of
      the substring by getting the number of bytes in an element of the string.
      
      I also changed the test `resolve49.f90` with some tests, one of which causes
      the original crash.
      
      Differential Revision: https://reviews.llvm.org/D85908
      19d7cc2e
    • peter klausler's avatar
      [flang] Correct manipulation of mixed complex expressions · e5caa6b5
      peter klausler authored
      Ensure that mixed complex expressions (one operand complex,
      the other not) are properly manipulated; add test.
      e5caa6b5
    • peter klausler's avatar
      [flang] Ensure Preprocessor::Define saves macro names correctly · 51cfad3a
      peter klausler authored
      This fixes problems with macros defined with -D on the command line
      and predefined macros defined in the throwaway driver program.
      51cfad3a
  2. Aug 13, 2020