Skip to content

Commit 9cb6a3c

Browse files
anemetadrian-prantl
authored andcommitted
Improve DebugInfo/strip-loop-metadata.ll test
This wasn't covering for the case where you have multiple latches and hence the use of the same loop-id which needs to be mapped to the same loop-id. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299237 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit e37d964)
1 parent 7f1c801 commit 9cb6a3c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/DebugInfo/strip-loop-metadata.ll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ return:
1818
}
1919

2020
declare void @_Z3barv()
21+
declare i1 @_Z3bazv()
2122

2223
; CHECK-LABEL: _Z5test2v
2324
; CHECK: br {{.*}} !llvm.loop [[LOOP:![0-9]+]]
@@ -34,13 +35,21 @@ return:
3435
}
3536

3637
; CHECK-LABEL: _Z5test3v
37-
; CHECK: br {{.*}} !llvm.loop [[LOOP2:![0-9]+]]
3838
define void @_Z5test3v() !dbg !22 {
3939
entry:
4040
br label %while.body, !dbg !23
4141

4242
while.body:
43+
%c = call i1 @_Z3bazv()
44+
br i1 %c, label %if, label %then
45+
46+
if:
4347
call void @_Z3barv(), !dbg !24
48+
; CHECK: br {{.*}} !llvm.loop [[LOOP2:![0-9]+]]
49+
br label %while.body, !dbg !25, !llvm.loop !26
50+
51+
then:
52+
; CHECK: br {{.*}} !llvm.loop [[LOOP2]]
4453
br label %while.body, !dbg !25, !llvm.loop !26
4554

4655
return:

0 commit comments

Comments
 (0)