1 ; RUN: llvm-as < %s -o - | llvm-dis - | FileCheck %s
3 ; The loop metadata in this test is similar to the output from clang for
6 ; #pragma clang loop unroll_count(4)
7 ; #pragma clang loop vectorize(assume_safety)
8 ; for(int i = 0; i < n; i++)
11 ; strip debug should not remove the useful metadata in the followup part.
13 declare hidden void @g() local_unnamed_addr align 2
15 define hidden void @f() {
16 ; CHECK: tail call {{.*}} !llvm.loop [[LID:![0-9]+]]
17 tail call void @g(), !llvm.loop !2
21 !llvm.module.flags = !{!0, !1}
23 ; CHECK-NOT: DILocation
24 ; CHECK: [[LID]] = distinct !{[[LID]], [[VE:![0-9]+]], [[VF:![0-9]+]]}
25 ; CHECK-NOT: DILocation
26 ; CHECK: [[VE]] = !{!"llvm.loop.vectorize.enable", i1 true}
27 ; CHECK: [[VF]] = !{!"llvm.loop.vectorize.followup_all", [[FU:![0-9]+]]}
28 ; CHECK: [[FU]] = distinct !{[[FU]], [[VD:![0-9]+]], [[UC:![0-9]+]]}
29 ; CHECK: [[VD]] = !{!"llvm.loop.isvectorized"}
30 ; CHECK: [[UC]] = !{!"llvm.loop.unroll.count", i32 4}
32 !0 = !{i32 2, !"Dwarf Version", i32 4}
33 !1 = !{i32 2, !"Debug Info Version", i32 3}
34 !2 = distinct !{!2, !3, !10, !11, !12}
35 !3 = !DILocation(line: 5, column: 12, scope: !4)
36 !4 = distinct !DILexicalBlock(scope: !6, file: !5, line: 105, column: 3)
37 !5 = !DIFile(filename: "/", directory: "f.cpp")
38 !6 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 1324, type: !7, scopeLine: 1324, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !9)
39 !7 = !DISubroutineType(types: !8)
41 !9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !5, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
42 !10 = !DILocation(line: 6, column: 1, scope: !4)
43 !11 = !{!"llvm.loop.vectorize.enable", i1 true}
44 !12 = !{!"llvm.loop.vectorize.followup_all", !13}
45 !13 = distinct !{!13, !3, !10, !14, !15}
46 !14 = !{!"llvm.loop.isvectorized"}
47 !15 = !{!"llvm.loop.unroll.count", i32 4}