[Mlir-commits] [mlir] [mlir] Fix VectorType clone with shape of a different rank (PR #173007)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Mon Dec 22 02:47:12 PST 2025


================
@@ -285,8 +285,10 @@ VectorType VectorType::scaleElementBitwidth(unsigned scale) {
 
 VectorType VectorType::cloneWith(std::optional<ArrayRef<int64_t>> shape,
                                  Type elementType) const {
-  return VectorType::get(shape.value_or(getShape()), elementType,
-                         getScalableDims());
+  auto shapeVal = shape.value_or(getShape());
----------------
ftynse wrote:

Please expand auto unless the type is obvious from statement-level context.

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


More information about the Mlir-commits mailing list