On 2/25/24 21:53, Greg McGary wrote:
Add option -m(no-)autovec-segment to enable/disable autovectorizer
from emitting vector segment load/store instructions. This is useful for
performance experiments.

gcc/ChangeLog:
        * config/riscv/autovec.md (vec_mask_len_load_lanes, 
vec_mask_len_store_lanes):
          Predicate with TARGET_VECTOR_AUTOVEC_SEGMENT
        * gcc/config/riscv/riscv-opts.h (TARGET_VECTOR_AUTOVEC_SEGMENT): New 
macro.
        * gcc/config/riscv/riscv.opt (-m(no-)autovec-segment): New option.
        * gcc/tree-vect-stmts.cc (gcc/tree-vect-stmts.cc): Prevent 
divide-by-zero.
        * testsuite/gcc.target/riscv/rvv/autovec/struct/*_noseg*.c,
        testsuite/gcc.target/riscv/rvv/autovec/no-segment.c: New tests.
I don't mind having options to do this kind of selection (we've done similar things internally for other RVV features). But I don't think now is the time to be introducing this stuff. We're in stage4 of the development cycle after all.

jeff

Reply via email to