[llvm] [LAA] Be more precise on different store sizes (PR #122318)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 06:06:39 PDT 2025


artagnon wrote:

Thanks a lot for this clear framework!

> 1. **Theoretical overlap check (`areStridedAccessesIndependent`)**
>    They do not overlap and are safe to vectorise, but we can't determine it unless we know both sizes.

Yes, I reached the same conclusion.

> 3. **Backward dependence**
>    We only need the _source_ size to properly check when it runs into the sink buffer.

Agreed, and I reached the same conclusion.

> 2. **Forward dependence**
>    I am not sure how `couldPreventStoreLoadForward` should behave with different data sizes, but I feel like it should be _sink_ size? I don't know much about it :(

I think it should be the source size, because the distance between loads is what prevents ld->st forwarding, but I'm also not sure.

https://github.com/llvm/llvm-project/pull/122318


More information about the llvm-commits mailing list