I'm having some problems in getting the Intel compiler to autovectorise one loop, giving an internal error.
I already refactored my code to be able to vectorize following the vectorization reports (thanks for such an amazing tool, btw).
However, with the newer versions (sadly I can not tell from which exactly... I can only say that it worked with intel/2017.4) the same code fails to compile with "internal error: 101004_111".
I have been able to isolate the problem and found a workaround. I have attached an example.
The problem seems to appear when, inside the loop to be vectorized, I do an inner loop and call a function as (3 iterations only):
function(..., array, ...) function(..., array, ...) function(..., array, ...)
for (int j=0; j<3; j++) function(..., array[j], ...)
Of course, if I disable optimizations, the loop is not vectorized and compiles succesfully.
I have attached the code to reproduce the problem:
icc -O3 -qopt-report=2 -DGETERROR test.c
Last tested with icc (ICC) 2021.3.0 20210609
It is not a critical problem because I found a workaround... but the first option should still work and I suspect that there may be a bug in the compiler.
Thanks for reaching out to us.
We could reproduce your issue using icc compiler.
We are working on it. We will get back to you soon.
Meanwhile, can you try using the icx compiler instead of icc.