[PATCH] D151448: [LoopLoadElimination] Add support for stride equal to -1

Igor Kirillov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 07:30:07 PDT 2023


igor.kirillov added a comment.

This patch aids in eliminating load within a complex loop in the benchmark. The GVN LoadPRE is unable to accomplish as the case is too difficult for it. A simplified example demonstrating this loop in the benchmark would be as follows:

  void f(double *U, long long i, long long n) {
    #pragma clang loop vectorize(disable) unroll(disable)
    for (long long k = n; k > 0; --k)
      U[i * n + k] = U[i * n + k + 1];
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151448



More information about the llvm-commits mailing list