[PATCH] D106646: [LoopVectorize] Don't interleave scalar ordered reductions for inner loops
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 07:07:42 PDT 2021
david-arm added inline comments.
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd-vf1.ll:6
+
+; CHECK-DEBUG: LV: Not interleaving scalar ordered reductions.
+
----------------
sdesmalen wrote:
> This `REQUIRES: asserts` ?
Thanks, good spot @sdesmalen!
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd-vf1.ll:15
+ %0 = shl nuw i64 %M, 2
+ call void @llvm.memset.p0i8.i64(i8* align 4 %dst27, i8 0, i64 %0, i1 false)
+ br label %for.body.us
----------------
sdesmalen wrote:
> is this needed for the test?
Probably not. It arises from the IR generated for the following C code where `dst[i]` is being initialised with memset:
```void foo(float *dst, float *src, int N) {
for (int i = 0; i < N; i++) {
dst[i] = 0.0;
for (int j = 0; j < N; j++) {
dst[i] += src[(i * N) + j];
}
}
}```
Without the memset we're just adding to the initial value for `dst[i]`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106646/new/
https://reviews.llvm.org/D106646
More information about the llvm-commits
mailing list