https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113583
--- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> --- Ok I see. If we change NN into 8, then we can vectorize it with load_lanes/store_lanes with group size = 8: https://godbolt.org/z/doe9c3hfo We will use vlseg8e64 which is RVVM1DF[8] == RVVM1x8DFmode. Here there is report: /app/example.c:47:21: missed: no array mode for RVVM1DF[20] /app/example.c:47:21: missed: no array mode for RVVM1DF[20] I believe we enable vec_load_lanes/vec_store_lanes for RVVM1DF[20] which RVVM1x20DF mode, then we can vectorize it. But it's not reasonable and not general way to do that. This code require array size = 20. How about other codes, we may have codes require array size = 21, 22,.. 23, ....etc... The array size can be any number. We can't leverage this approach for infinite array size. So, the idea is that we try to find vec_load_lanes/vec_store_lanes first check whether it support lanes vectorization for specific array size. If not, we should be able to lower them into multiple gather/scatter or strided load/stores.