[PATCH] D119121: [test-suite] Add unit tests for vectorizer memory runtime checks.

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 03:04:19 PST 2022


xbolva00 added inline comments.


================
Comment at: SingleSource/UnitTests/Vectorizer/runtime-checks.cpp:211
+  {
+    auto ScalarFn = [](auto *A, auto *B, unsigned TC) {
+      unsigned j = 0;
----------------
```
template <int F>
int foo(int *d, int N) {
    int s = 0;
#pragma unroll F
    for (int i = 0; i < N; ++i) {
        s += d[i];
    }

    return s;
}

int p(int *d, int N) { return foo<2>(d, N); }
```


Maybe similar idea can be used here? or with _Pragma..


Repository:
  rT test-suite

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

https://reviews.llvm.org/D119121



More information about the llvm-commits mailing list