[Mlir-commits] [mlir] [mlir][Vector] Fix out-of-bounds crash unrolling create_mask/constant_mask with rank-mismatched native shape (PR #217514)
Federico Bruzzone
llvmlistbot at llvm.org
Sat Sep 5 02:18:53 PDT 2026
================
@@ -602,6 +602,57 @@ func.func @vector_constant_mask() -> vector<16x16xi1> {
// -----
+// A tile lying entirely outside the mask in one dim must be emitted as an
+// all-zeros mask: `constant_mask` rejects a mix of zero and non-zero sizes.
+
+func.func @vector_constant_mask_empty_tile() -> vector<16x16xi1> {
+ %0 = vector.constant_mask [4, 10] : vector<16x16xi1>
+ return %0 : vector<16x16xi1>
+}
+
+// CHECK-LABEL: func @vector_constant_mask_empty_tile
+// CHECK-DAG: arith.constant dense<false> : vector<16x16xi1>
+// CHECK-DAG: arith.constant dense<false> : vector<8x8xi1>
+// CHECK: vector.constant_mask [4, 8] : vector<8x8xi1>
+// CHECK: vector.constant_mask [4, 2] : vector<8x8xi1>
+// Negative check: no partially-zero tile is emitted.
----------------
FedericoBruzzone wrote:
Remove this comment
https://github.com/llvm/llvm-project/pull/217514
More information about the Mlir-commits
mailing list