File: llvm.loop-cu-strip-followup.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (47 lines) | stat: -rw-r--r-- 1,898 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
; RUN: llvm-as < %s -o - | llvm-dis - | FileCheck %s

; The loop metadata in this test is similar to the output from clang for
; code like the this:
; 
;     #pragma clang loop unroll_count(4)
;     #pragma clang loop vectorize(assume_safety)
;     for(int i = 0; i < n; i++)
;       ...
;
; strip debug should not remove the useful metadata in the followup part.

declare hidden void @g() local_unnamed_addr align 2

define hidden void @f() {
; CHECK: tail call {{.*}} !llvm.loop [[LID:![0-9]+]]
  tail call void @g(), !llvm.loop !2
  ret void
}

!llvm.module.flags = !{!0, !1}

; CHECK-NOT: DILocation
; CHECK: [[LID]] = distinct !{[[LID]], [[VE:![0-9]+]], [[VF:![0-9]+]]}
; CHECK-NOT: DILocation
; CHECK: [[VE]] = !{!"llvm.loop.vectorize.enable", i1 true}
; CHECK: [[VF]] = !{!"llvm.loop.vectorize.followup_all", [[FU:![0-9]+]]}
; CHECK: [[FU]] = distinct !{[[FU]], [[VD:![0-9]+]], [[UC:![0-9]+]]}
; CHECK: [[VD]] = !{!"llvm.loop.isvectorized"}
; CHECK: [[UC]] = !{!"llvm.loop.unroll.count", i32 4}

!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = distinct !{!2, !3, !10, !11, !12}
!3 = !DILocation(line: 5, column: 12, scope: !4)
!4 = distinct !DILexicalBlock(scope: !6, file: !5, line: 105, column: 3)
!5 = !DIFile(filename: "/", directory: "f.cpp")
!6 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 1324, type: !7, scopeLine: 1324, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !9)
!7 = !DISubroutineType(types: !8)
!8 = !{}
!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !5, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
!10 = !DILocation(line: 6, column: 1, scope: !4)
!11 = !{!"llvm.loop.vectorize.enable", i1 true}
!12 = !{!"llvm.loop.vectorize.followup_all", !13}
!13 = distinct !{!13, !3, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized"}
!15 = !{!"llvm.loop.unroll.count", i32 4}