[clang] [CIR] Upstream unary operators for VectorType (PR #139444)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Tue May 13 11:03:55 PDT 2025


================
@@ -54,10 +54,10 @@ 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 (const auto vecType = mlir::dyn_cast<cir::VectorType>(type)) {
----------------
bcardosolopes wrote:

we probably don't need the curly braces here!

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


More information about the cfe-commits mailing list