[llvm] [UTC] Support to test annotated IR (PR #165419)
Kunqiu Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 05:02:25 PDT 2025
================
@@ -98,11 +98,16 @@ define void @test3(i32 %x, i32 %y) {
; CHECK-NEXT: [[XZ:%.*]] = icmp eq i32 [[X:%.*]], 0
; CHECK-NEXT: [[YZ:%.*]] = icmp eq i32 [[Y:%.*]], 0
; CHECK-NEXT: [[Z:%.*]] = and i1 [[XZ]], [[YZ]]
-; CHECK: [[Z_0:%.*]] = bitcast i1 [[Z]] to i1
-; CHECK: [[XZ_0:%.*]] = bitcast i1 [[XZ]] to i1
-; CHECK: [[X_0:%.*]] = bitcast i32 [[X]] to i32
-; CHECK: [[YZ_0:%.*]] = bitcast i1 [[YZ]] to i1
-; CHECK: [[Y_0:%.*]] = bitcast i32 [[Y]] to i32
+; CHECK-NEXT: ; branch predicate info { TrueEdge: 0 Comparison: [[Z]] = and i1 [[XZ]], [[YZ]] Edge: [label [[TMP0:%.*]],label %nope], RenamedOp: [[Z]] }
----------------
Camsyn wrote:
https://github.com/llvm/llvm-project/commit/597ac471cc7da97ccf957362a7e9f7a52d6910ee introduced such var regex suffix to help locate a var.
I think it should be safe to add '\]' as another suffix, since `phi i32 [%a, %then], [%b, %else]` without space is also a legal LLVM IR.
https://github.com/llvm/llvm-project/pull/165419
More information about the llvm-commits
mailing list