https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122601
--- Comment #2 from Igor Shevlyakov <igor at tachyum dot com> ---
I have an unpublished port which implemented cmls<mode>4 expander.
Then I ran complex-operations-run.c and it reported error on fma180.
Here is cut portion this is just fma180:
---
#include <complex.h>
#define N 8
#define TYPE double
__attribute__((noinline,noipa))
void fma180(TYPE 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] * I * I;
}
---
If you notice, I*I is "-" to it's really C-A*B => CNMA and not CMLS
Here is snipped to .expand pass log to show that COMPLEX_FMS is expected by
vectorizer:
---
;; Function fma180 (fma180, funcdef_no=0, decl_uid=11330, cgraph_uid=1,
symbol_order=0)
__attribute__((noipa, noinline, noclone, no_icf))
__attribute__((access ("^0[8]^1[8]^2[8]", )))
void fma180 (complex double * restrict a, complex double * restrict b, complex
double * restrict c)
{
vector(16) double vect_slp_patt_67.13;
vector(16) double vect__35.12;
vector(16) double vect__25.9;
vector(16) double vect__16.6;
;; basic block 2, loop depth 0
;; pred: ENTRY
vect__16.6_62 = MEM <vector(16) double> [(double *)a_18(D)];
vect__25.9_59 = MEM <vector(16) double> [(double *)b_19(D)];
vect__35.12_56 = MEM <vector(16) double> [(double *)c_21(D)];
vect_slp_patt_67.13_55 = .COMPLEX_FMS (vect__16.6_62, vect__25.9_59,
vect__35.12_56);
MEM <vector(16) double> [(double *)c_21(D)] = vect_slp_patt_67.13_55;
return;
;; succ: EXIT
}