As a result of some identified potential predicate operation optimisations:
A 'fold' method has been created for 'svbrk_unary_impl' to include some new folding cases and the 'expand' method was amended for 'svpfirst_svpnext_impl' to optimise a specific case. In the case of both intrinsics there are opportunities to fold them to either 'ptrue' or 'pfalse', lowering overall instruction count. Testcase expanded for 'brk*' intructions and new testsuite added for 'pfirst' to cover and check all of the newly introduced behaviour. The 'pfirst' tests include test cases which verify that the flag setting behaviour expected from this operation is still valid, since in some cases where it is not needed the flags are not set as a result of folding. Dylan Rees (1): aarch64: Improve pfirst and brk* intrinsic folding .../aarch64/aarch64-sve-builtins-base.cc | 29 +++ .../aarch64/sve/acle/general/pfirst_2.c | 67 +++++++ .../gcc.target/aarch64/sve/pr121604_brk.c | 169 ++++++++++++++++-- 3 files changed, 255 insertions(+), 10 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pfirst_2.c -- 2.43.0
