[llvm] [LV] Teach LoopVectorizationLegality about struct vector calls (PR #119221)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 02:01:17 PST 2024
================
@@ -943,11 +955,24 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
if (CI && !VFDatabase::getMappings(*CI).empty())
VecCallVariantsFound = true;
+ auto canWidenInstruction = [this](Instruction const &Inst) {
+ Type *InstTy = Inst.getType();
+ if (isa<CallInst>(Inst) && isa<StructType>(InstTy) &&
+ canWidenCallReturnType(InstTy)) {
+ StructVecVecCallFound = true;
----------------
MacDue wrote:
I don't want loop `LoopVectorizationLegality` to fail. The intention is `LoopVectorizationLegality` sees these calls are vectorizable (and returns normally). It's just the LoopVectorizer is incomplete and can't handle them yet. I think @david-arm has done something similar in the past.
This flag is meant to be easily removed once it's supported.
https://github.com/llvm/llvm-project/pull/119221
More information about the llvm-commits
mailing list