================ @@ -554,6 +554,22 @@ class VectorType : public Type { return VectorType::get(VTy->getElementType(), EltCnt * 2); } + /// This static method returns a VectorType with the same size-in-bits as + /// SizeTy but with an element type that matches the scalar type of EltTy. + static VectorType *getWithSizeAndScalar(VectorType *SizeTy, Type *EltTy) { ---------------- rj-jesus wrote:
What do you think of `getWithPreservedSize(Type *ElementType, const VectorType *Other)`? Similar to `VectorType::get`, but preserving the bit-size of `Other` instead of its element count. https://github.com/llvm/llvm-project/pull/130973 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits