https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123969
--- Comment #7 from Ilya Kurdyukov <jpegqs at gmail dot com> ---
Maybe this will be better:
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);
__asm__ __volatile__ ("" :: "vr" (v6), "vr" (s0));
}
/* { dg-final { scan-assembler-times "th.vsetvli\tzero,a1,e16,m1" 1 } } */
/* { dg-final { scan-assembler-times "th.vsetvli\tzero,a1,e32,m2" 1 } } */
