https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89984
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > The problem is here: > (define_insn_and_split "@xorsign<mode>3_1" > [(set (match_operand:MODEF 0 "register_operand" "=Yv") > (unspec:MODEF > [(match_operand:MODEF 1 "register_operand" "Yv") > (match_operand:MODEF 2 "register_operand" "0") > (match_operand:<ssevecmode> 3 "nonimmediate_operand" "Yvm")] > UNSPEC_XORSIGN))] > "SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH" > "#" > "&& reload_completed" > [(const_int 0)] > "ix86_split_xorsign (operands); DONE;") > > > for AVX operand 2 does not need to be the same as operand 0. > Shouldn't be a hard change for someone starting out to improve this. Right, The way copysign is defined is like this: (define_insn "@copysign<mode>3_var" [(set (match_operand:SSEMODEF 0 "register_operand" "=Yv,Yv,Yv,Yv,Yv") (unspec:SSEMODEF [(match_operand:SSEMODEF 2 "register_operand" "Yv,0,0,Yv,Yv") (match_operand:SSEMODEF 3 "register_operand" "1,1,Yv,1,Yv") (match_operand:<ssevecmodef> 4 "nonimmediate_operand" "X,Yvm,Yvm,0,0") (match_operand:<ssevecmodef> 5 "nonimmediate_operand" "0,Yvm,1,Yvm,1")] UNSPEC_COPYSIGN)) (clobber (match_scratch:<ssevecmodef> 1 "=Yv,Yv,Yv,Yv,Yv"))] "(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH) || (TARGET_SSE && (<MODE>mode == TFmode))" "#") I suspect xorsign should be improved similarlly.