Ideally, LMUL should be dynamically picked by compiler according to the user codes.
However, GCC doesn't support it yet and it's not a easy feature to be supported in the future. My plan is that we let LMUL picked statically according to compile option and we fully support and test LMUL = 1/2/4/8 so far. Then we can support the feature of picking LMUL during auto-vectorization in the future when we figure out how to do that. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-04-25 14:00 To: juzhe.zhong; gcc-patches CC: kito.cheng; palmer Subject: Re: [PATCH] RISC-V: Add RVV auto-vectorization compile option On 4/6/23 19:21, juzhe.zh...@rivai.ai wrote: > From: Juzhe-Zhong <juzhe.zh...@rivai.ai> > > The next patch to enable basic RVV auto-vectorization of > VLA auto-vectorization (RVV_SCALABLE) and fixed-length VLS auto-vectorization > (RVV_FIXED_VLMAX). > > We will support RVV_FIXED_VLMIN in the future. > > gcc/ChangeLog: > > * config/riscv/riscv-opts.h (enum riscv_autovec_preference_enum): > Add RVV auto-vectorization compile option. > (enum riscv_autovec_lmul_enum): Ditto. > * config/riscv/riscv.opt: Ditto. No real objection here. Just a question. What's the rationale behind exposing lmul settings to the user? I'd think that should largely be compiler managed. But maybe I'm missing something. jeff