Vectorization on Data Depency

If you try to calculate the sum of the array as straightforwardly as possible, then code is vectorized, but the data depency is not gone.

Where can you read about heuristics or logic related to this? I find it quite interesting. But trying to read Passes without any information where to look is not that easy.

New in the community, maybe I can read some updates on IR/Optimizations somewhere?

This pattern is referred to in LLVM (and in some academic literature) as a “reduction”.

Reduction is a large topic. I am interested specifically in data depency reductions. Any advices where can I learn about them? =)

Try https://arxiv.org/pdf/1505.07716 .