[PATCH] D75746: [LoopVectorizer] Simplify branch in the remainder loop for trivial cases

Danila Malyutin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 08:14:05 PST 2020


danilaml marked an inline comment as done.
danilaml added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3107
+  // If VFxUF is 2 and vector loop is not skipped then remainder executes once.
+  if (VF * UF == 2 && !areSafetyChecksAdded()) {
+    if (BasicBlock *Latch = OrigLoop->getLoopLatch())
----------------
I think this check is enough unless there are other cases in which "remainder loop has `N % (VF*UF)` iterations doesn't hold.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75746/new/

https://reviews.llvm.org/D75746





More information about the llvm-commits mailing list