[all-commits] [llvm/llvm-project] 799935: [Clang] Add min/max reduction builtins.
Florian Hahn via All-commits
all-commits at lists.llvm.org
Tue Nov 2 07:02:16 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7999355106fb2fcc8de243d2e34b4b73ae4f3d2f
https://github.com/llvm/llvm-project/commit/7999355106fb2fcc8de243d2e34b4b73ae4f3d2f
Author: Florian Hahn <flo at fhahn.com>
Date: 2021-11-02 (Tue, 02 Nov 2021)
Changed paths:
M clang/include/clang/Basic/Builtins.def
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Sema/Sema.h
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/Sema/SemaChecking.cpp
A clang/test/CodeGen/builtins-reduction-math.c
A clang/test/Sema/builtins-reduction-math.c
Log Message:
-----------
[Clang] Add min/max reduction builtins.
This patch implements __builtin_reduce_max and __builtin_reduce_min as
specified in D111529.
The order of operations does not matter for min or max reductions and
they can be directly lowered to the corresponding
llvm.vector.reduce.{fmin,fmax,umin,umax,smin,smax} intrinsic calls.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D112001
More information about the All-commits
mailing list