[Mlir-commits] [mlir] [mlir] Check if the stride tensor is empty. (PR #76428)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Dec 28 00:34:46 PST 2023


================
@@ -356,3 +356,15 @@ func.func @fold_unit_dims_entirely(%arg0 : vector<8xi32>,
 // CHECK:           %[[VAL_3:.*]] = arith.muli %[[VAL_0]], %[[VAL_1]] : vector<8xi32>
 // CHECK:           %[[VAL_4:.*]] = arith.addi %[[VAL_3]], %[[VAL_2]] : vector<8xi32>
 // CHECK:           return %[[VAL_4]] : vector<8xi32>
+
+// -----
+
+// This test is to make sure there is no crash for empty stride.
----------------
banach-space wrote:

Why not add a proper test instead? That would defend against any future breakage and also test one more quite relevant case.

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


More information about the Mlir-commits mailing list