This patch folds signed SVE division where all divisor elements are the same power of 2 to svasrd. Tests were added to check 1) whether the transform is applied, i.e. asrd is used, and 2) correctness for all possible input types for svdiv, predication, and a variety of values. As the transform is applied only to signed integers, correctness for predication and values was only tested for svint32_t and svint64_t. Existing svdiv tests were adjusted such that the divisor is no longer a power of 2.
The patch was bootstrapped and regtested on aarch64-linux-gnu, no regression. OK for mainline? Signed-off-by: Jennifer Schmitz <jschm...@nvidia.com> gcc/ * config/aarch64/aarch64-sve-builtins-base.cc (svdiv_impl): Implement fold and expand. gcc/testsuite/ * gcc.target/aarch64/sve/div_const_1.c: New test. * gcc.target/aarch64/sve/div_const_1_run.c: Likewise. * gcc.target/aarch64/sve/acle/asm/div_s32.c: Adjust expected output. * gcc.target/aarch64/sve/acle/asm/div_s64.c: Likewise.
0001-SVE-intrinsics-Add-strength-reduction-for-division-b.patch
Description: Binary data
smime.p7s
Description: S/MIME cryptographic signature