Hi All, This is a respin of the patch using the new approach. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * doc/md.texi: Document optabs. * internal-fn.def (COMPLEX_FMA, COMPLEX_FMA_CONJ, COMPLEX_FMS, COMPLEX_FMS_CONJ): New. * optabs.def (cmla_optab, cmla_conj_optab, cmls_optab, cmls_conj_optab): New. * tree-vect-slp-patterns.c (class complex_fma_pattern, complex_fma_pattern::matches): New. (slp_patterns): Add complex_fma_pattern. > -----Original Message----- > From: Gcc-patches On Behalf Of Tamar > Christina > Sent: Friday, September 25, 2020 3:30 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; rguenther@suse.de; ook@ucw.cz > Subject: [PATCH v2 8/16]middle-end: add Complex Multiply and > Accumulate/Subtract and Multiply and Accumulate/Subtract with Conjucate > detection > > Hi All, > > This patch adds pattern detections for the following operation: > > Complex FMLA, Conjucate FMLA of the second parameter and FMLS. > > c += a * b, c += a * conj (b), c -= a * b and c -= a * conj (b) > > For the conjucate cases it supports under fast-math that the operands that > is > being conjucated be flipped by flipping the arguments to the optab. This > allows it to support c = conj (a) * b and c += conj (a) * b. > > where a, b and c are complex numbers. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > > * doc/md.texi: Document optabs. > * internal-fn.def (COMPLEX_FMA, COMPLEX_FMA_CONJ, > COMPLEX_FMS, > COMPLEX_FMS_CONJ): New. > * optabs.def (cmla_optab, cmla_conj_optab, cmls_optab, > cmls_conj_optab): > New. > * tree-vect-slp-patterns.c (class ComplexFMAPattern): New. > (slp_patterns): Add ComplexFMAPattern. > > --