[PATCH] D154075: [LoopVectorize] Add pre-commit tests for D152366

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 07:02:38 PDT 2023


david-arm added a comment.

In D154075#4531095 <https://reviews.llvm.org/D154075#4531095>, @fhahn wrote:

> Taking another look, I think we need a few more tests for cases not covered by the current tests:



> - inner and outer induction incremented by non-constant

I've added the other tests you suggested, but I'm not sure of the value of having tests for non-constant IV increments. For the inner loop a non-constant IV increment will lead to SCEV checks to ensure we only enter the vector loop if the stride is 1, in which case it's going to be a constant anyway. For the outer loop the tests already have outer loop non-constant memory access strides, i.e. tests like this:

  for (int i = m - 1; i >= 0; i--) {
    for (int j = 0; j <= n; j++) {
      dst[(i * stride1) + j] += src[(i * stride2) + j];
   }

where the stride for the outer loop is `stride1` so by making the outer IV increment non-constant all I'm doing is transforming an already unknown stride into another unknown stride, unless I'm missing something?


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

https://reviews.llvm.org/D154075



More information about the llvm-commits mailing list