150
|
1 ; RUN: opt %loadPolly -polly-detect -polly-report -disable-output < %s 2>&1 | FileCheck %s
|
|
2 target datalayout = "e-i64:64-f80:128-s:64-n8:16:32:64-S128"
|
|
3
|
|
4 ; Function Attrs: nounwind uwtable
|
252
|
5 define void @foo(ptr %A) #0 !dbg !4 {
|
150
|
6 entry:
|
|
7 br label %entry.split
|
|
8
|
|
9 entry.split: ; preds = %entry
|
|
10 br label %for.body, !dbg !11
|
|
11
|
|
12 for.body: ; preds = %entry.split, %for.body
|
|
13 %indvar = phi i64 [ 0, %entry.split ], [ %indvar.next, %for.body ]
|
|
14 %i.01 = trunc i64 %indvar to i32, !dbg !13
|
252
|
15 %arrayidx = getelementptr float, ptr %A, i64 %indvar, !dbg !13
|
150
|
16 %conv = sitofp i32 %i.01 to float, !dbg !13
|
252
|
17 store float %conv, ptr %arrayidx, align 4, !dbg !13
|
150
|
18 %indvar.next = add i64 %indvar, 1, !dbg !11
|
|
19 %exitcond = icmp ne i64 %indvar.next, 100, !dbg !11
|
|
20 br i1 %exitcond, label %for.body, label %for.end, !dbg !11
|
|
21
|
|
22 for.end: ; preds = %for.body
|
|
23 ret void, !dbg !14
|
|
24 }
|
|
25
|
|
26 ; CHECK: note: Polly detected an optimizable loop region (scop) in function 'foo'
|
|
27 ; CHECK: test.c:2: Start of scop
|
|
28 ; CHECK: test.c:3: End of scop
|
|
29
|
|
30 ; Function Attrs: nounwind uwtable
|
252
|
31 define void @bar(ptr %A) #0 !dbg !7 {
|
150
|
32 entry:
|
|
33 br label %entry.split
|
|
34
|
|
35 entry.split: ; preds = %entry
|
|
36 br label %for.body, !dbg !15
|
|
37
|
|
38 for.body: ; preds = %entry.split, %for.body
|
|
39 %indvar = phi i64 [ 0, %entry.split ], [ %indvar.next, %for.body ]
|
|
40 %i.01 = trunc i64 %indvar to i32, !dbg !17
|
252
|
41 %arrayidx = getelementptr float, ptr %A, i64 %indvar, !dbg !17
|
150
|
42 %conv = sitofp i32 %i.01 to float, !dbg !17
|
252
|
43 store float %conv, ptr %arrayidx, align 4, !dbg !17
|
150
|
44 %indvar.next = add i64 %indvar, 1, !dbg !15
|
|
45 %exitcond = icmp ne i64 %indvar.next, 100, !dbg !15
|
|
46 br i1 %exitcond, label %for.body, label %for.end, !dbg !15
|
|
47
|
|
48 for.end: ; preds = %for.body
|
|
49 ret void, !dbg !18
|
|
50 }
|
|
51
|
|
52 ; CHECK: note: Polly detected an optimizable loop region (scop) in function 'bar'
|
|
53 ; CHECK: test.c:9: Start of scop
|
|
54 ; CHECK: test.c:13: End of scop
|
|
55
|
|
56 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
|
57
|
|
58 !llvm.dbg.cu = !{!0}
|
|
59 !llvm.module.flags = !{!8, !9}
|
|
60 !llvm.ident = !{!10}
|
|
61
|
|
62 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
|
|
63 !1 = !DIFile(filename: "test.c", directory: "/home/grosser/Projects/polly/git/tools/polly")
|
|
64 !2 = !{}
|
|
65 !4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2)
|
|
66 !5 = !DIFile(filename: "test.c", directory: "/home/grosser/Projects/polly/git/tools/polly")
|
|
67 !6 = !DISubroutineType(types: !{null})
|
|
68 !7 = distinct !DISubprogram(name: "bar", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, retainedNodes: !2)
|
|
69 !8 = !{i32 2, !"Dwarf Version", i32 4}
|
|
70 !9 = !{i32 1, !"Debug Info Version", i32 3}
|
|
71 !10 = !{!"clang version 3.5 "}
|
|
72 !11 = !DILocation(line: 2, scope: !12)
|
|
73 !12 = distinct !DILexicalBlock(line: 2, column: 0, file: !1, scope: !4)
|
|
74 !13 = !DILocation(line: 3, scope: !12)
|
|
75 !14 = !DILocation(line: 4, scope: !4)
|
|
76 !15 = !DILocation(line: 9, scope: !16)
|
|
77 !16 = distinct !DILexicalBlock(line: 9, column: 0, file: !1, scope: !7)
|
|
78 !17 = !DILocation(line: 13, scope: !16)
|
|
79 !18 = !DILocation(line: 14, scope: !7)
|
|
80
|