[PATCH] D89566: [LV] Epilogue Vectorization with Optimal Control Flow

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 10:30:04 PST 2020


dmgreen added a comment.

I have not looked at any of the details here, but a very high level comment is that this isn't very VPlany. If we do want to push things in that direction, then it is at least worth thinking about how this and vplan will co-exist, even if vplan isn't ready for it yet. It would be great to get to a point where all this information is in the vplan and we can compare epilog remainders vs scalar remainders vs whatever else, and come up with a good total cost based on the estimated trip count. Just something to think about.

Also on a completely different note, I presume this could be expanded to handle predicated remainders too? So that a unpredicated loop was give a single predicated remainder iteration, as might be useful to SVE.

Also, +1 to "it would be good to gather some numbers"



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9101
+      // edges from the first pass.
+      LVP.setBestPlan(EPI.EpilogueVF, EPI.EpilogueUF);
+      EPI.MainLoopVF = EPI.EpilogueVF;
----------------
I worry this would not work if we have removed the vplan for the different VF's.


================
Comment at: llvm/test/Transforms/LoopVectorize/optimal-epilog-vectorization.ll:6
+target datalayout = "e-m:e-i64:64-n32:64"
+target triple = "powerpc64le-unknown-linux-gnu"
+
----------------
PowerPC test go into LoopVectorize/PowerPC (I think, if it exists).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89566



More information about the llvm-commits mailing list