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.

llvm-svn: 299237
This commit is contained in:
Adam Nemet 2017-03-31 17:51:12 +00:00
parent 64ea46f82a
commit 92b2846c4a
1 changed files with 10 additions and 1 deletions

View File

@ -18,6 +18,7 @@ return:
}
declare void @_Z3barv()
declare i1 @_Z3bazv()
; CHECK-LABEL: _Z5test2v
; CHECK: br {{.*}} !llvm.loop [[LOOP:![0-9]+]]
@ -34,13 +35,21 @@ return:
}
; CHECK-LABEL: _Z5test3v
; CHECK: br {{.*}} !llvm.loop [[LOOP2:![0-9]+]]
define void @_Z5test3v() !dbg !22 {
entry:
br label %while.body, !dbg !23
while.body:
%c = call i1 @_Z3bazv()
br i1 %c, label %if, label %then
if:
call void @_Z3barv(), !dbg !24
; CHECK: br {{.*}} !llvm.loop [[LOOP2:![0-9]+]]
br label %while.body, !dbg !25, !llvm.loop !26
then:
; CHECK: br {{.*}} !llvm.loop [[LOOP2]]
br label %while.body, !dbg !25, !llvm.loop !26
return: