[PATCH] D50644: [WIP] [LAA] Allow runtime checks when strides different but address space does not wrap around

silviu.baranga@arm.com via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 08:13:30 PDT 2018


sbaranga added a comment.

Hi Anna,

If the distance between the source and the sink is loop invariant, how can these have different strides (unless they are also loop invariant)? Could you give an example?

Thanks,
Silviu



================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1473
+    // Given StrideAPtr and StrideBPtr exists, we know the pointer arithmetic
+    // does not wrap. Even if they are not the same stride, if the distance
+    // between source and sink is constant wrt the loop, then let us try with
----------------
Not sure that we can rely on pointer arithmetic not wrapping, but getPtrStride should already version the loop to make sure that pointer wrapping doesn't happen.


Repository:
  rL LLVM

https://reviews.llvm.org/D50644





More information about the llvm-commits mailing list