https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110897
--- Comment #9 from JuzheZhong <juzhe.zhong at rivai dot ai> --- The name is correct, since the same pattern works for uint32 but fail to work for uint16 I checked the build file: CODE_FOR_vlshrrvvm1hi3 = 10350, >> Well, that means we do not have a vector mode for HImode elements?! We have vector mode for HImode. You can see CODE_FOR_vlshrrvvm1hi3, the "rvvm1hi" is vector HImode. Consider this following case: #define TEST2_TYPE(TYPE) \ __attribute__((noipa)) \ void vshiftr_##TYPE (TYPE *dst, TYPE *a, TYPE *b, int n) \ { \ for (int i = 0; i < n; i++) \ dst[i] = (a[i]) >> b[i]; \ } #define TEST_ALL() \ TEST2_TYPE(uint32_t) \ TEST2_TYPE(uint16_t) \ TEST_ALL() rvv.c:15:1: missed: statement clobbers memory: vect__4.9_52 = .MASK_LEN_LOAD (vectp_a.7_50, 32B, { -1, ... }, _65, 0); rvv.c:15:1: missed: statement clobbers memory: vect__6.12_56 = .MASK_LEN_LOAD (vectp_b.10_54, 32B, { -1, ... }, _65, 0); rvv.c:15:1: missed: statement clobbers memory: .MASK_LEN_STORE (vectp_dst.14_59, 32B, { -1, ... }, _65, 0, vect__8.13_57); rvv.c:15:1: missed: couldn't vectorize loop rvv.c:15:1: missed: not vectorized: no vectype for stmt: _4 = *_3; scalar_type: uint16_t uint32_t can vectorize but uint16_t fail, we have defined both vector SImode and HImode for "vlshr$a3" optab. I seems that we must support widen shift pattern in RISCV port even though we don't have widen shift instructions ?