3
3
4
4
; Emit a remark that reports a store.
5
5
define void @store (i32* %dst ) {
6
- ; CHECK: Initialization inserted by -ftrivial-auto-var-init.
6
+ ; CHECK: Store inserted by -ftrivial-auto-var-init.
7
+ ; CHECK-NEXT: Store size: 4 bytes.
7
8
; YAML-LABEL: --- !Missed
8
9
; YAML-NEXT: Pass: annotation-remarks
9
- ; YAML-NEXT: Name: AutoInitUnknownInstruction
10
+ ; YAML-NEXT: Name: AutoInitStore
10
11
; YAML-NEXT: DebugLoc:
11
12
; YAML-NEXT: Function: store
12
13
; YAML-NEXT: Args:
13
- ; YAML-NEXT: - String: Initialization inserted by -ftrivial-auto-var-init.
14
+ ; YAML-NEXT: - String: "Store inserted by -ftrivial-auto-var-init.\nStore size: "
15
+ ; YAML-NEXT: - StoreSize: '4'
16
+ ; YAML-NEXT: - String: ' bytes.'
17
+ ; YAML-NEXT: - String: ' Volatile: '
18
+ ; YAML-NEXT: - StoreVolatile: 'false'
19
+ ; YAML-NEXT: - String: .
20
+ ; YAML-NEXT: - String: ' Atomic: '
21
+ ; YAML-NEXT: - StoreAtomic: 'false'
22
+ ; YAML-NEXT: - String: .
14
23
; YAML-NEXT: ...
15
24
store i32 0 , i32* %dst , !annotation !0 , !dbg !DILocation (scope: !4 )
16
25
ret void
17
26
}
18
27
19
28
; Emit a remark that reports a volatile store.
20
29
define void @volatile_store (i32* %dst ) {
21
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
30
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
31
+ ; CHECK-NEXT: Store size: 4 bytes. Volatile: true.
22
32
; YAML-LABEL: --- !Missed
23
33
; YAML-NEXT: Pass: annotation-remarks
24
- ; YAML-NEXT: Name: AutoInitUnknownInstruction
34
+ ; YAML-NEXT: Name: AutoInitStore
25
35
; YAML-NEXT: DebugLoc:
26
36
; YAML-NEXT: Function: volatile_store
27
37
; YAML-NEXT: Args:
28
- ; YAML-NEXT: - String: Initialization inserted by -ftrivial-auto-var-init.
38
+ ; YAML-NEXT: - String: "Store inserted by -ftrivial-auto-var-init.\nStore size: "
39
+ ; YAML-NEXT: - StoreSize: '4'
40
+ ; YAML-NEXT: - String: ' bytes.'
41
+ ; YAML-NEXT: - String: ' Volatile: '
42
+ ; YAML-NEXT: - StoreVolatile: 'true'
43
+ ; YAML-NEXT: - String: .
44
+ ; YAML-NEXT: - String: ' Atomic: '
45
+ ; YAML-NEXT: - StoreAtomic: 'false'
46
+ ; YAML-NEXT: - String: .
29
47
; YAML-NEXT: ...
30
48
store volatile i32 0 , i32* %dst , !annotation !0 , !dbg !DILocation (scope: !4 )
31
49
ret void
32
50
}
33
51
34
52
; Emit a remark that reports an atomic store.
35
53
define void @atomic_store (i32* %dst ) {
36
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
54
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
55
+ ; CHECK-NEXT: Store size: 4 bytes. Atomic: true.
37
56
; YAML-LABEL: --- !Missed
38
57
; YAML-NEXT: Pass: annotation-remarks
39
- ; YAML-NEXT: Name: AutoInitUnknownInstruction
58
+ ; YAML-NEXT: Name: AutoInitStore
40
59
; YAML-NEXT: DebugLoc:
41
60
; YAML-NEXT: Function: atomic_store
42
61
; YAML-NEXT: Args:
43
- ; YAML-NEXT: - String: Initialization inserted by -ftrivial-auto-var-init.
62
+ ; YAML-NEXT: - String: "Store inserted by -ftrivial-auto-var-init.\nStore size: "
63
+ ; YAML-NEXT: - StoreSize: '4'
64
+ ; YAML-NEXT: - String: ' bytes.'
65
+ ; YAML-NEXT: - String: ' Atomic: '
66
+ ; YAML-NEXT: - StoreAtomic: 'true'
67
+ ; YAML-NEXT: - String: .
68
+ ; YAML-NEXT: - String: ' Volatile: '
69
+ ; YAML-NEXT: - StoreVolatile: 'false'
70
+ ; YAML-NEXT: - String: .
44
71
; YAML-NEXT: ...
45
72
store atomic i32 0 , i32* %dst unordered , align 4 , !annotation !0 , !dbg !DILocation (scope: !4 )
46
73
ret void
47
74
}
48
75
49
76
; Emit a remark that reports a store to an alloca.
50
77
define void @store_alloca () {
51
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
78
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
79
+ ; CHECK-NEXT: Store size: 4 bytes.
52
80
; YAML-LABEL: --- !Missed
53
81
; YAML-NEXT: Pass: annotation-remarks
54
- ; YAML-NEXT: Name: AutoInitUnknownInstruction
82
+ ; YAML-NEXT: Name: AutoInitStore
55
83
; YAML-NEXT: DebugLoc:
56
84
; YAML-NEXT: Function: store_alloca
57
85
; YAML-NEXT: Args:
58
- ; YAML-NEXT: - String: Initialization inserted by -ftrivial-auto-var-init.
86
+ ; YAML-NEXT: - String: "Store inserted by -ftrivial-auto-var-init.\nStore size: "
87
+ ; YAML-NEXT: - StoreSize: '4'
88
+ ; YAML-NEXT: - String: ' bytes.'
89
+ ; YAML-NEXT: - String: ' Volatile: '
90
+ ; YAML-NEXT: - StoreVolatile: 'false'
91
+ ; YAML-NEXT: - String: .
92
+ ; YAML-NEXT: - String: ' Atomic: '
93
+ ; YAML-NEXT: - StoreAtomic: 'false'
94
+ ; YAML-NEXT: - String: .
59
95
; YAML-NEXT: ...
60
96
%dst = alloca i32
61
97
store i32 0 , i32* %dst , !annotation !0 , !dbg !DILocation (scope: !4 )
@@ -64,7 +100,8 @@ define void @store_alloca() {
64
100
65
101
; Emit a remark that reports a store to an alloca through a GEP.
66
102
define void @store_alloca_gep () {
67
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
103
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
104
+ ; CHECK-NEXT: Store size: 4 bytes.
68
105
%dst = alloca i32
69
106
%gep = getelementptr i32 , i32* %dst , i32 0
70
107
store i32 0 , i32* %gep , !annotation !0 , !dbg !DILocation (scope: !4 )
@@ -73,7 +110,8 @@ define void @store_alloca_gep() {
73
110
74
111
; Emit a remark that reports a store to an alloca through a GEP in an array.
75
112
define void @store_alloca_gep_array () {
76
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
113
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
114
+ ; CHECK-NEXT: Store size: 4 bytes.
77
115
%dst = alloca [2 x i32 ]
78
116
%gep = getelementptr [2 x i32 ], [2 x i32 ]* %dst , i64 0 , i64 0
79
117
store i32 0 , i32* %gep , !annotation !0 , !dbg !DILocation (scope: !4 )
@@ -82,7 +120,8 @@ define void @store_alloca_gep_array() {
82
120
83
121
; Emit a remark that reports a store to an alloca through a bitcast.
84
122
define void @store_alloca_bitcast () {
85
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
123
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
124
+ ; CHECK-NEXT: Store size: 4 bytes.
86
125
%dst = alloca [2 x i16 ]
87
126
%bc = bitcast [2 x i16 ]* %dst to i32*
88
127
store i32 0 , i32* %bc , !annotation !0 , !dbg !DILocation (scope: !4 )
@@ -92,7 +131,8 @@ define void @store_alloca_bitcast() {
92
131
; Emit a remark that reports a store to an alloca that has a DILocalVariable
93
132
; attached.
94
133
define void @store_alloca_di () {
95
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
134
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
135
+ ; CHECK-NEXT: Store size: 4 bytes.
96
136
%dst = alloca i32
97
137
store i32 0 , i32* %dst , !annotation !0 , !dbg !DILocation (scope: !4 )
98
138
call void @llvm.dbg.declare (metadata i32* %dst , metadata !6 , metadata !DIExpression ()), !dbg !DILocation (scope: !4 )
@@ -102,7 +142,8 @@ define void @store_alloca_di() {
102
142
; Emit a remark that reports a store to an alloca that has more than one
103
143
; DILocalVariable attached.
104
144
define void @store_alloca_di_multiple () {
105
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
145
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
146
+ ; CHECK-NEXT: Store size: 4 bytes.
106
147
%dst = alloca i32
107
148
store i32 0 , i32* %dst , !annotation !0 , !dbg !DILocation (scope: !4 )
108
149
call void @llvm.dbg.declare (metadata i32* %dst , metadata !6 , metadata !DIExpression ()), !dbg !DILocation (scope: !4 )
@@ -113,7 +154,8 @@ define void @store_alloca_di_multiple() {
113
154
; Emit a remark that reports a store to a PHI node that can be two different
114
155
; allocas.
115
156
define void @store_alloca_phi () {
116
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
157
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
158
+ ; CHECK-NEXT: Store size: 4 bytes.
117
159
entry:
118
160
%dst = alloca i32
119
161
%dst2 = alloca i32
132
174
; Emit a remark that reports a store to a PHI node that can be two different
133
175
; allocas, where one of it has multiple DILocalVariable.
134
176
define void @store_alloca_phi_di_multiple () {
135
- ; CHECK-NEXT: Initialization inserted by -ftrivial-auto-var-init.
177
+ ; CHECK-NEXT: Store inserted by -ftrivial-auto-var-init.
178
+ ; CHECK-NEXT: Store size: 4 bytes.
136
179
entry:
137
180
%dst = alloca i32
138
181
%dst2 = alloca i32
0 commit comments