aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src/std/algorithm/setops.d
diff options
context:
space:
mode:
authorAkram Ahmad <Akram.Ahmad@arm.com>2025-01-17 17:43:49 +0000
committerTamar Christina <tamar.christina@arm.com>2025-01-18 11:14:59 +0000
commitaa361611490947eb228e5b625a3f0f23ff647dbd (patch)
tree81ffc2295b1b68ac0e2e5b374dbc93e48ecde1ab /libphobos/src/std/algorithm/setops.d
parent8f8ca83f2f6f165c4060ee1fc18ed3c74571ab7a (diff)
downloadgcc-aa361611490947eb228e5b625a3f0f23ff647dbd.zip
gcc-aa361611490947eb228e5b625a3f0f23ff647dbd.tar.gz
gcc-aa361611490947eb228e5b625a3f0f23ff647dbd.tar.bz2
AArch64: Use standard names for saturating arithmetic
This renames the existing {s,u}q{add,sub} instructions to use the standard names {s,u}s{add,sub}3 which are used by IFN_SAT_ADD and IFN_SAT_SUB. The NEON intrinsics for saturating arithmetic and their corresponding builtins are changed to use these standard names too. Using the standard names for the instructions causes 32 and 64-bit unsigned scalar saturating arithmetic to use the NEON instructions, resulting in an additional (and inefficient) FMOV to be generated when the original operands are in GP registers. This patch therefore also restores the original behaviour of using the adds/subs instructions in this circumstance. Additional tests are written for the scalar and Adv. SIMD cases to ensure that the correct instructions are used. The NEON intrinsics are already tested elsewhere. gcc/ChangeLog: * config/aarch64/aarch64-builtins.cc: Expand iterators. * config/aarch64/aarch64-simd-builtins.def: Use standard names * config/aarch64/aarch64-simd.md: Use standard names, split insn definitions on signedness of operator and type of operands. * config/aarch64/arm_neon.h: Use standard builtin names. * config/aarch64/iterators.md: Add VSDQ_I_QI_HI iterator to simplify splitting of insn for unsigned scalar arithmetic. gcc/testsuite/ChangeLog: * gcc.target/aarch64/scalar_intrinsics.c: Update testcases. * gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect.inc: Template file for unsigned vector saturating arithmetic tests. * gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_1.c: 8-bit vector type tests. * gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_2.c: 16-bit vector type tests. * gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_3.c: 32-bit vector type tests. * gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_autovect_4.c: 64-bit vector type tests. * gcc.target/aarch64/saturating_arithmetic.inc: Template file for scalar saturating arithmetic tests. * gcc.target/aarch64/saturating_arithmetic_1.c: 8-bit tests. * gcc.target/aarch64/saturating_arithmetic_2.c: 16-bit tests. * gcc.target/aarch64/saturating_arithmetic_3.c: 32-bit tests. * gcc.target/aarch64/saturating_arithmetic_4.c: 64-bit tests. Co-authored-by: Tamar Christina <tamar.christina@arm.com>
Diffstat (limited to 'libphobos/src/std/algorithm/setops.d')
0 files changed, 0 insertions, 0 deletions