[llvm] r299237 - Improve DebugInfo/strip-loop-metadata.ll test
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 10:51:12 PDT 2017
Author: anemet
Date: Fri Mar 31 12:51:12 2017
New Revision: 299237
URL: http://llvm.org/viewvc/llvm-project?rev=299237&view=rev
Log:
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.
Modified:
llvm/trunk/test/DebugInfo/strip-loop-metadata.ll
Modified: llvm/trunk/test/DebugInfo/strip-loop-metadata.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/strip-loop-metadata.ll?rev=299237&r1=299236&r2=299237&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/strip-loop-metadata.ll (original)
+++ llvm/trunk/test/DebugInfo/strip-loop-metadata.ll Fri Mar 31 12:51:12 2017
@@ -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:
More information about the llvm-commits
mailing list