annotate test/Assembler/metadata.ll @ 122:36195a0db682

merging ( incomplete )
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 17 Nov 2017 20:32:31 +0900
parents 1172e4bd9c6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
1 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck --check-prefix=CHECK --check-prefix=CHECK-UNMAT %s
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
2 ; RUN: llvm-as < %s | llvm-dis -materialize-metadata | FileCheck --check-prefix=CHECK-UNMAT %s
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3 ; RUN: verify-uselistorder %s
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
5 ; CHECK-UNMAT: @global = global i32 0, !foo [[M2:![0-9]+]], !foo [[M3:![0-9]+]], !baz [[M3]]
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
6 @global = global i32 0, !foo !2, !foo !3, !baz !3
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
7
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
8 ; CHECK-LABEL: @test
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
9 ; CHECK: ret void, !foo [[M0:![0-9]+]], !bar [[M1:![0-9]+]]
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
10 define void @test() !dbg !1 {
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 add i32 2, 1, !bar !0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 add i32 1, 2, !foo !1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 call void @llvm.dbg.func.start(metadata !"foo")
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 extractvalue {{i32, i32}, i32} undef, 0, 1, !foo !0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ret void, !foo !0, !bar !1
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 }
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
18 ; CHECK: define void @test2() !foo [[M2]] !baz [[M3]]
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
19 define void @test2() !foo !2 !baz !3 {
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
20 unreachable
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
21 }
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
22
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
23 ; CHECK: define void @test3() !bar [[M3]]
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
24 ; CHECK: unreachable, !bar [[M4:![0-9]+]]
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
25 define void @test3() !bar !3 {
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
26 unreachable, !bar !4
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
27 }
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
28
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
29 ; CHECK-LABEL: define void @test_attachment_name() {
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
30 ; CHECK: unreachable, !\342abc [[M4]]
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
31 define void @test_attachment_name() {
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
32 ;; Escape the first character when printing text IR, since it's a digit
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
33 unreachable, !\34\32abc !4
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
34 }
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
35
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
36 ; CHECK-UNMAT: [[M2]] = distinct !{}
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
37 ; CHECK-UNMAT: [[M3]] = distinct !{}
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
38 ; CHECK: [[M0]] = !DILocation
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
39 ; CHECK: [[M1]] = distinct !DISubprogram
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
40 ; CHECK: [[M4]] = distinct !{}
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
41
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
42 !llvm.module.flags = !{!7}
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
43 !llvm.dbg.cu = !{!5}
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
44 !0 = !DILocation(line: 662302, column: 26, scope: !1)
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
45 !1 = distinct !DISubprogram(name: "foo", isDefinition: true, unit: !5)
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
46 !2 = distinct !{}
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
47 !3 = distinct !{}
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 83
diff changeset
48 !4 = distinct !{}
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
49 !5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
50 file: !6,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
51 isOptimized: true, flags: "-O2",
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
52 splitDebugFilename: "abc.debug", emissionKind: 2)
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
53 !6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
54 !7 = !{i32 2, !"Debug Info Version", i32 3}
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 declare void @llvm.dbg.func.start(metadata) nounwind readnone
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 !foo = !{ !0 }
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 !bar = !{ !1 }