[PATCH] D98721: [LV] NFC: Return both fixed and scalable Max VF from computeMaxVF.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 09:37:15 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5817
+  MaxVFCandidates MaxFactors = computeFeasibleMaxVF(TC, UserVF);
+  if (MaxFactors.FixedVF.isVector() && !MaxFactors.ScalableVF) {
+    ElementCount MaxFixedVF = MaxFactors.FixedVF;
----------------
fhahn wrote:
> sdesmalen wrote:
> > fhahn wrote:
> > > I guess this would pessimize the case where fixed width vectorisation would not require a scalar tail, if a scalable VF is present? Might be good to have a comment/TODO? Also might be good to move the comment that this checks if a tail is required up as well
> > Yes, that's correct, that's something to fix in a follow-up patch. I actually have a draft patch that addresses this, but I didn't want to complicate this patch any further. I've added a FIXME as you suggested.
> Sounds good. Would it be possible to add a test case for that scenario?
Good suggestion, I've added a test that is XFAIL'ed for now, so that we can re-enable it when the issue is fixed properly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98721



More information about the llvm-commits mailing list