[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 02:21:24 PST 2024


================
@@ -346,12 +347,15 @@ getScalableECFromSignature(const FunctionType *Signature, const VFISAKind ISA,
   // Also check the return type if not void.
   Type *RetTy = Signature->getReturnType();
   if (!RetTy->isVoidTy()) {
-    std::optional<ElementCount> ReturnEC = getElementCountForTy(ISA, RetTy);
-    // If we have an unknown scalar element type we can't find a reasonable VF.
-    if (!ReturnEC)
-      return std::nullopt;
-    if (ElementCount::isKnownLT(*ReturnEC, MinEC))
-      MinEC = *ReturnEC;
+    for (Type *RetTy : getContainedTypes(RetTy)) {
----------------
MacDue wrote:

This is now in #119000, but the homogenous limitation is mostly artificial (to limit the initial scope). It's intended to be removed in later PRs to allow vectorization of more intrinsics (such as the overflow intrinsics).  

https://github.com/llvm/llvm-project/pull/109833


More information about the llvm-commits mailing list