<commit_before>; RUN: opt -S -strip-debug < %s | FileCheck %s

target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"

; CHECK-LABEL: _Z5test1v
; CHECK-NOT: br {{.*}} !llvm.loop
define void @_Z5test1v() !dbg !7 {
entry:
  br label %while.body, !dbg !9

while.body:
  call void @_Z3barv(), !dbg !10
  br label %while.body, !dbg !11, !llvm.loop !13

return:
  ret void, !dbg !14
}

declare void @_Z3barv()

; CHECK-LABEL: _Z5test2v
; CHECK: br {{.*}} !llvm.loop [[LOOP:![0-9]+]]
define void @_Z5test2v() !dbg !15 {
entry:
  br label %while.body, !dbg !16

while.body:
  call void @_Z3barv(), !dbg !17
  br label %while.body, !dbg !18, !llvm.loop !19

return:
  ret void, !dbg !21
}

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

while.body:
  call void @_Z3barv(), !dbg !24
  br label %while.body, !dbg !25, !llvm.loop !26

return:
  ret void, !dbg !28
}

; CHECK-LABEL: _Z5test4v
; CHECK-NOT: br {{.*}} !llvm.loop
define void @_Z5test4v() !dbg !30 {
entry:
  br label %while.body, !dbg !31

while.body:
  call void @_Z3barv(), !dbg !32
  br label %while.body, !dbg !33, !llvm.loop !34

return:
  ret void, !dbg !36
}

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4, !5}
!llvm.ident = !{!6}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
!1 = !DIFile(filename: "test.cpp", directory: "/tmp")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = !{i32 1, !"PIC Level", i32 2}
!6 = !{!"clang version 4.0.0"}<commit_msg>Improve DebugInfo/strip-loop-metadata.ll test<commit_after>; RUN: opt -S -strip-debug < %s | FileCheck %s

target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"

; CHECK-LABEL: _Z5test1v
; CHECK-NOT: br {{.*}} !llvm.loop
define void @_Z5test1v() !dbg !7 {
entry:
  br label %while.body, !dbg !9

while.body:
  call void @_Z3barv(), !dbg !10
  br label %while.body, !dbg !11, !llvm.loop !13

return:
  ret void, !dbg !14
}

declare void @_Z3barv()
declare i1 @_Z3bazv()

; CHECK-LABEL: _Z5test2v
; CHECK: br {{.*}} !llvm.loop [[LOOP:![0-9]+]]
define void @_Z5test2v() !dbg !15 {
entry:
  br label %while.body, !dbg !16

while.body:
  call void @_Z3barv(), !dbg !17
  br label %while.body, !dbg !18, !llvm.loop !19

return:
  ret void, !dbg !21
}

; CHECK-LABEL: _Z5test3v
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:
  ret void, !dbg !28
}

; CHECK-LABEL: _Z5test4v
; CHECK-NOT: br {{.*}} !llvm.loop
define void @_Z5test4v() !dbg !30 {
entry:
  br label %while.body, !dbg !31

while.body:
  call void @_Z3barv(), !dbg !32
  br label %while.body, !dbg !33, !llvm.loop !34

return:
  ret void, !dbg !36
}

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4, !5}
!llvm.ident = !{!6}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2)
!1 = !DIFile(filename: "test.cpp", directory: "/tmp")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
!5 = !{i32 1, !"PIC Level", i32 2}
!6 = !{!"clang version 4.0.0"}
{'fraction_non_alphanumeric': 0.20247046186895812, 'fraction_numerical': 0.07733619763694952, 'mean_word_length': 3.9732977303070762, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5270730', 'n_tokens_mistral': 1777, 'n_tokens_neox': 1668, 'n_words': 454}