================ @@ -637,6 +637,41 @@ ArrayType::getABIAlignment(const ::mlir::DataLayout &dataLayout, return dataLayout.getTypeABIAlignment(getEltType()); } +//===----------------------------------------------------------------------===// +// VectorType Definitions +//===----------------------------------------------------------------------===// + +llvm::TypeSize cir::VectorType::getTypeSizeInBits( + const ::mlir::DataLayout &dataLayout, + ::mlir::DataLayoutEntryListRef params) const { + return llvm::TypeSize::getFixed(getSize() * + dataLayout.getTypeSizeInBits(getEltType())); +} + +uint64_t +cir::VectorType::getABIAlignment(const ::mlir::DataLayout &dataLayout, + ::mlir::DataLayoutEntryListRef params) const { + return llvm::NextPowerOf2(dataLayout.getTypeSizeInBits(*this)); +} + +mlir::LogicalResult cir::VectorType::verify( + llvm::function_ref<mlir::InFlightDiagnostic()> emitError, + mlir::Type eltType, uint64_t size) { ---------------- bcardosolopes wrote:
Thanks for adding this, note you also need to add tests for the invalid inputs! https://github.com/llvm/llvm-project/pull/136488 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits