https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123969

--- Comment #3 from Ilya Kurdyukov <jpegqs at gmail dot com> ---
#include <riscv_vector.h>

void test(int16_t *dst, long vl) {
  vuint16m1_t v6 = __riscv_vmv_v_x_u16m1(*dst, vl);
  vfloat32m2_t s0 = __riscv_vfmv_v_f_f32m2(0, vl);
  __riscv_vse16_v_u16m1(dst, v6, vl);
  __riscv_vse32_v_f32m2((float*)dst, s0, vl);
}

test:
        th.vsetvli      zero,a1,e32,m2
        th.vlse.v       v1,0(a0),zero
        th.vmv.v.i      v2,0
        th.vsetvli      zero,a1,e16,m1
        th.vse.v        v1,0(a0)
        th.vsetvli      zero,a1,e32,m2
        th.vse.v        v2,0(a0)
        ret

Reply via email to