[all-commits] [llvm/llvm-project] bd07c2: [Clang] Add support for scalable vectors in __buil...
Lawrence Benson via All-commits
all-commits at lists.llvm.org
Mon Apr 29 07:45:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bd07c22e5372789c3eb47b9009029d5e99e0ef9f
https://github.com/llvm/llvm-project/commit/bd07c22e5372789c3eb47b9009029d5e99e0ef9f
Author: Lawrence Benson <github at lawben.com>
Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths:
M clang/docs/LanguageExtensions.rst
M clang/docs/ReleaseNotes.rst
M clang/include/clang/AST/Type.h
M clang/lib/AST/Type.cpp
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/Sema/SemaChecking.cpp
M clang/test/CodeGen/builtins-reduction-math.c
Log Message:
-----------
[Clang] Add support for scalable vectors in __builtin_reduce_* functions (#87750)
Currently, a lot of `__builtin_reduce_*` function do not support
scalable vectors, i.e., ARM SVE and RISCV V. This PR adds support for
them. The main code change is to use a different path to extract the
type from the vectors, the rest is the same and LLVM supports the reduce
functions for `vscale` vectors.
This PR adds scalable vector support for:
- `__builtin_reduce_add`
- `__builtin_reduce_mul`
- `__builtin_reduce_xor`
- `__builtin_reduce_or`
- `__builtin_reduce_and`
- `__builtin_reduce_min`
- `__builtin_reduce_max`
Note: For all except `min/max`, the element type must still be an
integer value. Adding floating point support for `add` and `mul` is
still an open TODO.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list