Skip to content
Snippets Groups Projects
Commit 6b1cf59e authored by Jennifer Schmitz's avatar Jennifer Schmitz
Browse files

SVE intrinsics: Fold constant operands for svmul.


This patch implements constant folding for svmul by calling
gimple_folder::fold_const_binary with tree_code MULT_EXPR.
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: default avatarJennifer Schmitz <jschmitz@nvidia.com>

gcc/
	* config/aarch64/aarch64-sve-builtins-base.cc (svmul_impl::fold):
	Try constant folding.

gcc/testsuite/
	* gcc.target/aarch64/sve/const_fold_mul_1.c: New test.
parent ee8b7231
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment