[PATCH] D67572: [VectorUtils] Introduce the Vector Function Database (VFDatabase).

Francesco Petrogalli via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 09:47:50 PST 2020


fpetrogalli added a comment.

@uabelho ,

I am working on a solution for the problem you reported.

So far, I have decided to use a special name in the mappings scalar-to-vector that informs the compiler that the function that is being vectorized by the vectorizer should be scalarized after vectorization.
That would require modifying the mappings from

  const VecDesc VecIntrinsics[] = {
    {"llvm.phx.abs.i32", "", 4}
  };

to the following form:

  const VecDesc VecIntrinsics[] = {
    {"llvm.phx.abs.i32", "__LLVM_scalarize__", 4}
  };

The method `bool VFDatabase::shouldFunctionScalarize(VFShape Shape)` would be used to test such situation.

Would that work for you?

Kind regards,

Francesco


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67572





More information about the llvm-commits mailing list