@@ -27,7 +27,9 @@ inline Type *ToVectorTy(Type *Scalar, unsigned VF) {
2727}
2828
2929// / A helper for converting structs of scalar types to structs of vector types.
30- // / Note: Only unpacked literal struct types are supported.
30+ // / Note:
31+ // / - If \p EC is scalar, \p StructTy is returned unchanged
32+ // / - Only unpacked literal struct types are supported
3133Type *toVectorizedStructTy (StructType *StructTy, ElementCount EC);
3234
3335// / A helper for converting structs of vector types to structs of scalar types.
@@ -40,8 +42,11 @@ bool isVectorizedStructTy(StructType *StructTy);
4042
4143// / A helper for converting to vectorized types. For scalar types, this is
4244// / equivalent to calling `ToVectorTy`. For struct types, this returns a new
43- // / struct where each element type has been widened to a vector type. Note: Only
44- // / unpacked literal struct types are supported.
45+ // / struct where each element type has been widened to a vector type.
46+ // / Note:
47+ // / - If the he incoming type is void, we return void
48+ // / - If \p EC is scalar, \p Ty is returned unchanged
49+ // / - Only unpacked literal struct types are supported
4550inline Type *toVectorizedTy (Type *Ty, ElementCount EC) {
4651 if (StructType *StructTy = dyn_cast<StructType>(Ty))
4752 return toVectorizedStructTy (StructTy, EC);
0 commit comments