[llvm-branch-commits] [mlir] [MLIR] Stop visiting unreachable blocks in the walkAndApplyPatterns driver (PR #154038)
Mehdi Amini via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 18 01:59:13 PDT 2025
================
@@ -119,3 +119,18 @@ func.func @erase_nested_block() -> i32 {
}): () -> (i32)
return %a : i32
}
+
+
+// CHECK-LABEL: func.func @unreachable_replace_with_new_op
+// CHECK: "test.new_op"
+// CHECK: "test.replace_with_new_op"
+func.func @unreachable_replace_with_new_op() {
+ "test.br"()[^bb1] : () -> ()
+^bb1:
+ %a = "test.replace_with_new_op"() : () -> (i32)
+ return
+^unreachable:
----------------
joker-eph wrote:
Sure, added a block here
https://github.com/llvm/llvm-project/pull/154038
More information about the llvm-branch-commits
mailing list