https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111720
--- Comment #9 from JuzheZhong <juzhe.zhong at rivai dot ai> --- (In reply to Andrew Pinski from comment #7) > . Besides, if we remove the data initialization: https://godbolt.org/z/qcjcP7s1c #include<riscv_vector.h> vuint8m1_t fn() { uint8_t arr[32]; uint8_t m = 1; vuint8m1_t varr = __riscv_vle8_v_u8m1(arr, 32); vuint8m1_t vand_m = __riscv_vand_vx_u8m1(varr, m, 32); //vbool8_t vmask = __riscv_vreinterpret_v_u8m1_b8(vand_m); return vand_m; } The issue is gone: fn: addi sp,sp,-32 li a5,32 vsetvli zero,a5,e8,m1,ta,ma vle8.v v24,0(sp) vand.vi v24,v24,1 vs1r.v v24,0(a0) addi sp,sp,32 jr ra The codegen as good as LLVM. I still think it is something like constant memory pool issue.