diff options
Diffstat (limited to 'mlir/test/Dialect/SCF/for-loop-peeling.mlir')
-rw-r--r-- | mlir/test/Dialect/SCF/for-loop-peeling.mlir | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mlir/test/Dialect/SCF/for-loop-peeling.mlir b/mlir/test/Dialect/SCF/for-loop-peeling.mlir index aa8fd7e..f59b796 100644 --- a/mlir/test/Dialect/SCF/for-loop-peeling.mlir +++ b/mlir/test/Dialect/SCF/for-loop-peeling.mlir @@ -292,15 +292,19 @@ func.func @regression(%arg0: memref<i64>, %arg1: index) { // ----- -// Check that this doesn't crash but trigger the verifier. +// Regression test: Make sure that we do not crash. + +// CHECK-LABEL: func @zero_step( +// CHECK: scf.for +// CHECK: scf.for func.func @zero_step(%arg0: memref<i64>) { %c0 = arith.constant 0 : index %c1 = arith.constant 1 : index %foldto0 = arith.subi %c1, %c1 : index - // expected-error @+1 {{'scf.for' op constant step operand must be positive}} scf.for %arg2 = %c0 to %c1 step %foldto0 { %2 = arith.index_cast %arg2 : index to i64 memref.store %2, %arg0[] : memref<i64> } return } + |