[PATCH] D154261: [LV] Consider if scalar epilogue is required in getMaximizedVFForTarget.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 4 14:37:06 PDT 2023
Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.
Ok, very well, then better drop the last requireScalarEpilog part from the explanation of the test?
================
Comment at: llvm/test/Transforms/LoopVectorize/X86/pr56319-vector-exit-cond-optimization-epilogue-vectorization.ll:9-10
+; vector loop will be executed, followed by 2 iterations of the vector epilogue,
+; followed by a final iteration of the scalar loop, because the interleave group
+; requires to execute at least one scalar iteration.
define void @pr56319(ptr noalias %src, ptr noalias %dst) {
----------------
The scalar loop will get to run the final iteration in any case, due to the trip-count being odd, regardless of any interleave group requiring it (aka red herring).
================
Comment at: llvm/test/Transforms/LoopVectorize/X86/pr56319-vector-exit-cond-optimization-epilogue-vectorization.ll:30
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 32
; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i64 [[INDEX_NEXT]], 32
; CHECK-NEXT: br i1 [[TMP5]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP0:![0-9]+]]
----------------
(Just noting that we're refraining from optimizing this single iteration main loop with an unconditional branch exiting to middle block, because that would also cause the double iteration epilog loop to bail out after its first iteration.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154261/new/
https://reviews.llvm.org/D154261
More information about the llvm-commits
mailing list