1. Nov 22, 2023
  2. Nov 21, 2023
    • Youngsuk Kim's avatar
      [llvm][IRMover] Remove no-op ptr-to-ptr bitcast (NFC) · c0a1fcd3
      Youngsuk Kim authored
      Opaque ptr cleanup effort.
      c0a1fcd3
    • Erich Keane's avatar
      [OpenACC] Implement enter data/exit data construct parsing (#72916) · 147b38b1
      Erich Keane authored
      These two constructs, 'enter data' and 'exit data', are novel compared
      to what is currently in the parser, as this is the first set implemented
      where the first token is itself not a valid construct. Because of this,
      it requires some additional work to do the first keyword parsing.
      147b38b1
    • Fangrui Song's avatar
      [ELF] Support R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 in non-SHF_ALLOC sections (#72610) · 7ffabb61
      Fangrui Song authored
      For a label difference like `.uleb128 A-B`, MC generates a pair of
      R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 if A-B cannot be folded as a
      constant. GNU assembler generates a pair of relocations in more cases
      (when A or B is in a code section with linker relaxation).
      
      `.uleb128 A-B` is primarily used by DWARF v5
      .debug_loclists/.debug_rnglists (DW_LLE_offset_pair/DW_RLE_offset_pair
      entry kinds) implemented in Clang and GCC.
      
      `.uleb128 A-B` can be used in SHF_ALLOC sections as well (e.g.
      `.gcc_except_table`). This patch does not handle SHF_ALLOC.
      
      `-z dead-reloc-in-nonalloc=` can be used to change the relocated value,
      if the R_RISCV_SET_ULEB128 symbol is in a discarded section. We don't
      check the R_RISCV_SUB_ULEB128 symbol since for the expected cases A and
      B should be defined in the same input section.
      7ffabb61
    • Ivan Butygin's avatar
      [mlir][spirv] Add more CL math ops (#72995) · 61835152
      Ivan Butygin authored
      tan
      atan
      atanh
      sinh
      cosh
      asin
      asinh
      acos
      acosh
      atan2
      61835152
    • Jessica Del's avatar
      [AMDGPU] - Add constant folding to s_wqm intrinsic (#72382) · f85e7ab0
      Jessica Del authored
      Fold any constant input to the `s_wqm` intrinsic.
      f85e7ab0
    • Momchil Velikov's avatar
      [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (#70474) · f3358838
      Momchil Velikov authored
      This patch adds a set of SVE2.1 quadword load/store intrisics:
      
        * Contiguous zero-extending load to quadword (single vector)
      
          sv<type>_t svld1uwq[_<typ>](svbool_t, const <type>_t *ptr);
          sv<type>_t svld1uwq_vnum[_<typ>](svbool_t, const <type> *ptr, int64_t vnum);
       
          sv<type>_t svld1udq[_<typ>](svbool_t, const <type>_t *ptr);
          sv<type>_t svld1udq_vnum[_<typ>](svbool_t, const <type>_t *ptr, int64_t vnum);
      
        * Contiguous truncating store of single vector operand
      
          void svst1uwq[_<typ>](svbool_t, const <type>_t *ptr, sv<type>_t data);
          void svst1uwq_vnum[_<typ>](svbool_t, const <type>_t *ptr, int64_t vnum, sv<type>_t data);
      
          void svst1udq[_<typ>](svbool_t, const <type>_t *ptr, sv<type>_t data);
          void svst1udq_vnum[_<typ>](svbool_t, const <type>_t *ptr, int64_t vnum, sv<type>_t data);
      
        * Gather load quadword
      
          sv<type>_t svld1q_gather[_u64base]_<typ>(svbool_t pg, svuint64_t zn);
          sv<type>_t svld1q_gather[_u64base]_offset_<typ>(svbool_t pg, svuint64_t zn, int64_t offset);
      
        * Scatter store quadword
      
          void svst1q_scatter[_u64base][_<typ>](svbool_t pg, svuint64_t zn, sv<type>_t data);
          void svst1q_scatter[_u64base]_offset[_<typ>](svbool_t pg, svuint64_t zn, int64_t offset, sv<type>_t data);
      
        * Contiguous load two, three or four quadword structures.
      
          sv<type>x2_t svld2q[_<typ>](svbool_t pg, const <type>_t *rn);
          sv<type>x2_t svld2q_vnum[_<typ>](svbool_t pg, const <type>_t *rn, uint64_t vnum);
          sv<type>x3_t svld3q[_<typ>](svbool_t pg, const <type>_t *rn);
          sv<type>x3_t svld3q_vnum[_<typ>](svbool_t pg, const <type>_t *rn, uint64_t vnum);
          sv<type>x4_t svld4q[_<typ>](svbool_t pg, const <type>_t *rn);
          sv<type>x4_t svld4q_vnum[_<typ>](svbool_t pg, const <type>_t *rn, uint64_t vnum);
      
        * Contiguous store two, three or four quadword structures.
      
          void svst2q[_<typ>](svbool_t pg, <type>_t *rn, sv<type>x2_t zt);
          void svst2q_vnum[_<typ>](svbool_t pg, <type>_t *rn, int64_t vnum, sv<type>x2_t zt);
          void svst3q[_<typ>](svbool_t pg, <type>_t *rn, sv<type>x3_t zt);
          void svst3q_vnum[_<typ>](svbool_t pg, <type>_t *rn, int64_t vnum, sv<type>x3_t zt);
          void svst4q[_<typ>](svbool_t pg, <type>_t *rn, sv<type>x4_t zt);
          void svst4q_vnum[_<typ>](svbool_t pg, <type>_t *rn, int64_t vnum, sv<type>x4_t zt);
      
      ACLE spec: https://github.com/ARM-software/acle/pull/257
      
      
      
      Co-authored-by: default avatarCaroline Concatto <caroline.concatto@arm.com>
      Co-authored-by: default avatarHassnaa Hamdi <hassnaa.hamdi@arm.com>
      f3358838
    • Nikita Popov's avatar
      [BasicAA] Optimize index size adjustment (NFC) · a3908d33
      Nikita Popov authored
      In most cases we do not actually have to perform an index size
      adjustment. Don't perform any APInt operations in that case.
      a3908d33
    • Brandon Wu's avatar
    • Oleksandr "Alex" Zinenko's avatar
      [mlir] use TypeSize and uint64_t in DataLayout (#72874) · 8134a8fc
      Oleksandr "Alex" Zinenko authored
      Data layout queries may be issued for types whose size exceeds the range
      of 32-bit integer as well as for types that don't have a size known at
      compile time, such as scalable vectors. Use best practices from LLVM IR
      and adopt `llvm::TypeSize` for size-related queries and `uint64_t` for
      alignment-related queries.
      
      See #72678.
      8134a8fc
    • martinboehme's avatar
    • Boian Petkantchin's avatar
      [mlir][mesh] Add collective communication operations (#71960) · 5f7c8c10
      Boian Petkantchin authored
      Add all-gather, all-reduce, all-to-all and reduce-scatter. These
      operations have device mesh semantics.
      5f7c8c10
    • Nikita Popov's avatar
      [InstCombine] Fix incorrect nneg inference on shift amount · ac75171d
      Nikita Popov authored
      Whether this is valid depends on the bit widths of the involved
      integers.
      
      Fixes https://github.com/llvm/llvm-project/issues/72927.
      ac75171d
    • Nikita Popov's avatar
      [InstCombine] Add tests for incorrect shift nneg inference (NFC) · a1652fdb
      Nikita Popov authored
      The second test is a miscompile.
      a1652fdb
    • Florian Hahn's avatar
      [LV] Add test case for diff checks with nested AddRecs. · 6088e9cd
      Florian Hahn authored
      Add a test case where the AddRec for the pointers in the inner loop
      have the AddRec of the outer loop as start value.
      
      It is sufficient to subtract the start values (%dst, %src) of the outer
      AddRecs. This simplification will be done in a follow-up commit.
      6088e9cd
    • smanna12's avatar
      [clang] Fix lit test failure caused by https://github.com/llvm/llvm-project/pull/70762 (#72928) · 9cd617c5
      smanna12 authored
      Lit test generates different outputs for usage of __int128_t in
      clang-armv8-quick environment. This patch adds triple to fix the lit
      failure.
      
      ```
      Step 5 (ninja check 1) failure: 1 unexpected failures 38623 expected passes 71 expected failures 36752 unsupported tests (failure)
      ******************** TEST 'Clang :: Sema/code_align.c' FAILED ******************** Exit Code: 1
      
      Command Output (stderr):
      --
      RUN: at line 1: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 -internal-isystem /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/18/include -nostdsysteminc -fsyntax-only -verify=expected,c-local -x c /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c
      + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang -cc1 
      + -internal-isystem 
      + /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/lib/clang/18/inclu
      + de -nostdsysteminc -fsyntax-only -verify=expected,c-local -x c 
      + /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code
      + _align.c
      error: 'c-local-error' diagnostics expected but not seen: 
        File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 79 (directive at /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c:78): 'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was (__int128_t)1311768467294899680ULL << 64
        File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 89 (directive at /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c:88): 'code_align' attribute requires an integer argument which is a constant power of two between 1 and 4096 inclusive; provided argument was -(__int128_t)1311768467294899680ULL << 64
      error: 'c-local-error' diagnostics seen but not expected: 
        File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 79: use of undeclared identifier '__int128_t'
        File /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Sema/code_align.c Line 89: use of undeclared identifier '__int128_t'
      4 errors generated.
      
      ```
      9cd617c5
    • agozillon's avatar
      [MLIR][OpenMP] remove now unnecessary getUsedValuesDefinedAbove call from convertTargetOp (#72904) · 9d26c6bd
      agozillon authored
      This block of code was here to create pseudo handling of implicit
      captures in target regions to prevent gfortran test regressions and
      allow certain pieces of code to function, however, with the introduction
      of the IFA patch which adds proper handling of implicits by adding them
      to the map operands list alongside explicit mappings at the initial
      Fortran -> MLIR generation phase this should no longer be required and
      may cause some adverse affects at worse in the future.
      9d26c6bd
    • Nico Weber's avatar
      [gn] port e6ef3152 · 9250fbd2
      Nico Weber authored
      9250fbd2
    • Florian Hahn's avatar
      [BasicAA] Don't use MinAbsVarIndex = 1. (#72993) · 2d39cb49
      Florian Hahn authored
      The current code incorrectly assumed that the absolute variable index
      needs to be at least 1, if the variable is != 0. This is incorrect, in
      case multiplying with Scale wraps.
      
      The code below already checks for wrapping properly, so just remove the
      incorrect assignment.
      
      Fixes https://github.com/llvm/llvm-project/issues/72831.
      2d39cb49