================
@@ -54,10 +54,12 @@ namespace direct {
 namespace {
 /// If the given type is a vector type, return the vector's element type.
 /// Otherwise return the given type unchanged.
-// TODO(cir): Return the vector element type once we have support for vectors
-// instead of the identity type.
 mlir::Type elementTypeIfVector(mlir::Type type) {
-  assert(!cir::MissingFeatures::vectorType());
+  if (auto vecType = mlir::dyn_cast<cir::VectorType>(type))
+    return vecType.getElementType();
+
+  if (auto vecType = mlir::dyn_cast<mlir::VectorType>(type))
----------------
AmrDeveloper wrote:

Yes, it was confusing for me too, especially when I got the exception, it was 
weird why it didn't return the element type :D



https://github.com/llvm/llvm-project/pull/140125
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to