[Mlir-commits] [mlir] [mlir][vector] Restrict vector.shape_cast (scalable vectors) (PR #100331)
Benjamin Maxwell
llvmlistbot at llvm.org
Wed Jul 24 05:01:12 PDT 2024
================
@@ -5238,6 +5238,11 @@ static LogicalResult verifyVectorShapeCast(Operation *op,
if (!isValidShapeCast(resultShape, sourceShape))
return op->emitOpError("invalid shape cast");
}
+
+ // Check that (non-)scalability is preserved
+ if (sourceVectorType.isScalable() != resultVectorType.isScalable())
+ return op->emitOpError("non-matching scalability flags");
----------------
MacDue wrote:
I think this would still allow `vector.shape_cast %foo : vector<[2]x[2]xf32> to vector<2x[2]xf32>`
https://github.com/llvm/llvm-project/pull/100331
More information about the Mlir-commits
mailing list