https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116685
--- Comment #3 from Edwin Lu <ewlu at rivosinc dot com> --- (In reply to Andrew Pinski from comment #1) > -fno-vect-cost-model fixes some of these. I hadn't taken a look with -fno-vect-cost-model until now but it seems like there's some weird codegen with the 3 element dot products dotDbl_3d(GenericVector3d<double> const&, GenericVector3d<double> const&): fld fa5,16(a0) fld fa4,16(a1) vsetivli zero,2,e64,m1,ta,ma vfmv.v.f v1,fa5 vfmv.v.f v2,fa4 <-- why not vector load? fld fa5,0(a0) fld fa4,0(a1) vmv.s.x v3,zero vfslide1down.vf v1,v1,fa5 vfslide1down.vf v2,v2,fa4 fld fa0,8(a0) fld fa4,8(a1) vfmul.vv v1,v1,v2 vfredusum.vs v1,v1,v3 vfmv.f.s fa5,v1 fmadd.d fa0,fa0,fa4,fa5 ret