1. Jun 24, 2019
    • Bjorn Pettersson's avatar
      [ConstantFolding] Use hasVectorInstrinsicScalarOpd. NFC · 485a4218
      Bjorn Pettersson authored
      Summary:
      Use the hasVectorInstrinsicScalarOpd helper function
      in ConstantFoldVectorCall.
      
      Reviewers: rengolin, RKSimon, dblaikie
      
      Reviewed By: rengolin, RKSimon
      
      Subscribers: tschuett, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63705
      
      llvm-svn: 364178
      485a4218
    • Bjorn Pettersson's avatar
      [Scalarizer] Add scalarizer support for smul.fix.sat · 512b1187
      Bjorn Pettersson authored
      Summary:
      Handle smul.fix.sat in the scalarizer. This is done by
      adding smul.fix.sat to the set of "isTriviallyVectorizable"
      intrinsics.
      
      The addition of smul.fix.sat in isTriviallyVectorizable and
      hasVectorInstrinsicScalarOpd can also be seen as a preparation
      to be able to use hasVectorInstrinsicScalarOpd in ConstantFolding.
      
      Reviewers: rengolin, RKSimon, dblaikie
      
      Reviewed By: rengolin
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63704
      
      llvm-svn: 364177
      512b1187
    • James Henderson's avatar
      [docs][llvm-nm] Add missing options to documentation · 2c5ff946
      James Henderson authored
      There were several options missing from the documentation. This patch
      adds them as well as improving some wording and separating the Mach-O
      only options into a separate section.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=42234.
      
      Reviewed by: MaskRay
      
      Differential Revision: https://reviews.llvm.org/D63655
      
      llvm-svn: 364176
      2c5ff946
    • Fangrui Song's avatar
      [sancov] Avoid unnecessary unique_ptr · 078d7119
      Fangrui Song authored
      llvm-svn: 364175
      078d7119
    • Sven van Haastregt's avatar
      [OpenCL] Restore ATOMIC_VAR_INIT · b502a441
      Sven van Haastregt authored
      We accidentally lost the ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT macros
      in r363794.
      
      Also put the `memory_order` typedef back inside a `>= CL2.0` guard.
      
      llvm-svn: 364174
      b502a441
    • Sven van Haastregt's avatar
      [OpenCL] Remove more duplicates from opencl-c.h · 853dfab7
      Sven van Haastregt authored
      Identified the duplicate declarations using
      
        sort lib/Headers/opencl-c.h | uniq -c | grep '      2'
      
      llvm-svn: 364173
      853dfab7
    • Simon Tatham's avatar
      [ARM] Add MVE interleaving load/store family. · fe801762
      Simon Tatham authored
      This adds the family of loads and stores with names like VLD20.8 and
      VST42.32, which load and store parts of multiple q-registers in such a
      way that executing both VLD20 and VLD21, or all four of VLD40..VLD43,
      will distribute 2 or 4 vectors' worth of memory data across the lanes
      of the same number of registers but in a transposed order.
      
      In addition to the Tablegen descriptions of the instructions
      themselves, this patch also adds encode and decode support for the
      QQPR and QQQQPR register classes (representing the range of loaded or
      stored vector registers), and tweaks to the parsing system for lists
      of vector registers to make it return the right format in this case
      (since, unlike NEON, MVE regards q-registers as primitive, and not
      just an alias for two d-registers).
      
      llvm-svn: 364172
      fe801762
    • James Henderson's avatar
      [docs][llvm-nm] Improve symbol code documentation · 3519d553
      James Henderson authored
      The existing symbol code documentation was very incomplete. This patch
      adds the missing codes, and defines them based on the current code
      behaviour.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=42231.
      
      Reviewed by: rupprecht, mtrent, MaskRay
      
      Differential Revision: https://reviews.llvm.org/D63327
      
      llvm-svn: 364171
      3519d553
    • Michal Gorny's avatar
      [libcxx] [test] Read files as bytestrings to fix py3 encoding issues · a5bb7b6c
      Michal Gorny authored
      Use binary mode to read test files in libcxx LibcxxTestFormat class.
      This ensures that tests are read correctly independently of encoding,
      and therefore fixes UnicodeDecodeError when file is opened in Python 3
      that defaults to pure ASCII encoding.
      
      Technically this could be also fixed via conditionally appending
      encoding argument when opening the file in Python 3.  However, since
      the code in question only searches for fixed ASCII substrings reading
      it in binary mode is simpler and more universal.
      
      Differential Revision: https://reviews.llvm.org/D63346
      
      llvm-svn: 364170
      a5bb7b6c
    • Pavel Labath's avatar
      [Support] Fix error handling in DataExtractor::get[US]LEB128 · bb6d0b8e
      Pavel Labath authored
      Summary:
      These functions are documented as not modifying the offset argument if
      the extraction fails (just like other DataExtractor functions). However,
      while reviewing D63591 we discovered that this is not the case -- if the
      function reaches the end of the data buffer, it will just return the
      value parsed until that point and set offset to point to the end of the
      buffer.
      
      This fixes the functions to act as advertised, and adds a regression
      test.
      
      Reviewers: dblaikie, probinson, bkramer
      
      Subscribers: kristina, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63645
      
      llvm-svn: 364169
      bb6d0b8e
    • Sjoerd Meijer's avatar
      Follow up of rL363913. NFC. · a94c18fc
      Sjoerd Meijer authored
      Minor reshuffle in AArch64 targetparser unittest, solving a potential problem
      with querying iterators too early.
      
      llvm-svn: 364168
      a94c18fc
    • George Rimar's avatar
      [llvm-readobj/llvm-readelf] - Eliminate the elf-groups.x86_64 precompiled binary from the inputs. · 8c1b7359
      George Rimar authored
      We do not need the elf-groups.x86_64. In one of the tests, it was
      used for no solid reason, and for the second test case we can use
      YAML input with SHT_GROUP sections.
      
      The patch performs a cleanup of one of the test cases, removes another
      one completely (since during the review was found out it actually
      duplicates one of the existent tests) and removes the precompiled binary.
      
      Differential revision: https://reviews.llvm.org/D63647
      
      llvm-svn: 364167
      8c1b7359
    • Richard Smith's avatar
      PR42362: Fix auto deduction of template parameter packs from · 9771f500
      Richard Smith authored
      type-dependent argument packs.
      
      We need to strip off the PackExpansionExpr to get the real (dependent)
      type rather than an opaque DependentTy.
      
      llvm-svn: 364165
      9771f500
    • Fangrui Song's avatar
      [ELF][PPC][X86] Use [-2**(n-1), 2**n) to check overflows for R_PPC_ADDR16,... · 2fb6b0f2
      Fangrui Song authored
      [ELF][PPC][X86] Use [-2**(n-1), 2**n) to check overflows for R_PPC_ADDR16, R_PPC64_ADDR{16,32}, R_X86_64_{8,16}
      
      Similar to R_AARCH64_ABS32, R_PPC64_ADDR32 can represent either a signed
      value or unsigned value, thus we should use `[-2**(n-1), 2**n)` instead of
      `[-2**(n-1), 2**(n-1))` to check overflows.
      
      The issue manifests as a bogus linker error when linking the powerpc64le Linux kernel.
      The new behavior is compatible with ld.bfd's complain_overflow_bitfield.
      
      The upper bound of the error message is not correct. Fix it as well.
      
      The changes to R_PPC_ADDR16, R_PPC64_ADDR16, R_X86_64_8 and R_X86_64_16 are similar.
      
      Reviewed By: ruiu
      
      Differential Revision: https://reviews.llvm.org/D63690
      
      llvm-svn: 364164
      2fb6b0f2
    • Craig Topper's avatar
      [X86] Turn v16i16->v16i8 truncate+store into a any_extend+truncstore if we... · e8da65c6
      Craig Topper authored
      [X86] Turn v16i16->v16i8 truncate+store into a any_extend+truncstore if we avx512f, but not avx512bw.
      
      Ideally we'd be able to represent this truncate as a any_extend to
      v16i32 and a truncate, but SelectionDAG doens't know how to not
      fold those together.
      
      We have isel patterns to use a vpmovzxwd+vpdmovdb for the truncate,
      but we aren't able to simultaneously fold the load and the store
      from the isel pattern. By pulling the truncate into the store we
      can successfully hide it from the DAG combiner. Then we can isel
      pattern match the truncstore and load+any_extend separately.
      
      llvm-svn: 364163
      e8da65c6
    • Petr Hosek's avatar
      [GN] Generation failure caused by trailing space in file name · c6094f04
      Petr Hosek authored
      When I executed gn.py gen out/gn I got the following error:
      
      ERROR at //compiler-rt/lib/builtins/BUILD.gn:162:7: Only source, header, and object files belong in the sources of a static_library. //compiler-rt/lib/builtins/emutls.c  is not one of the valid types.
            "emutls.c ",
            ^----------
      See //compiler-rt/lib/BUILD.gn:3:5: which caused the file to be included.
          "//compiler-rt/lib/builtins",
          ^---------------------------
      It turns out to be that the latest gn doesn't accept ill-format file name. And the emutls.c above has a trailing space.
      Remove the trailing space should work.
      
      Patch By: myhsu
      Differential Revision: https://reviews.llvm.org/D63449
      
      llvm-svn: 364162
      c6094f04
    • Eric Fiselier's avatar
      Use C++11 implementation of unique_ptr in C++03. · fb2bd4a9
      Eric Fiselier authored
      llvm-svn: 364161
      fb2bd4a9
    • Eric Fiselier's avatar
      Apply new meta-programming traits throughout the library. · 3359a17b
      Eric Fiselier authored
      The new meta-programming primitives are lower cost than the old versions. This patch removes those old versions and switches libc++ to use the new ones.
      
      llvm-svn: 364160
      3359a17b
    • Sanjoy Das's avatar
      Fix typo in comment; NFC · e2291f5a
      Sanjoy Das authored
      llvm-svn: 364159
      e2291f5a
    • Craig Topper's avatar
      [X86] Fix isel pattern that was looking for a bitcasted load. Remove what... · c8d94e78
      Craig Topper authored
      [X86] Fix isel pattern that was looking for a bitcasted load. Remove what appears to be a copy/paste mistake.
      
      DAG combine should ensure bitcasts of loads don't exist.
      
      Also remove 3 patterns that are identical to the block above them.
      
      llvm-svn: 364158
      c8d94e78
    • Richard Smith's avatar
      Fix test for 32-bit targets. · 9bc3141d
      Richard Smith authored
      llvm-svn: 364157
      9bc3141d
    • Philip Reames's avatar
      [Tests] Autogen and improve test readability · 3f8264b0
      Philip Reames authored
      llvm-svn: 364156
      3f8264b0
    • Philip Reames's avatar
      [IndVars] Remove dead instructions after folding trivial loop exit · d22a2a9a
      Philip Reames authored
      In rL364135, I taught IndVars to fold exiting branches in loops with a zero backedge taken count (i.e. loops that only run one iteration).  This extends that to eliminate the dead comparison left around.  
      
      llvm-svn: 364155
      d22a2a9a
    • Fangrui Song's avatar
      SlotIndexes: delete unused functions · f955d5f6
      Fangrui Song authored
      llvm-svn: 364154
      f955d5f6
  2. Jun 23, 2019