[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 05:27:30 PST 2024
================
@@ -566,7 +570,7 @@ FunctionType *VFABI::createFunctionType(const VFInfo &Info,
auto *RetTy = ScalarFTy->getReturnType();
if (!RetTy->isVoidTy())
- RetTy = VectorType::get(RetTy, VF);
+ RetTy = ToWideTy(RetTy, VF);
----------------
david-arm wrote:
I think it's worth trying to pull out the VFABIDemangler changes (which also require `getContainedTypes`) into a separate PR. That would make it a bit easier to review the remaining vectoriser changes. I think logically they are independent changes because LoopVectorizationLegality will reject such functions anyway without this patch. There is already an existing unittests/Analysis/ReplaceWithVecLibTest.cpp unit test that you can hopefully adapt to cover the struct return cases.
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list