[PATCH] D95363: [SVE][LoopVectorize] Add support for scalable vectorization of loops with vector reverse

Bin Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 08:55:48 PST 2021


bin.cheng-ali added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2807
+        PartPtr->setIsInBounds(InBounds);
+      } else {
+        PartPtr = cast<GetElementPtrInst>(
----------------
Sorry for one nitpicking.
IIUC the difference for scalable/fixed cases is the two operands of GEPs, is it better to factor out common code by doing below?
if (VF.isScalable()) {
  // build GEP operands for scalable case
}
else {
  // build GEP operands for fixed case
}
// common code building VecPtr with above GEP operands.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95363



More information about the llvm-commits mailing list