[Mlir-commits] [mlir] [mlir] Fix region simplification bug when later blocks use prior block argument values (PR #97960)

Ben Howe llvmlistbot at llvm.org
Tue Sep 3 19:19:31 PDT 2024


================
@@ -0,0 +1,33 @@
+// RUN: mlir-opt --canonicalize='enable-patterns=AnyPattern region-simplify=aggressive' %s | FileCheck %s
+
+// Perform merge checks without performing canonicalization prior to simplification
+
+// This test should not merge ^bb2 and ^bb5, despite the fact that they are
+// identical because %4 is used outside of ^bb2.
----------------
bmhowe23 wrote:

Yes, that reduced test case looks reasonable to me, with the exception that - as written - it would pass without this PR because the `CHECK: test.foo` lines can accidentally match the `test.foo_br*` lines. If it's ok with you, I think we should change `test.foo` to `test.bar` so they don't accidentally match the wrong operations.

Updated in 395aeacf9ab973856279af5b0231f86f75c3cc2a.

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


More information about the Mlir-commits mailing list