[PATCH] D72734: [VectorUtils] Rework the Vector Function Database (VFDatabase).

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 19:28:33 PST 2020


nemanjai added inline comments.
Herald added a subscriber: wuzish.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3290
   NeedToScalarize = true;
-  if (!TLI || !TLI->isFunctionVectorizable(FnName, VF) || CI->isNoBuiltin())
+  if (!TLI || CI->isNoBuiltin() || VFDatabase::getMappings(*CI).empty())
     return Cost;
----------------
This is actually problematic since it does not consider the vectorization factor. As a result, we assume that if we have any function for this call site with any vectorization factor, scalarization is not needed. This is simply not a valid assumption and causes failures on some of our internal benchmarks.

I have posted a patch to address this issue in https://reviews.llvm.org/D74944

The test case that is part of that patch currently asserts after this commit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72734





More information about the llvm-commits mailing list