Skip to content

Commit cbb32bc

Browse files
committed
test-dyn-cast
Signed-off-by: Benoit Jacob <[email protected]>
1 parent f8ba021 commit cbb32bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mlir/test/Dialect/Affine/canonicalize.mlir

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,3 +1514,14 @@ func.func @drop_single_loop_delinearize(%arg0 : index, %arg1 : index) -> index {
15141514
// CHECK: scf.for %[[IV:[a-zA-Z0-9]+]] =
15151515
// CHECK-NOT: affine.delinearize_index
15161516
// CHECK: "some_use"(%{{.+}}, %[[IV]])
1517+
1518+
// -----
1519+
1520+
// Test for the assertion fix from PR #110518.
1521+
// CHECK-LABEL: func @delinearize_test_assert_pull_110518
1522+
func.func @delinearize_test_assert_pull_110518(%arg0: memref<?xi32>, %i : index, %t0 : index, %t1 : index, %t2 : index) -> index {
1523+
%c1024 = arith.constant 1024 : index
1524+
%1 = affine.apply affine_map<(d0)[s0, s1, s2] -> (d0 + s0 + s1 * 64 + s2 * 128)>(%i)[%t0, %t1, %t2]
1525+
%2 = affine.delinearize_index %1 into (%c1024) : index
1526+
return %2 : index
1527+
}

0 commit comments

Comments
 (0)