> On Fri, Dec 12, 2025 at 12:10 AM Robin Dapp <[email protected]> wrote: >> >> > Could you provide testcase to verified select_vl begin generated for VLS >> > mode? >> > I can't found testcase, I tried param-autovec-mode.c >> > and select_vl-2.c (with --param=riscv-autovec-mode=V4QI) >> > and both cases are generated MIN_EXPR rather than SELECT_VL. >> >> Really? I thought it would trigger in param-autovec-mode but haven't >> verified >> the code-gen. I mean it's not terribly common, just for VLS epilogue loops. >> But yes, I'll add a more specific test. > > Oh, I found that is because I didn't add ZBB into -march when I was > testing, but that also indicates a fun fact is...GCC will just use > MIN_EXPR if the select_VL pattern is not available.
Yes, that's the default "len" codegen, two (or more) minimums. So if we have a "min" select_vl doesn't make the code much better. It's just that we need vsetvl anyway for vtype setting. -- Regards Robin
