diff options
author | Tamar Christina <tamar.christina@arm.com> | 2021-01-14 20:57:17 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2021-01-14 20:57:17 +0000 |
commit | e09173d84dabd186ad2463f47350c1bcabfeab8f (patch) | |
tree | 8b76954fcb2ae4aed721b553fe421f2b7eb8d982 /gcc/go | |
parent | 500600c78408ab4c6450c7eeaea2e3657e305ed2 (diff) | |
download | gcc-e09173d84dabd186ad2463f47350c1bcabfeab8f.zip gcc-e09173d84dabd186ad2463f47350c1bcabfeab8f.tar.gz gcc-e09173d84dabd186ad2463f47350c1bcabfeab8f.tar.bz2 |
slp: support complex multiply and complex multiply conjugate
This adds support for complex multiply and complex multiply and accumulate to
the vect pattern detector.
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);
}
}
gcc/ChangeLog:
* internal-fn.def (COMPLEX_MUL, COMPLEX_MUL_CONJ): New.
* optabs.def (cmul_optab, cmul_conj_optab): New.
* doc/md.texi: Document them.
* tree-vect-slp-patterns.c (vect_match_call_complex_mla,
vect_normalize_conj_loc, is_eq_or_top, vect_validate_multiplication,
vect_build_combine_node, class complex_mul_pattern,
complex_mul_pattern::matches, complex_mul_pattern::recognize,
complex_mul_pattern::build): New.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions