[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:11:45 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:

> Yes, this is basically just checking bitcast placement.
> 
> It would be nice to add support to UTC for testing annotated IR -- this would also be useful for MemorySSA tests. Probably just a matter of not stripping line comments in the function?

I will try to support this new feature.

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


More information about the llvm-commits mailing list