================
@@ -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";
+
+  // Check if it a valid FixedVectorType
+  if (mlir::isa<cir::PointerType, cir::FP128Type>(eltType))
+    return success();
+
+  // Check if it a valid VectorType
+  if (mlir::isa<cir::IntType>(eltType) || isAnyFloatingPointType(eltType))
+    return success();
+
+  eltType.dump();
----------------
erichkeane wrote:

Is this supposed to be here?

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

Reply via email to