[PATCH] D110235: [LoopVectorize] Support reductions that store intermediary result
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 07:01:28 PDT 2022
david-arm accepted this revision.
david-arm added a comment.
LGTM! Thanks for addressing all the comments and fixing bugs, adding new tests, etc. I have a couple of nits you can address before merging. I think given that you've run the LLVM test suite without seeing failures and we know more loops are vectorising then that gives us a good level of confidence. :)
================
Comment at: llvm/test/Transforms/LoopVectorize/reduction-with-invariant-store.ll:256
+; int sum = 0;
+; for(int i=0; i < 1000; i+=2) {
+; sum += src[i];
----------------
nit: Should be i++, not i+=2.
================
Comment at: llvm/test/Transforms/LoopVectorize/reduction-with-invariant-store.ll:303
%iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body ]
- %sum = phi i32 [ 0, %entry ], [ %sum.1, %for.body ]
+ %sum = phi i32 [ 0, %entry ], [ %sum.2, %for.body ]
%arrayidx = getelementptr inbounds i32, i32* %src, i64 %iv
----------------
nit: Looks like an unnecessary change from %sum.1 -> %sum.2.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110235/new/
https://reviews.llvm.org/D110235
More information about the llvm-commits
mailing list