https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113281
--- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> --- I think there are 2 issues here: 1. We should adjust cost model to let loop vectorizer eliminate the unprofitable vectorization. It should be done in RISC-V backend. 2. We should fix run fail bug with -fno-vect-cost-model. I think 1st issue is simpler than second one. And I highly doubt that the second one is not RISC-V bug is middle-end bug.