llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) <details> <summary>Changes</summary> https://github.com/llvm/llvm-project/pull/225814 changed how the core MLIR pattern rewriter handles unreachable blocks. The change missed a CIR test that produces different output after the change. This updates the test. --- Full diff: https://github.com/llvm/llvm-project/pull/235078.diff 1 Files Affected: - (modified) clang/test/CIR/Transforms/canonicalize.cir (+5-1) ``````````diff diff --git a/clang/test/CIR/Transforms/canonicalize.cir b/clang/test/CIR/Transforms/canonicalize.cir index a786b252e91ad..b76d6b462eee0 100644 --- a/clang/test/CIR/Transforms/canonicalize.cir +++ b/clang/test/CIR/Transforms/canonicalize.cir @@ -45,7 +45,9 @@ module { // In this unreachable cycle, ^header is the only predecessor of ^body and // ^body the only predecessor of ^header, and ^body passes ^header's own // argument back to it. ^header must not be merged into ^body: %keep would be - // replaced by itself, and its use in the call would outlive ^header. + // replaced by itself, and its use in the call would outlive ^header. The + // greedy driver does not rewrite operations in unreachable blocks, so the + // cycle is left as written. cir.func private @use(!s32i) cir.func @no_merge_self_arg_loop(%arg0: !s32i) -> !s32i { cir.return %arg0 : !s32i @@ -59,6 +61,8 @@ module { // CHECK-NEXT: cir.return %[[ARG0]] : !s32i // CHECK-NEXT: ^[[HEADER:bb[0-9]+]](%[[KEEP:.*]]: !s32i): // CHECK-NEXT: cir.call @use(%[[KEEP]]) : (!s32i) -> () + // CHECK-NEXT: cir.br ^[[BODY:bb[0-9]+]] + // CHECK-NEXT: ^[[BODY]]: // CHECK-NEXT: cir.br ^[[HEADER]](%[[KEEP]] : !s32i) // CHECK-NEXT: } `````````` </details> https://github.com/llvm/llvm-project/pull/235078 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
