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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 03:42:18 PST 2025


================
@@ -335,10 +335,10 @@ Value *VPTransformState::get(VPValue *Def, bool NeedsScalar) {
   } else {
     // Initialize packing with insertelements to start from undef.
     assert(!VF.isScalable() && "VF is assumed to be non scalable.");
-    Value *Undef = PoisonValue::get(VectorType::get(LastInst->getType(), VF));
+    Value *Undef = PoisonValue::get(toVectorizedTy(LastInst->getType(), VF));
----------------
david-arm wrote:

If you want, you could potentially pull out some of these changes into a NFC patch. For example, toVectorTy -> toVectorizedTy and VectorType::get -> toVectorizedTy, etc. Although if you don't think it's worth it I'm happy as it is.

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


More information about the llvm-commits mailing list