[PATCH] D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 15 07:00:23 PDT 2020
bmahjour added inline comments.
================
Comment at: llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1-scalar.ll:17
+; CHECK: [[INDEX_NEXT]] = add i64 [[INDEX]], 4
+; CHECK-NEXT: [[TMP4:%.*]] = icmp eq i64 [[INDEX_NEXT]], 16
+; CHECK-NEXT: br i1 [[TMP4]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop !0
----------------
How is it that the original loop executes 15 iterations, but the vector loop iterates 16? It seems the minimum iteration count check branch at the top should branch to the scalar loop instead of vector.ph.
================
Comment at: llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1-vector.ll:37
+; CHECK-NEXT: [[PTR]] = getelementptr inbounds double, double* [[ADDR]], i64 1
+; CHECK-NEXT: [[COND:%.*]] = icmp eq double* [[PTR]], undef
+; CHECK-NEXT: br i1 [[COND]], label [[FOR_COND_CLEANUP]], label [[FOR_BODY]], !llvm.loop !15
----------------
Can the `undef` values be replaced with some valid values (such as an incoming parameter)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79976/new/
https://reviews.llvm.org/D79976
More information about the llvm-commits
mailing list