https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87555
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
> (define_mode_attr addsub_cst [(V4DF "5") (V2DF "1")
> (V4SF "5") (V8SF "85")])
> (define_insn "*fma_fmaddsub_<mode>"
> [(set (match_operand:VF_128_256 0 "register_operand" "=v,v,v,x,x")
> (vec_merge:VF_128_256
> (fma:VF_128_256
> (match_operand:VF_128_256 1 "nonimmediate_operand" "%0,0,v,x,x")
> (match_operand:VF_128_256 2 "nonimmediate_operand" "vm,v,vm,x,m")
> (match_operand:VF_128_256 3 "nonimmediate_operand" "v,vm,0,xm,x"))
> (fma:VF_128_256
> (match_dup 1)
> (match_dup 2)
> (neg:VF_128_256 (match_dup 3))
> (const_int <addsub_cst>)))]
Should be bellow, addsub means add in the highpart
(define_insn "*fma_fmaddsub_<mode>"
[(set (match_operand:VF_128_256 0 "register_operand" "=v,v,v,x,x")
(vec_merge:VF_128_256
(fma:VF_128_256
(match_operand:VF_128_256 1 "nonimmediate_operand" "%0,0,v,x,x")
(match_operand:VF_128_256 2 "nonimmediate_operand" "vm,v,vm,x,m")
(neg:VF_128_256 (match_operand:VF_128_256 3 "nonimmediate_operand"
"v,vm,0,xm,x"))
(fma:VF_128_256
(match_dup 1)
(match_dup 2)
(match_dup 3))
(const_int <addsub_cst>)))]
"TARGET_FMA || TARGET_FMA4"