It is wrong and useless, like GPT always is, but sounds intelligent to fool the ignorant.
The compiler can inline functions, but it is essential for it to do so. It does not adjust heuristics based on being in a loop.
Hence, manual intervention like `@inline` is often needed for non-trivial cases, such as `exp`.
`@simd` doesn't say vectotization is desired, which implies changing heuristics.
It adds flags to reduction variables to say it is legal to reassociate them. That does not help at all with indirect indexing. `@simd ivdep` does help by communicating it is legal to perform the loop iterations in parallel, meaning the legality checks are no longer required. The functions must still be inlined for it to succeed in generating vectorized code.
This inlining can help improve the chances of auto-vectorization. However, it is not a strict requirement for all function calls to be inline-able. The compiler will make decisions based on the specific code and the potential performance gains.
As for indirect indexing, it can indeed impact auto-vectorization in Julia. Indirect indexing can introduce data dependencies that make it difficult for the compiler to determine if vectorization is safe or beneficial. In such cases, using the @simd annotation can provide a hint to the compiler that vectorization is desired, but it is still up to the compiler to determine if it is possible and beneficial.