[PATCH] D150706: [LAA] Update MaxSafeDepDistBytes when non-unit stride

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 09:03:15 PDT 2023


michaelmaitland added a comment.

> I think with respect to MaxSafeDepDistBytes it is still not clear to me that the current value is incorrect, as it is just the distance computed between 2 dependencies and in the test the distance between %arrayidx2 and %%arrayidx5 is 24 bytes AFAICT.

It is not `just the distance computed between 2 dependencies`. It is the `number of bytes we can access in parallel safely`, according to the docstring of `MaxSafeDepDistBytes`. I do not think that it would be safe to vectorize this access 24 bytes at a time. I only think it is safe to vectorize this access 8 bytes at a time.

> We are accessing i32 types, so in 2 iterations we would access 64 bits.

8 bytes is 64 bits, so I think this change is correctly calculating what we need. Otherwise, 24 bytes is 192 bits, which I think is unsafe.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150706/new/

https://reviews.llvm.org/D150706



More information about the llvm-commits mailing list