This code
void foo(float * restrict a, float * restrict b, float * restrict c, unsigned n) { for (unsigned i = 0; i < n; ++i) c[i] = a[i] * b[i]; }
was compiled with "-march=knl" but used only %ymm registers.
With my fix applied the generated code will use %zmm registers as it should be.
You could remove the no capture and readonly attributes. They are not needed for this test case.
I am also surprised that llvm accepts dangling function attributes ("#0”) but it does :).