[PATCH] D79976: [LV] Handle Fold-Tail of loops with vectorizarion factor (VF) equal to 1

Anh Tuyen Tran via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 17:58:58 PDT 2020


anhtuyen created this revision.
anhtuyen added reviewers: Ayal, fhahn, gilr, rengolin.
anhtuyen added a project: LLVM.
Herald added subscribers: vkmr, rogfer01, rkruppe.

When handling loops whose VF is 1, fold-tail vectorization sets the backedge taken count of the original loop with a vector of a single element. This approach will cause type-mismatch during instruction generartion, as reported in https://reviews.llvm.org/D78847#2029339

Based on discussion with Ayal @Ayal , I provide this patch to address the case of VF==1.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79976

Files:
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1-scalar.ll
  llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79976.264130.patch
Type: text/x-patch
Size: 7438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200515/2d825374/attachment-0001.bin>


More information about the llvm-commits mailing list