[Mlir-commits] [mlir] [mlir][IR] Add `ScalarTypeInterface` and use as `VectorType` element type (PR #132400)

Jakub Kuderski llvmlistbot at llvm.org
Fri Mar 21 07:50:09 PDT 2025


================
@@ -364,21 +364,22 @@ bool mlirTypeIsAVector(MlirType type) {
 MlirType mlirVectorTypeGet(intptr_t rank, const int64_t *shape,
                            MlirType elementType) {
   return wrap(VectorType::get(llvm::ArrayRef(shape, static_cast<size_t>(rank)),
-                              unwrap(elementType)));
+                              cast<ScalarTypeInterface>(unwrap(elementType))));
----------------
kuhar wrote:

Yeah I think it's not worth to be that explicit -- any type issues will be caught in the next stack frame anyway.

https://github.com/llvm/llvm-project/pull/132400


More information about the Mlir-commits mailing list