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

Balaji V. Iyer. llvmlistbot at llvm.org
Mon Jan 1 20:24:40 PST 2024


================
@@ -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.
----------------
bviyer wrote:

Thanks for explaining it for me! I added more checks. I also added a check-not for for the error message string that the crash would cause.

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


More information about the Mlir-commits mailing list