[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
Sat May 16 21:12:28 PDT 2020


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


================
Comment at: llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1.ll:111
+
+!llvm.module.flags = !{!0}
+
----------------
anhtuyen wrote:
> fhahn wrote:
> > metadata here and below unused?
> Hi Florian @fhahn, The short answer is yes, we need it. 
> As you can see on https://reviews.llvm.org/D78847, it is simple to create a minimal reproducer asserting when going through function **VPlan::execute()**. It is, however, a bit tricky to craft a minimal LIT test which exhibits the same problem when going through the other function **VPWidenCanonicalIVRecipe::execute()**. I came up with an idea to use profile data for the function online 57 
> 
> ```
> define void @vectorize-factor-1-vector-bound(double* %pt1) !prof !12 {
> ```
> to guide it through  **VPWidenCanonicalIVRecipe::execute()**. Although I made the data up. I am sure almost any meaningful values will serve the purpose. 
I have just found simple way to alter the 2nd function in this LIT test so that it still goes through **VPWidenCanonicalIVRecipe::execute()** even without the meta data. The new test-case is also clearer. I will upload the new patch shortly.


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