1. Jan 08, 2020
    • Simon Tatham's avatar
      [ARM,MVE] Intrinsics for variable shift instructions. · dac7b23c
      Simon Tatham authored
      This batch of intrinsics fills in all the shift instructions that take
      a variable shift distance in a register, instead of an immediate. Some
      of these instructions take a single shift distance in a scalar
      register and apply it to all lanes; others take a vector of per-lane
      distances.
      
      These instructions are all basically one family, varying in whether
      they saturate out-of-range values, and whether they round when bits
      are shifted off the bottom. I've implemented them at the IR level by a
      much smaller family of IR intrinsics, which take flag parameters to
      indicate saturating and/or rounding (along with the usual one to
      specify signed/unsigned integers).
      
      An oddity is that all of them are //left// shift instructions – but if
      you pass a negative shift count, they'll shift right. So the vector
      shift distances are always vectors of //signed// integers, regardless
      of whether you're considering the other input vector to be of signed
      or unsigned. Also, even the simplest `vshlq` instruction in this
      family (neither saturating nor rounding) has to be implemented as an
      IR intrinsic, because the ordinary LLVM IR `shl` operation would
      consider an out-of-range shift count to be undefined behavior.
      
      Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D72329
      dac7b23c
    • Simon Tatham's avatar
      [ARM,MVE] Intrinsics for partial-overwrite imm shifts. · 31004809
      Simon Tatham authored
      This batch of intrinsics covers two sets of immediate shift
      instructions, which have in common that they only overwrite part of
      their output register and so they need an extra input giving its
      previous value.
      
      The VSLI and VSRI instructions shift each lane of the input vector
      left or right just as if they were normal immediate VSHL/VSHR, but
      then they only overwrite the output bits that correspond to actual
      shifted bits of the input. So VSLI will leave the low n bits of each
      output lane unchanged, and VSRI the same with the top n bits.
      
      The V[Q][R]SHR[U]N family are all narrowing shifts: they take an input
      vector of 2n-bit integers, shift each lane right by a constant, and
      then narrowing the shifted result to only n bits. So they only
      overwrite half of the n-bit lanes in the output register, and the B/T
      suffix indicates whether it's the bottom or top half of each 2n-bit
      lane.
      
      I've implemented the whole of the latter family using a single IR
      intrinsic `vshrn`, which takes a lot of i32 parameters indicating
      which instruction it expands to (by specifying signedness of the input
      and output types, whether it saturates and/or rounds, etc).
      
      Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D72328
      31004809
    • Andi-Bogdan Postelnicu's avatar
      [clang-tidy] Disable match on `if constexpr` statements in template... · ba129c7d
      Andi-Bogdan Postelnicu authored
      [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check.
      
      Summary: Fixes fixes `readability-misleading-identation` for `if constexpr`. This is very similar to D71980.
      
      Reviewers: alexfh
      
      Subscribers: xazax.hun, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D72333
      ba129c7d
    • Bevin Hansson's avatar
      [Intrinsic] Add fixed point division intrinsics. · 8e2b44f7
      Bevin Hansson authored
      Summary:
      This patch adds intrinsics and ISelDAG nodes for
      signed and unsigned fixed-point division:
      
        llvm.sdiv.fix.*
        llvm.udiv.fix.*
      
      These intrinsics perform scaled division on two
      integers or vectors of integers. They are required
      for the implementation of the Embedded-C fixed-point
      arithmetic in Clang.
      
      Patch by: ebevhan
      
      Reviewers: bjope, leonardchan, efriedma, craig.topper
      
      Reviewed By: craig.topper
      
      Subscribers: Ka-Ka, ilya, hiraditya, jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70007
      8e2b44f7
    • Qiu Chaofan's avatar
      [NFC] Move InPQueue into arguments of releaseNode · b2c2fe72
      Qiu Chaofan authored
      This patch moves `InPQueue` into function arguments instead of template
      arguments of `releaseNode`, which is a cleaner approach.
      
      Differential Revision: https://reviews.llvm.org/D72125
      b2c2fe72
    • Aaron Ballman's avatar
      Fixing a formatting nit; NFC · 7a77ad14
      Aaron Ballman authored
      7a77ad14
    • LLVM GN Syncbot's avatar
      [gn build] Port 346f6b54 · 26ac7923
      LLVM GN Syncbot authored
      26ac7923
    • Anna Welker's avatar
      [ARM][MVE] Enable masked gathers from vector of pointers · 346f6b54
      Anna Welker authored
      Adds a pass to the ARM backend that takes a v4i32
      gather and transforms it into a call to MVE's
      masked gather intrinsics.
      
      Differential Revision: https://reviews.llvm.org/D71743
      346f6b54
    • Aaron Ballman's avatar
      Disallow an empty string literal in an asm label · 55a51e1c
      Aaron Ballman authored
      An empty string literal in an asm label does not make a whole lot of sense. GCC
      does not diagnose such a construct, but it also generates code that cannot be
      assembled by gas should two symbols have an empty asm label within the same TU.
      This does not affect an asm statement with an empty string literal, which is
      still a useful construct.
      55a51e1c
    • Nico Weber's avatar
      [gn build] (manually) merge 1cf11a4c · 111ec8c2
      Nico Weber authored
      111ec8c2
    • Alexey Lapshin's avatar
      [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. · 1cf11a4c
      Alexey Lapshin authored
      Summary:
      This patch relands D71271. The problem with D71271 is that it has cyclic dependency:
      CodeGen->AsmPrinter->DebugInfoDWARF->CodeGen. To avoid cyclic dependency this patch
      puts implementation for DWARFOptimizer into separate library: lib/DWARFLinker.
      
      Thus the difference between this patch and D71271 is in that DWARFOptimizer renamed into
      DWARFLinker and it`s files are put into lib/DWARFLinker.
      
      Reviewers: JDevlieghere, friss, dblaikie, aprantl
      
      Reviewed By: JDevlieghere
      
      Subscribers: thegameg, merge_guards_bot, probinson, mgorny, hiraditya, llvm-commits
      
      Tags: #llvm, #debug-info
      
      Differential Revision: https://reviews.llvm.org/D71839
      1cf11a4c
    • Sam Parker's avatar
      [NFC][ARM] Update tests · 96d2d96b
      Sam Parker authored
      Run the update_mir_test on some of the low-overhead loop tests.
      96d2d96b
    • Raphael Isemann's avatar
      [lldb] Remove default llvm::Triple argument from ClangASTContext constructor · 518597c1
      Raphael Isemann authored
      Creating an ASTContext with an unknown triple is rarely a good idea (as usually
      all our ASTs have a valid triple that is either from the host or the target) and the
      default argument makes it far to easy to implicitly create such an AST. Let's
      remove it and force people to pass a triple.
      
      The only place where we don't pass a triple is a DWARFASTParserClangTests
      where we now just pass the host triple instead (the test doesn't depend on any
      triple so this shouldn't change anything).
      518597c1
    • Xuanda Yang's avatar
      [llvm-symbolizer]Fix printing of malformed address values not passed via stdin · dfeb8730
      Xuanda Yang authored
      Summary:
      relates https://bugs.llvm.org/show_bug.cgi?id=44443
      
      Adding missing newline when printing bad input values.
      
      Fix testcase
      
      Reviewers: jhenderson
      
      Reviewed By: jhenderson
      
      Subscribers: rupprecht, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D72313
      dfeb8730
    • Kadir Cetinkaya's avatar
      Revert "[InstCombine] fold zext of masked bit set/clear" · b212eb71
      Kadir Cetinkaya authored
      This reverts commit a041c4ec.
      
      This looks like a non-trivial change and there has been no code
      reviews (at least there were no phabricator revisions attached to the
      commit description). It is also causing a regression in one of our
      downstream integration tests, we haven't been able to come up with a
      minimal reproducer yet.
      b212eb71
    • Tim Northover's avatar
      AArch64: add missing Apple CPU names and use them by default. · 903e5c30
      Tim Northover authored
      Apple's CPUs are called A7-A13 in official communication, occasionally with
      weird suffixes which we probably don't need to care about. This adds each one
      and describes its features. It also switches the default CPU to the canonical
      name for Cyclone, but leaves legacy support in so that existing bitcode still
      compiles.
      903e5c30
    • Raphael Isemann's avatar
      [lldb][NFC] Remove redundant ClangASTContext constructor that takes ArchSpec · 0a4daff6
      Raphael Isemann authored
      ArchSpec has a superset of the information of llvm::Triple but the ClangASTContext
      just uses the Triple part of it. This deletes the ArchSpec constructor and all
      the code creating ArchSpecs and instead just uses the llvm::Triple constructor
      for ClangASTContext.
      0a4daff6
    • Stephan T. Lavavej's avatar
      [libcxx][test] Fix span tests. · a1857e2c
      Stephan T. Lavavej authored
      span.cons/container.pass.cpp
      N4842 22.7.3.2 [span.cons]/13 constrains span's range constructor
      for ranges::contiguous_range (among other criteria).
      
      24.4.5 [range.refinements]/2 says that contiguous_range requires data(),
      and (via contiguous_range, random_access_range, bidirectional_range,
      forward_range, input_range, range) it also requires begin() and end()
      (see 24.4.2 [range.range]/1).
      
      Therefore, IsAContainer needs to provide begin() and end().
      
      (Detected by MSVC's concept-constrained implementation.)
      
      span.cons/stdarray.pass.cpp
      This test uses std::array, so it must include <array>.
      <span> isn't guaranteed to drag in <array>.
      
      (Detected by MSVC's implementation which uses a forward declaration to
      avoid dragging in <array>, for increased compiler throughput.)
      
      span.objectrep/as_bytes.pass.cpp
      span.objectrep/as_writable_bytes.pass.cpp
      Testing `sp.extent == std::dynamic_extent` triggers MSVC warning
      C4127 "conditional expression is constant". Using `if constexpr` is a
      simple way to avoid this without disrupting anyone else (as span
      requires C++20 mode).
      
      span.tuple/get.pass.cpp
      22.7.3.2 [span.cons]/4.3: "Preconditions: If extent is not equal to
      dynamic_extent, then count is equal to extent."
      
      These lines were triggering undefined behavior (detected by assertions
      in MSVC's implementation).
      
      I changed the count arguments in the first two chunks, followed by
      changing the span extents, in order to preserve the test's coverage
      and follow the existing pattern.
      
      span.cons/span.pass.cpp
      22.7.3.2 [span.cons]/18.1 constrains span's converting constructor with
      "Extent == dynamic_extent || Extent == OtherExtent is true".
      
      This means that converting from dynamic extent to static extent is
      not allowed. (Other constructors tested elsewhere, like
      span(It first, size_type count), can be used to write such code.)
      
      As this is the test for the converting constructor, I have:
      
      * Removed the "dynamic -> static" case from checkCV(), which is
      comprehensive.
      
      * Changed the initialization of std::span<T, 0> s1{}; in
      testConstexprSpan() and testRuntimeSpan(), because s1 is used below.
      
      * Removed ASSERT_NOEXCEPT(std::span<T, 0>{s0}); from those functions,
      as they are otherwise comprehensive.
      
      * Deleted testConversionSpan() entirely. Note that this could never
      compile (it had a bool return type, but forgot to say `return`). And it
      couldn't have provided useful coverage, as the /18.2 constraint
      "OtherElementType(*)[] is convertible to ElementType(*)[]"
      permits only cv-qualifications, which are already tested by checkCV().
      a1857e2c
    • Utkarsh Saxena's avatar
      [clangd] Add xref for macros to FileIndex. · 583ba078
      Utkarsh Saxena authored
      Summary:
      Adds macro references to the dynamic index.
      Tests added.
      Also exposed a new API to convert path to URI in URI.h
      
      Reviewers: hokein
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D71406
      583ba078
    • Siva Chandra Reddy's avatar
      [libc] Add a convenience CMake rule to add testsuites. · 880734ae
      Siva Chandra Reddy authored
      Summary:
      This rule helps avoid repeated setting of check-libc's dependency on the
      various testsuites.
      
      Reviewers: abrachet
      
      Subscribers: mgorny, MaskRay, tschuett, libc-commits
      
      Tags: #libc-project
      
      Differential Revision: https://reviews.llvm.org/D72353
      880734ae
    • QingShan Zhang's avatar
      44f78f36
    • Jonas Devlieghere's avatar
      [lldb/CMake] Only auto-enable Python when SWIG is found · fc6f15d4
      Jonas Devlieghere authored
      As correctly pointed out by Martin on the mailing list, Python should
      only be auto-enabled if SWIG is found as well. This moves the logic of
      finding SWIG into FindPythonInterpAndLibs to make that possible.
      
      To make diagnosing easier I've included a status message to convey why
      Python support is disabled.
      fc6f15d4
    • Jonas Devlieghere's avatar
      [lldb/Test] Try to appease the Windows bot · adee6454
      Jonas Devlieghere authored
      In TestConvenienceVariables I changed %t from a file to a directory.
      This tripped up mkdir which can't deal with an existing file at the
      given location. In order to solve this issue on the bots I added an
      `rm -rf %t` statement, but now the Windows bot complains that "This
      function is not supported on this system".
      
      If you never ran the test suite wit this temporary workaround, the test
      might fail. If this happens please remove what %t expands to in the lit
      output and rerun the test.
      adee6454
    • Wang, Pengfei's avatar
      [X86] Adding fp128 support for strict fcmp · 9a621de1
      Wang, Pengfei authored
      Summary: Adding fp128 support for strict fcmp
      
      Reviewers: craig.topper, LiuChen3, andrew.w.kaylor, RKSimon, uweigand
      
      Subscribers: hiraditya, llvm-commits, LuoYuanke
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D71897
      9a621de1
    • James Clarke's avatar
      [RISCV] Fix evalutePCRelLo for symbols at the end of a fragment · 917f46db
      James Clarke authored
      Summary:
      This is analogous to D58943, which correctly finds the corresponding
      fixup. However, when linker relaxations are disabled and we evaluate the
      fixup, we need to also ensure we use an offset of 0 rather than the size
      of the previous fragment.
      
      Reviewers: asb, efriedma, lenary
      
      Reviewed By: efriedma
      
      Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D71978
      917f46db
    • Denis Khalikov's avatar
    • Lei Zhang's avatar
      Revert "[mlir][spirv] Add lowering for std.fpext, std.fptrunc, std.sitofp." · dab2921f
      Lei Zhang authored
      This reverts commit 7e7f849a because
      it recorded the wrong commit author.
      dab2921f
    • Matt Arsenault's avatar
      AMDGPU: Annotate EXTRACT_SUBREGs with source register classes · 22700f68
      Matt Arsenault authored
      This partially fixes GlobalISel import of the patterns, but removes a
      lot of entriess from the end of the skipped pattern log.
      22700f68
    • Denis Khalikov's avatar
      [mlir][spirv] Add lowering for std cmp ops. · dd495e8a
      Denis Khalikov authored
      Differential Revision: https://reviews.llvm.org/D72296
      dd495e8a
    • Denis Khalikov's avatar
      9883b14c
    • Jim Lin's avatar
      f7ca0c76
    • Lei Zhang's avatar
    • czhengsz's avatar
      [SCEV] get more accurate range for AddExpr with wrap flag. · 8b8ba440
      czhengsz authored
      Reviewed By: nikic
      
      Differential Revision: https://reviews.llvm.org/D64869
      8b8ba440
    • Jim Lin's avatar
      [docs] Improve HowTo commit changes from git · f90a2c2d
      Jim Lin authored
      Summary: As a novice here I tried to `git push` my changes for a while before figuring out the correct workflow which is described on other pages. This small change doesn't reduce redundancy between those pages, but at least readers can follow the links now.
      
      Reviewers: Kokan, Jim
      
      Reviewed By: Kokan, Jim
      
      Subscribers: riccibruno, kiszk, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D72077
      f90a2c2d
    • Kazuaki Ishizaki's avatar
      [libcxx] fix incorrect attribute property · 9de6a398
      Kazuaki Ishizaki authored
      Summary:
      `__has_attribute(fallthough)` -> `__has_attribute(fallthrough)`
      This is a follow-up of https://reviews.llvm.org/D72287
      
      Reviewers: EricWF, mclow.lists, Jim
      
      Reviewed By: Jim
      
      Subscribers: christof, ldionne, libcxx-commits
      
      Tags: #libc
      
      Differential Revision: https://reviews.llvm.org/D72314
      9de6a398
    • Eric Christopher's avatar
      XFAIL load_extension.ll for all targets currently - it's failing on · c23c8746
      Eric Christopher authored
      additional platforms than just darwin.
      c23c8746
    • Jonas Devlieghere's avatar
      Revert "Re-land "[lldb/Lua] Add string conversion operator for SBTarget."" · 6563826f
      Jonas Devlieghere authored
      This was returning a pointer to a stack-allocated memory location. This
      works for Python where we return a PythonString which must own the
      underlying string.
      6563826f
    • Jason Molenda's avatar
      5e2f4dc3
    • Philip Reames's avatar
      [GVN/FP] Considate logic for reasoning about equality vs equivalance for floats · 312a532d
      Philip Reames authored
      Factor out common logic into some reasonable commented helper functions. In the process, ensure that the in-block vs cross-block cases are handled the same. They previously weren't.
      
      Differential Revision: https://reviews.llvm.org/D67126
      312a532d
    • Daniel Sanders's avatar