diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-02-08 11:21:46 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-02-08 11:22:01 +0000 |
commit | c00db971597557e952901eac4be131157d1d5eb9 (patch) | |
tree | 451f4ab434c80bc5106616f30e8e27c78b25d2ba /llvm/unittests/Support/MathExtrasTest.cpp | |
parent | 95b8a3e52050d68ca5e8f6f8d1b810f6c23b4cea (diff) | |
download | llvm-c00db971597557e952901eac4be131157d1d5eb9.zip llvm-c00db971597557e952901eac4be131157d1d5eb9.tar.gz llvm-c00db971597557e952901eac4be131157d1d5eb9.tar.bz2 |
[Clang] Add elementwise saturated add/sub builtins
This patch implements `__builtin_elementwise_add_sat` and `__builtin_elementwise_sub_sat` builtins.
These map to the add/sub saturated math intrinsics described here:
https://llvm.org/docs/LangRef.html#saturation-arithmetic-intrinsics
With this in place we should then be able to replace the x86 SSE adds/subs intrinsics with these generic variants - it looks like other targets should be able to use these as well (arm/aarch64/webassembly all have similar examples in cgbuiltin).
Differential Revision: https://reviews.llvm.org/D117898
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
0 files changed, 0 insertions, 0 deletions