https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117804
--- Comment #1 from Robin Dapp <rdapp at gcc dot gnu.org> --- The problem is that at combine-time we don't know the range of cA, cB etc anymore so we can't just combine those to the two-operand widening pattern. I have a local patch that introduces a widening FMA operation at gimple-level (we wanted to do this anyway for more of our widening ops). Once this is in place, I just used a match.pd pattern that can access range information in order to combine a single operand widening .FMA and the other operand with range information into a WIDEN_FMA. This is how it looks like locally: .L5: vsetvli a5,a2,e8,mf2,ta,ma vle8.v v4,0(t4) vle8.v v3,0(t3) vmv1r.v v1,v2 vwmaccu.vv v1,v4,v8 vle8.v v4,0(t5) vwmaccu.vv v1,v3,v7 vle8.v v3,0(t1) vwmaccu.vv v1,v4,v6 vwmaccu.vv v1,v3,v5 vnsrl.wi v1,v1,6 vse8.v v1,0(a4)