[PATCH] D117829: [Clang] Add integer add/mul reduction builtins
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 20 12:20:48 PST 2022
RKSimon created this revision.
RKSimon added reviewers: fhahn, scanon, aaron.ballman, craig.topper.
RKSimon requested review of this revision.
Herald added a project: clang.
Similar to the existing bitwise reduction builtins, these are lowered to the llvm.vector.reduce.add/mul intrinsic calls.
For other reductions, we've tried to share builtins for float/integer vectors, but the fadd/fmul reduction builtins also take a starting value argument. Technically I could support float by using default values, but we're probably better off with specific fadd/fmul reduction builtins for both arguments.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117829
Files:
clang/include/clang/Basic/Builtins.def
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/builtins-reduction-math.c
clang/test/Sema/builtins-reduction-math.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117829.401740.patch
Type: text/x-patch
Size: 6152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220120/9789a718/attachment-0001.bin>
More information about the cfe-commits
mailing list