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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 06:13:52 PST 2025


================
@@ -4620,7 +4620,8 @@ static bool willGenerateVectors(VPlan &Plan, ElementCount VF,
       Type *ScalarTy = TypeInfo.inferScalarType(ToCheck);
       if (!Visited.insert({ScalarTy}).second)
         continue;
-      if (WillWiden(ScalarTy))
+      Type *WideTy = toVectorizedTy(ScalarTy, VF);
+      if (any_of(getContainedTypes(WideTy), WillWiden))
----------------
david-arm wrote:

Ah ok I see, that's fair enough then. Thanks for the explanation!

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


More information about the llvm-commits mailing list