[PATCH] D102253: [LV] Prevent vectorization with unsupported element types.

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 14 11:30:43 PDT 2021


kmclaughlin added a comment.

In D102253#2753897 <https://reviews.llvm.org/D102253#2753897>, @dmgreen wrote:

> Hello. I thought that the idea was going to be that the costmodel returned an invalid cost for types/operations that could not be handled. And because it had an invalid cost, the vectorizer would then not vectorize with scalable factors? Is that not still the idea?

Hi @dmgreen, thanks for taking a look at this! We should be returning invalid costs for operations that are not supported, though I think the idea is that we should also be trying to reject scalable vectorisation early in situations such as the one here so that we don't have to rely on what the cost model is returning. As we can also only cost operations that are legal to vectorise, if we get an invalid cost for an instruction that we considered legal, this suggests either the cost model is incomplete or legalisation was not strict enough.
I've added D102515 <https://reviews.llvm.org/D102515> to ensure we are returning an invalid cost for memory ops with unsupported types.


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

https://reviews.llvm.org/D102253



More information about the llvm-commits mailing list