https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393
--- Comment #2 from Mikael Slevinsky <mrslevinsky at hotmail dot com> ---
I'm not so sure. Consider the following minimal test file:
#include <stdlib.h>
#include <stdio.h>
int main(void) {
double * X, * Y, * Z;
X = (double *) calloc(8, sizeof(double));
Y = (double *) calloc(8, sizeof(double));
Z = (double *) calloc(8, sizeof(double));
for (int i = 0; i < 8; i++) {
X[i] = (double) i;
Y[i] = ((double) i)*((double) 2*i+1);
}
for (int i = 0; i < 8; i++)
Z[i] = X[i] + Y[i];
printf("\n");
for (int i = 0; i < 8; i++) {
printf("%1.2e ", Z[i]);
}
printf("\n");
return 0;
}
If I call it `testavx512.c`, then AVX512-like assembly is created, but it
errors when trying to create an executable:
dhcp-10-45-0-78:FastTransforms mikael$ gcc-8 -S -O3 -mavx512f testavx512.c -o
testavx512.s
dhcp-10-45-0-78:FastTransforms mikael$ gcc-8 -O3 -mavx512f testavx512.c -o
testavx512
/var/folders/dy/wbvgp8656tg6kwtz8sx_9z_m0000gn/T//cchgQrNi.s:45:2: error:
instruction requires: AVX-512 ISA
vmovupd 0(%r13), %zmm0
^
/var/folders/dy/wbvgp8656tg6kwtz8sx_9z_m0000gn/T//cchgQrNi.s:46:2: error:
instruction requires: AVX-512 ISA
vaddpd (%r12), %zmm0, %zmm0
^
/var/folders/dy/wbvgp8656tg6kwtz8sx_9z_m0000gn/T//cchgQrNi.s:47:2: error:
instruction requires: AVX-512 ISA
vmovupd %zmm0, (%rax)
^