This patch implements constant folding for svmul. If the predicate is ptrue or predication is _x, it uses vector_const_binop with aarch64_const_binop as callback and tree_code MULT_EXPR to fold constant integer operands. Tests were added to check the produced assembly for different predicates, signed and unsigned integers, and the svmul_n_* case.
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 (svmul_impl::fold): Implement and try constant folding. gcc/testsuite/ * gcc.target/aarch64/sve/const_fold_mul_1.c: New test.
0003-SVE-intrinsics-Fold-constant-operands-for-svmul.patch
Description: Binary data
smime.p7s
Description: S/MIME cryptographic signature