We are going to support dynamic LMUL support. gcc/ChangeLog:
* config/riscv/riscv-opts.h (enum riscv_autovec_lmul_enum): Add dynamic enum. * config/riscv/riscv.opt: Add dynamic compile option. --- gcc/config/riscv/riscv-opts.h | 4 +++- gcc/config/riscv/riscv.opt | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h index 5ed69abd214..79e0f12e388 100644 --- a/gcc/config/riscv/riscv-opts.h +++ b/gcc/config/riscv/riscv-opts.h @@ -79,7 +79,9 @@ enum riscv_autovec_lmul_enum { RVV_M1 = 1, RVV_M2 = 2, RVV_M4 = 4, - RVV_M8 = 8 + RVV_M8 = 8, + /* For dynamic LMUL, we compare COST start with LMUL8. */ + RVV_DYNAMIC = RVV_M8 }; enum riscv_multilib_select_kind { diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt index d2407c3c502..eca0dda4dd5 100644 --- a/gcc/config/riscv/riscv.opt +++ b/gcc/config/riscv/riscv.opt @@ -311,6 +311,9 @@ Enum(riscv_autovec_lmul) String(m4) Value(RVV_M4) EnumValue Enum(riscv_autovec_lmul) String(m8) Value(RVV_M8) +EnumValue +Enum(riscv_autovec_lmul) String(dynamic) Value(RVV_DYNAMIC) + -param=riscv-autovec-lmul= Target RejectNegative Joined Enum(riscv_autovec_lmul) Var(riscv_autovec_lmul) Init(RVV_M1) -param=riscv-autovec-lmul=<string> Set the RVV LMUL of auto-vectorization in the RISC-V port. -- 2.36.3