[SLP]Improve costs of vectorized loads/stores by analyzing GEPs.
When generating masked gathers nodes, SLP vectorizer accounts the cost of the GEPs for loads as part of the scalar-vector transformation cost estimation. But it does not do it for vectorized loads/stores, while it may completely remove some of the GEPs completely. Because of this in some cases masked gather operation can be much more profitable rather than regular vectorization (masked-gather cost + vector GEP - scalar loads + GEPs comparing to vectorized loads - scalar loads). Added the analysis of the removed scalarGEPs for vectorized load/store nodes for better cost estimation. Differential Revision: https://reviews.llvm.org/D135282
Loading
Please sign in to comment