[llvm] [PredicateInfo] Reformat PT_Switch's annotation as valid comments (PR #165249)
Kunqiu Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 02:03:33 PDT 2025
================
@@ -133,19 +133,13 @@ define void @test4(i1 %b, i32 %x) {
; CHECK-LABEL: @test4(
; CHECK-NEXT: br i1 [[B:%.*]], label [[SW:%.*]], label [[CASE3:%.*]]
; CHECK: sw:
-; CHECK: i32 0, label [[CASE0:%.*]]
-; CHECK-NEXT: i32 1, label [[CASE1:%.*]]
-; CHECK-NEXT: i32 2, label [[CASE0]]
-; CHECK-NEXT: i32 3, label [[CASE3]]
-; CHECK-NEXT: i32 4, label [[DEFAULT:%.*]]
-; CHECK-NEXT: ] Edge: [label [[SW]],label %case1], RenamedOp: [[X:%.*]] }
----------------
Camsyn wrote:
Outputs from -passes=print-predicateinfo consist of TWO parts:
1) Annotation of predicate info as comments
2) no-op bitcasts
The UTC would drop all comments :(
However, it's too annoying to hand-write IR checks for such a big testcase.
Maybe we can add a new feature for UTC to let it check the generated comments? @dtcxzyw
https://github.com/llvm/llvm-project/pull/165249
More information about the llvm-commits
mailing list