[Mlir-commits] [mlir] [MLIR] Add test fort https://github.com/llvm/llvm-project/pull/110518 (PR #110563)
Benoit Jacob
llvmlistbot at llvm.org
Mon Sep 30 13:12:29 PDT 2024
https://github.com/bjacob created https://github.com/llvm/llvm-project/pull/110563
https://github.com/llvm/llvm-project/pull/110518 fixed assertion failures in `cast` introduced in https://github.com/llvm/llvm-project/pull/108450.
>From cbb32bc365574f6042058cad58622c25e0e310d8 Mon Sep 17 00:00:00 2001
From: Benoit Jacob <jacob.benoit.1 at gmail.com>
Date: Mon, 30 Sep 2024 16:09:53 -0400
Subject: [PATCH] test-dyn-cast
Signed-off-by: Benoit Jacob <jacob.benoit.1 at gmail.com>
---
mlir/test/Dialect/Affine/canonicalize.mlir | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/mlir/test/Dialect/Affine/canonicalize.mlir b/mlir/test/Dialect/Affine/canonicalize.mlir
index ff0e987bcef6ce..265df1cefb1203 100644
--- a/mlir/test/Dialect/Affine/canonicalize.mlir
+++ b/mlir/test/Dialect/Affine/canonicalize.mlir
@@ -1514,3 +1514,14 @@ func.func @drop_single_loop_delinearize(%arg0 : index, %arg1 : index) -> index {
// CHECK: scf.for %[[IV:[a-zA-Z0-9]+]] =
// CHECK-NOT: affine.delinearize_index
// CHECK: "some_use"(%{{.+}}, %[[IV]])
+
+// -----
+
+// Test for the assertion fix from PR #110518.
+// CHECK-LABEL: func @delinearize_test_assert_pull_110518
+func.func @delinearize_test_assert_pull_110518(%arg0: memref<?xi32>, %i : index, %t0 : index, %t1 : index, %t2 : index) -> index {
+ %c1024 = arith.constant 1024 : index
+ %1 = affine.apply affine_map<(d0)[s0, s1, s2] -> (d0 + s0 + s1 * 64 + s2 * 128)>(%i)[%t0, %t1, %t2]
+ %2 = affine.delinearize_index %1 into (%c1024) : index
+ return %2 : index
+}
More information about the Mlir-commits
mailing list