https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111037
Bug ID: 111037 Summary: RISC-V: Invalid vsetvli fusion Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: kito at gcc dot gnu.org CC: juzhe.zhong at rivai dot ai Target Milestone: --- Target: riscv64 Reduced case: ``` #include <riscv_vector.h> void foo(_Float16 y, int64_t *i64p) { vint64m1_t vx =__riscv_vle64_v_i64m1 (i64p, 1); vx = __riscv_vadd_vv_i64m1 (vx, vx, 1); vfloat16m1_t vy =__riscv_vfmv_s_f_f16m1 (y, 1); asm volatile ("# use %0 %1" : : "vr"(vx), "vr" (vy)); } ``` Command to reproduce: $ riscv64-unknown-elf-gcc -O3 -march=rv64gczve64f_zvfh foo: vsetivli zero,1,e64,m1,ta,ma vle64.v v1,0(a0) vfmv.s.f v2,fa0 # Will raise illegal instruction here, because we don't have F64 for vector vadd.vv v1,v1,v1 ret