aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2021-01-14 20:58:12 +0000
committerTamar Christina <tamar.christina@arm.com>2021-01-14 20:58:12 +0000
commit31fac31800b5671d17c46108013d6fc709370ef3 (patch)
treed98e36d4c883b57648f26c48e77234096a8624aa /gcc/go
parente09173d84dabd186ad2463f47350c1bcabfeab8f (diff)
downloadgcc-31fac31800b5671d17c46108013d6fc709370ef3.zip
gcc-31fac31800b5671d17c46108013d6fc709370ef3.tar.gz
gcc-31fac31800b5671d17c46108013d6fc709370ef3.tar.bz2
slp: support complex FMA and complex FMA conjugate
This adds support for FMA and FMA conjugated to the slp pattern matcher. Example of instructions matched: #include <stdio.h> #include <complex.h> #define N 200 #define ROT #define TYPE float #define TYPE2 float void g (TYPE2 complex a[restrict N], TYPE complex b[restrict N], TYPE complex c[restrict N]) { for (int i=0; i < N; i++) { c[i] += a[i] * (b[i] ROT); } } void g_f1 (TYPE2 complex a[restrict N], TYPE complex b[restrict N], TYPE complex c[restrict N]) { for (int i=0; i < N; i++) { c[i] += conjf (a[i]) * (b[i] ROT); } } void g_s1 (TYPE2 complex a[restrict N], TYPE complex b[restrict N], TYPE complex c[restrict N]) { for (int i=0; i < N; i++) { c[i] += a[i] * conjf (b[i] ROT); } } void caxpy_add(double complex * restrict y, double complex * restrict x, size_t N, double complex f) { for (size_t i = 0; i < N; ++i) y[i] += x[i]* f; } gcc/ChangeLog: * internal-fn.def (COMPLEX_FMA, COMPLEX_FMA_CONJ): New. * optabs.def (cmla_optab, cmla_conj_optab): New. * doc/md.texi: Document them. * tree-vect-slp-patterns.c (vect_match_call_p, class complex_fma_pattern, vect_slp_reset_pattern, complex_fma_pattern::matches, complex_fma_pattern::recognize, complex_fma_pattern::build): New.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions