annotate test/Transforms/InstCombine/consecutive-fences.ll @ 147:c2174574ed3a

LLVM 10
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 16:55:33 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: opt -instcombine -S %s | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; Make sure we collapse the fences in this case
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; CHECK-LABEL: define void @tinkywinky
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; CHECK-NEXT: fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; CHECK-NEXT: fence syncscope("singlethread") acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ; CHECK-NEXT: ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 ; CHECK-NEXT: }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 define void @tinkywinky() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 fence syncscope("singlethread") acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 fence syncscope("singlethread") acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 fence syncscope("singlethread") acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 ; CHECK-LABEL: define void @dipsy
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 ; CHECK-NEXT: fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 ; CHECK-NEXT: fence syncscope("singlethread") seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 ; CHECK-NEXT: ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 ; CHECK-NEXT: }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 define void @dipsy() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 fence syncscope("singlethread") seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33 ; CHECK-LABEL: define void @patatino
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 ; CHECK-NEXT: fence acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 ; CHECK-NEXT: fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 ; CHECK-NEXT: fence acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 ; CHECK-NEXT: fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 ; CHECK-NEXT: ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 ; CHECK-NEXT: }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 define void @patatino() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 fence acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 fence acquire
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 fence seq_cst
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 ret void
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 }
147
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
48
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
49 ; CHECK-LABEL: define void @debug
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
50 ; CHECK-NOT: fence
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
51 ; CHECK: call void @llvm.dbg.value
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
52 ; CHECK: fence seq_cst
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
53 define void @debug() {
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
54 fence seq_cst
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
55 tail call void @llvm.dbg.value(metadata i32 5, metadata !1, metadata !DIExpression()), !dbg !9
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
56 fence seq_cst
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
57 ret void
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
58 }
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
59
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
60 declare void @llvm.dbg.value(metadata, metadata, metadata)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
61
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
62 !llvm.dbg.cu = !{!0}
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
63 !llvm.module.flags = !{!5, !6, !7, !8}
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
64
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
65 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "Me", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: null, retainedTypes: null, imports: null)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
66 !1 = !DILocalVariable(name: "", arg: 1, scope: !2, file: null, line: 1, type: null)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
67 !2 = distinct !DISubprogram(name: "debug", linkageName: "debug", scope: null, file: null, line: 0, type: null, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0)
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
68 !3 = !DIFile(filename: "consecutive-fences.ll", directory: "")
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
69 !5 = !{i32 2, !"Dwarf Version", i32 4}
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
70 !6 = !{i32 2, !"Debug Info Version", i32 3}
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
71 !7 = !{i32 1, !"wchar_size", i32 4}
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
72 !8 = !{i32 7, !"PIC Level", i32 2}
c2174574ed3a LLVM 10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 121
diff changeset
73 !9 = !DILocation(line: 0, column: 0, scope: !2)