[PATCH] D113772: [Analysis] Fix getNumberOfParts to return 0 when the answer is unknown
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 15 00:58:52 PST 2021
david-arm added a comment.
In D113772#3128166 <https://reviews.llvm.org/D113772#3128166>, @efriedma wrote:
>> When asking how many parts are required for a scalable vector type there are occasions when it cannot be computed. For example, `<vscale x 1 x i3>` is one such vector for AArch64+SVE because no matter how we promote the `i3` type we never end up with a legal vector.
>
> Not sure I agree with the premise here. Legalizing to `<vscale x 2 x i64>` should be a viable strategy. I mean, under most circumstances I wouldn't expect the vectorizer to construct `vscale x 1` vectors, but we've already done a significant amount of work to allow lowering such vectors.
Hi @efriedma, you're right that at some point we might be able to support this should we care about <vscale x 1 x iX> types. However, this patch is more about fixing up a genuine hole in how we use `getNumberOfParts` to determine if something has been vectorised or not. At the moment, for <vscale x 1 x i3> types we do crash because `getNumberOfParts` dereferences an invalid cost so I'd like to fix this hole first as a priority to at least stabilise the vectoriser in the short term. Perhaps I can update the commit message to be less misleading?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113772/new/
https://reviews.llvm.org/D113772
More information about the llvm-commits
mailing list