[clang] [CIR] Upstream initial support for fixed size VectorType (PR #136488)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 21 06:21:42 PDT 2025
================
@@ -654,6 +654,25 @@ cir::VectorType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
return llvm::NextPowerOf2(dataLayout.getTypeSizeInBits(*this));
}
+mlir::LogicalResult cir::VectorType::verify(
+ llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
+ mlir::Type eltType, uint64_t size) {
+ if (size == 0)
+ return emitError() << "the number of vector elements must be positive";
----------------
erichkeane wrote:
```suggestion
return emitError() << "the number of vector elements must be non-zero";
```
https://github.com/llvm/llvm-project/pull/136488
More information about the cfe-commits
mailing list