[llvm] [LV] Teach LoopVectorizationLegality about struct vector calls (PR #119221)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 11:25:05 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;
----------------
fhahn wrote:
What's the benefit of tracking this via a global variable instead of exiting early as for the other cases of return types we cannot vectorize?
Could we just emit the message for call directly here?
https://github.com/llvm/llvm-project/pull/119221
More information about the llvm-commits
mailing list