Skip to content

Commit 680cafd

Browse files
committed
refine the regression test
1 parent 083e9d7 commit 680cafd

File tree

1 file changed

+9
-34
lines changed

1 file changed

+9
-34
lines changed

llvm/test/Transforms/NewGVN/salvage-trivially-dead-inst.ll

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,29 @@
55

66
; CHECK: #dbg_value(i8 %tmp, [[META11:![0-9]+]], !DIExpression(DW_OP_constu, 8, DW_OP_eq, DW_OP_stack_value), [[META26:![0-9]+]])
77
; CHECK: [[META11]] = !DILocalVariable(name: "2"
8-
; CHECK: [[META26]] = !DILocation(line: 3
8+
; CHECK: [[META26]] = !DILocation(line: 2
99

1010
define void @test13() !dbg !5 {
11-
bb:
12-
br label %bb1
13-
14-
bb1:
11+
entry:
1512
%tmp = load i8, ptr null, align 1
16-
%tmp2 = icmp eq i8 %tmp, 8, !dbg !26
17-
#dbg_value(i1 %tmp2, !11, !DIExpression(), !26)
18-
br label %bb3
19-
20-
bb3:
21-
%tmp4 = phi ptr [ null, %bb1 ], [ %tmp6, %bb3 ]
22-
%tmp5 = phi i32 [ undef, %bb1 ], [ %tmp9, %bb3 ]
23-
%tmp6 = getelementptr i8, ptr %tmp4, i64 1
24-
%tmp7 = load i8, ptr %tmp4, align 1
25-
%tmp8 = sext i8 %tmp7 to i32
26-
%tmp9 = mul i32 %tmp5, %tmp8
27-
%tmp10 = load i8, ptr %tmp6, align 1
28-
%tmp11 = icmp eq i8 %tmp10, 0
29-
br i1 %tmp11, label %bb12, label %bb3
30-
31-
bb12:
32-
%tmp13 = phi i32 [ %tmp9, %bb3 ]
33-
%tmp14 = icmp eq i32 %tmp13, 0
34-
br i1 %tmp14, label %bb1, label %bb15
35-
36-
bb15:
37-
call void (...) @bar()
38-
br label %bb1
13+
%tmp2 = icmp eq i8 %tmp, 8, !dbg !13
14+
#dbg_value(i1 %tmp2, !11, !DIExpression(), !13)
15+
ret void
3916
}
4017

41-
declare void @bar(...)
42-
4318
!llvm.dbg.cu = !{!0}
4419
!llvm.debugify = !{!2, !3}
4520
!llvm.module.flags = !{!4}
4621

4722
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
4823
!1 = !DIFile(filename: "/app/example.ll", directory: "/")
49-
!2 = !{i32 18}
50-
!3 = !{i32 12}
24+
!2 = !{i32 3}
25+
!3 = !{i32 2}
5126
!4 = !{i32 2, !"Debug Info Version", i32 3}
5227
!5 = distinct !DISubprogram(name: "test13", linkageName: "test13", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8)
5328
!6 = !DISubroutineType(types: !7)
5429
!7 = !{}
5530
!8 = !{!11}
5631
!10 = !DIBasicType(name: "ty8", size: 8, encoding: DW_ATE_unsigned)
57-
!11 = !DILocalVariable(name: "2", scope: !5, file: !1, line: 3, type: !10)
58-
!26 = !DILocation(line: 3, column: 1, scope: !5)
32+
!11 = !DILocalVariable(name: "2", scope: !5, file: !1, line: 2, type: !10)
33+
!13 = !DILocation(line: 2, column: 1, scope: !5)

0 commit comments

Comments
 (0)