[all-commits] [llvm/llvm-project] a23291: [Clang] Add integer add reduction builtin

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon May 2 03:03:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a23291b7db48670f7c57adcfb45877c826a97f22
      https://github.com/llvm/llvm-project/commit/a23291b7db48670f7c57adcfb45877c826a97f22
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-05-02 (Mon, 02 May 2022)

  Changed paths:
    M clang/include/clang/Basic/Builtins.def
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/builtins-reduction-math.c
    M clang/test/Sema/builtins-reduction-math.c

  Log Message:
  -----------
  [Clang] Add integer add reduction builtin

Similar to the existing bitwise reduction builtins, this lowers to a llvm.vector.reduce.add intrinsic call.

For other reductions, we've tried to share builtins for float/integer vectors, but the fadd reduction intrinsics also take a starting value argument and can either do unordered or serialized, but not reduction-trees as specified for the builtins. However we address fadd support this shouldn't affect the integer case.

(Split off from D117829)

Differential Revision: https://reviews.llvm.org/D124741




More information about the All-commits mailing list