https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113913
Bug ID: 113913
Summary: [14] RISC-V: suboptimal code gen for intrinsic vcreate
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ewlu at rivosinc dot com
Target Milestone: ---
godbolt: https://godbolt.org/z/svPsddaTd
Functions like
vfloat16m2_t
test_vcreate_v_f16m1_f16m2 (vfloat16m1_t v0, vfloat16m1_t v1)
{
return __riscv_vcreate_v_f16m1_f16m2 (v0, v1);
}
are generating code like
test_vcreate_v_f16m1_f16m2:
vmv1r.v v11,v8
vmv1r.v v10,v9
vmv1r.v v8,v11
vmv1r.v v9,v10
ret
which should be optimized away into a nop like later functions in the testcase
test_vcreate_v_i64m2_i64m8:
ret