[PATCH] D106163: [SVE] Fix casts to <FixedVectorType> in truncateToMinimalBitwidths
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 20 03:35:47 PDT 2021
david-arm accepted this revision.
david-arm added a comment.
This revision is now accepted and ready to land.
LGTM! There are no tests attached here because there is currently no codepath where we can hit this for scalable vectors, but from a conceptual point of view there is no reason why it shouldn't work for scalable vectors.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4052
} else if (auto *IE = dyn_cast<InsertElementInst>(I)) {
- auto Elements = cast<FixedVectorType>(IE->getOperand(0)->getType())
- ->getNumElements();
+ auto Elements = cast<VectorType>(IE->getOperand(0)->getType())
+ ->getElementCount();
----------------
nit: Before merging/committing/submitting/<insert_correct_terminology here :)> can you fix up the formatting issues?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106163/new/
https://reviews.llvm.org/D106163
More information about the llvm-commits
mailing list