[PATCH] D111294: [LoopVectorize] Classify pointer induction updates as scalar only if they have one use
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 07:29:07 PDT 2021
fhahn accepted this revision.
fhahn added a comment.
LGTM, thanks for the update. I added a few more tiny suggestions to slightly improve readability of the test case that would be good to include.
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll:151
+entry:
+ %buffer.start = getelementptr inbounds [64 x i8], [64 x i8]* %buffer, i64 0, i64 0
+ %add.ptr.i = getelementptr inbounds [64 x i8], [64 x i8]* %buffer, i64 64, i64 64
----------------
nit: could just use a `i8* %start` argument instead of `[64 x i8]`?
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll:152
+ %buffer.start = getelementptr inbounds [64 x i8], [64 x i8]* %buffer, i64 0, i64 0
+ %add.ptr.i = getelementptr inbounds [64 x i8], [64 x i8]* %buffer, i64 64, i64 64
+ br label %for.body
----------------
nit: unused pointer?
================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll:156
+for.body:
+ %first.sroa = phi i8* [ %incdec.ptr, %for.body ], [ %buffer.start, %entry ]
+ %index = phi i64 [ %index_nxt, %for.body ], [ 0, %entry ]
----------------
nit: might be good to drop the `.sroa` prefix, perhaps just something like `%ptr.phi` or something and then `%ptr.phi.next` instead of `%incdec.ptr`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111294/new/
https://reviews.llvm.org/D111294
More information about the llvm-commits
mailing list