aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2021-01-14 20:59:12 +0000
committerTamar Christina <tamar.christina@arm.com>2021-01-14 20:59:12 +0000
commit478e571a3eedfab198e48e8d2c8f02e491ba2c28 (patch)
tree6cfdd5a785e765e2ca1be2351b424757b73930ad /gcc/go
parent31fac31800b5671d17c46108013d6fc709370ef3 (diff)
downloadgcc-478e571a3eedfab198e48e8d2c8f02e491ba2c28.zip
gcc-478e571a3eedfab198e48e8d2c8f02e491ba2c28.tar.gz
gcc-478e571a3eedfab198e48e8d2c8f02e491ba2c28.tar.bz2
slp: support complex FMS and complex FMS conjugate
This adds support for FMS and FMS conjugated to the slp pattern matcher. Example of matches: #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]); } } 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_sub(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_FMS, COMPLEX_FMS_CONJ): New. * optabs.def (cmls_optab, cmls_conj_optab): New. * doc/md.texi: Document them. * tree-vect-slp-patterns.c (class complex_fms_pattern, complex_fms_pattern::matches, complex_fms_pattern::recognize, complex_fms_pattern::build): New.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions