File: addrspacecast.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (216 lines) | stat: -rw-r--r-- 22,375 bytes parent folder | download | duplicates (3)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -cost-model -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=kaveri < %s | FileCheck -check-prefixes=ALL %s
; RUN: opt -cost-model -cost-kind=code-size -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=kaveri < %s | FileCheck -check-prefixes=ALL-SIZE %s
; END.

define void @addrspacecast_global_to_flat() #0 {
; ALL-LABEL: 'addrspacecast_global_to_flat'
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast i8 addrspace(1)* undef to i8*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x i8 addrspace(1)*> undef to <2 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x i8 addrspace(1)*> undef to <3 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x i8 addrspace(1)*> undef to <4 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x i8 addrspace(1)*> undef to <32 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast i16 addrspace(1)* undef to i16*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x i16 addrspace(1)*> undef to <2 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x i16 addrspace(1)*> undef to <3 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x i16 addrspace(1)*> undef to <4 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x i16 addrspace(1)*> undef to <32 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast i32 addrspace(1)* undef to i32*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x i32 addrspace(1)*> undef to <2 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x i32 addrspace(1)*> undef to <3 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x i32 addrspace(1)*> undef to <4 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x i32 addrspace(1)*> undef to <32 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast i64 addrspace(1)* undef to i64*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x i64 addrspace(1)*> undef to <2 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x i64 addrspace(1)*> undef to <3 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x i64 addrspace(1)*> undef to <4 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x i64 addrspace(1)*> undef to <32 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; ALL-SIZE-LABEL: 'addrspacecast_global_to_flat'
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast i8 addrspace(1)* undef to i8*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x i8 addrspace(1)*> undef to <2 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x i8 addrspace(1)*> undef to <3 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x i8 addrspace(1)*> undef to <4 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x i8 addrspace(1)*> undef to <32 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast i16 addrspace(1)* undef to i16*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x i16 addrspace(1)*> undef to <2 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x i16 addrspace(1)*> undef to <3 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x i16 addrspace(1)*> undef to <4 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x i16 addrspace(1)*> undef to <32 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast i32 addrspace(1)* undef to i32*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x i32 addrspace(1)*> undef to <2 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x i32 addrspace(1)*> undef to <3 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x i32 addrspace(1)*> undef to <4 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x i32 addrspace(1)*> undef to <32 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast i64 addrspace(1)* undef to i64*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x i64 addrspace(1)*> undef to <2 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x i64 addrspace(1)*> undef to <3 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x i64 addrspace(1)*> undef to <4 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x i64 addrspace(1)*> undef to <32 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
;
  %i8ptr = addrspacecast i8 addrspace(1)* undef to i8*
  %v2i8ptr = addrspacecast <2 x i8 addrspace(1)*> undef to <2 x i8*>
  %v3i8ptr = addrspacecast <3 x i8 addrspace(1)*> undef to <3 x i8*>
  %v4i8ptr = addrspacecast <4 x i8 addrspace(1)*> undef to <4 x i8*>
  %v32i8ptr = addrspacecast <32 x i8 addrspace(1)*> undef to <32 x i8*>
  %i16ptr = addrspacecast i16 addrspace(1)* undef to i16*
  %v2i16ptr = addrspacecast <2 x i16 addrspace(1)*> undef to <2 x i16*>
  %v3i16ptr = addrspacecast <3 x i16 addrspace(1)*> undef to <3 x i16*>
  %v4i16ptr = addrspacecast <4 x i16 addrspace(1)*> undef to <4 x i16*>
  %v32i16ptr = addrspacecast <32 x i16 addrspace(1)*> undef to <32 x i16*>
  %i32ptr = addrspacecast i32 addrspace(1)* undef to i32*
  %v2i32ptr = addrspacecast <2 x i32 addrspace(1)*> undef to <2 x i32*>
  %v3i32ptr = addrspacecast <3 x i32 addrspace(1)*> undef to <3 x i32*>
  %v4i32ptr = addrspacecast <4 x i32 addrspace(1)*> undef to <4 x i32*>
  %v32i32ptr = addrspacecast <32 x i32 addrspace(1)*> undef to <32 x i32*>
  %i64ptr = addrspacecast i64 addrspace(1)* undef to i64*
  %v2i64ptr = addrspacecast <2 x i64 addrspace(1)*> undef to <2 x i64*>
  %v3i64ptr = addrspacecast <3 x i64 addrspace(1)*> undef to <3 x i64*>
  %v4i64ptr = addrspacecast <4 x i64 addrspace(1)*> undef to <4 x i64*>
  %v32i64ptr = addrspacecast <32 x i64 addrspace(1)*> undef to <32 x i64*>
  ret void
}

define void @addrspacecast_local_to_flat() #0 {
; ALL-LABEL: 'addrspacecast_local_to_flat'
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i8ptr = addrspacecast i8 addrspace(3)* undef to i8*
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8ptr = addrspacecast <2 x i8 addrspace(3)*> undef to <2 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8ptr = addrspacecast <3 x i8 addrspace(3)*> undef to <3 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i8ptr = addrspacecast <4 x i8 addrspace(3)*> undef to <4 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i8ptr = addrspacecast <32 x i8 addrspace(3)*> undef to <32 x i8*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i16ptr = addrspacecast i16 addrspace(3)* undef to i16*
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16ptr = addrspacecast <2 x i16 addrspace(3)*> undef to <2 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i16ptr = addrspacecast <3 x i16 addrspace(3)*> undef to <3 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i16ptr = addrspacecast <4 x i16 addrspace(3)*> undef to <4 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i16ptr = addrspacecast <32 x i16 addrspace(3)*> undef to <32 x i16*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i32ptr = addrspacecast i32 addrspace(3)* undef to i32*
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32ptr = addrspacecast <2 x i32 addrspace(3)*> undef to <2 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32ptr = addrspacecast <3 x i32 addrspace(3)*> undef to <3 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i32ptr = addrspacecast <4 x i32 addrspace(3)*> undef to <4 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i32ptr = addrspacecast <32 x i32 addrspace(3)*> undef to <32 x i32*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i64ptr = addrspacecast i64 addrspace(3)* undef to i64*
; ALL-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64ptr = addrspacecast <2 x i64 addrspace(3)*> undef to <2 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i64ptr = addrspacecast <3 x i64 addrspace(3)*> undef to <3 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i64ptr = addrspacecast <4 x i64 addrspace(3)*> undef to <4 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i64ptr = addrspacecast <32 x i64 addrspace(3)*> undef to <32 x i64*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; ALL-SIZE-LABEL: 'addrspacecast_local_to_flat'
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i8ptr = addrspacecast i8 addrspace(3)* undef to i8*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i8ptr = addrspacecast <2 x i8 addrspace(3)*> undef to <2 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i8ptr = addrspacecast <3 x i8 addrspace(3)*> undef to <3 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i8ptr = addrspacecast <4 x i8 addrspace(3)*> undef to <4 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i8ptr = addrspacecast <32 x i8 addrspace(3)*> undef to <32 x i8*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i16ptr = addrspacecast i16 addrspace(3)* undef to i16*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i16ptr = addrspacecast <2 x i16 addrspace(3)*> undef to <2 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i16ptr = addrspacecast <3 x i16 addrspace(3)*> undef to <3 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i16ptr = addrspacecast <4 x i16 addrspace(3)*> undef to <4 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i16ptr = addrspacecast <32 x i16 addrspace(3)*> undef to <32 x i16*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i32ptr = addrspacecast i32 addrspace(3)* undef to i32*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i32ptr = addrspacecast <2 x i32 addrspace(3)*> undef to <2 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i32ptr = addrspacecast <3 x i32 addrspace(3)*> undef to <3 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i32ptr = addrspacecast <4 x i32 addrspace(3)*> undef to <4 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i32ptr = addrspacecast <32 x i32 addrspace(3)*> undef to <32 x i32*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i64ptr = addrspacecast i64 addrspace(3)* undef to i64*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2i64ptr = addrspacecast <2 x i64 addrspace(3)*> undef to <2 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v3i64ptr = addrspacecast <3 x i64 addrspace(3)*> undef to <3 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v4i64ptr = addrspacecast <4 x i64 addrspace(3)*> undef to <4 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %v32i64ptr = addrspacecast <32 x i64 addrspace(3)*> undef to <32 x i64*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
;
  %i8ptr = addrspacecast i8 addrspace(3)* undef to i8*
  %v2i8ptr = addrspacecast <2 x i8 addrspace(3)*> undef to <2 x i8*>
  %v3i8ptr = addrspacecast <3 x i8 addrspace(3)*> undef to <3 x i8*>
  %v4i8ptr = addrspacecast <4 x i8 addrspace(3)*> undef to <4 x i8*>
  %v32i8ptr = addrspacecast <32 x i8 addrspace(3)*> undef to <32 x i8*>
  %i16ptr = addrspacecast i16 addrspace(3)* undef to i16*
  %v2i16ptr = addrspacecast <2 x i16 addrspace(3)*> undef to <2 x i16*>
  %v3i16ptr = addrspacecast <3 x i16 addrspace(3)*> undef to <3 x i16*>
  %v4i16ptr = addrspacecast <4 x i16 addrspace(3)*> undef to <4 x i16*>
  %v32i16ptr = addrspacecast <32 x i16 addrspace(3)*> undef to <32 x i16*>
  %i32ptr = addrspacecast i32 addrspace(3)* undef to i32*
  %v2i32ptr = addrspacecast <2 x i32 addrspace(3)*> undef to <2 x i32*>
  %v3i32ptr = addrspacecast <3 x i32 addrspace(3)*> undef to <3 x i32*>
  %v4i32ptr = addrspacecast <4 x i32 addrspace(3)*> undef to <4 x i32*>
  %v32i32ptr = addrspacecast <32 x i32 addrspace(3)*> undef to <32 x i32*>
  %i64ptr = addrspacecast i64 addrspace(3)* undef to i64*
  %v2i64ptr = addrspacecast <2 x i64 addrspace(3)*> undef to <2 x i64*>
  %v3i64ptr = addrspacecast <3 x i64 addrspace(3)*> undef to <3 x i64*>
  %v4i64ptr = addrspacecast <4 x i64 addrspace(3)*> undef to <4 x i64*>
  %v32i64ptr = addrspacecast <32 x i64 addrspace(3)*> undef to <32 x i64*>
  ret void
}

define void @addrspacecast_flat_to_local() #0 {
; ALL-LABEL: 'addrspacecast_flat_to_local'
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast i8* undef to i8 addrspace(3)*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x i8*> undef to <2 x i8 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x i8*> undef to <3 x i8 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x i8*> undef to <4 x i8 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x i8*> undef to <32 x i8 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast i16* undef to i16 addrspace(3)*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x i16*> undef to <2 x i16 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x i16*> undef to <3 x i16 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x i16*> undef to <4 x i16 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x i16*> undef to <32 x i16 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast i32* undef to i32 addrspace(3)*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x i32*> undef to <2 x i32 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x i32*> undef to <3 x i32 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x i32*> undef to <4 x i32 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x i32*> undef to <32 x i32 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast i64* undef to i64 addrspace(3)*
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x i64*> undef to <2 x i64 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x i64*> undef to <3 x i64 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x i64*> undef to <4 x i64 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x i64*> undef to <32 x i64 addrspace(3)*>
; ALL-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; ALL-SIZE-LABEL: 'addrspacecast_flat_to_local'
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i8ptr = addrspacecast i8* undef to i8 addrspace(3)*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i8ptr = addrspacecast <2 x i8*> undef to <2 x i8 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i8ptr = addrspacecast <3 x i8*> undef to <3 x i8 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i8ptr = addrspacecast <4 x i8*> undef to <4 x i8 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i8ptr = addrspacecast <32 x i8*> undef to <32 x i8 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i16ptr = addrspacecast i16* undef to i16 addrspace(3)*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i16ptr = addrspacecast <2 x i16*> undef to <2 x i16 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i16ptr = addrspacecast <3 x i16*> undef to <3 x i16 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i16ptr = addrspacecast <4 x i16*> undef to <4 x i16 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i16ptr = addrspacecast <32 x i16*> undef to <32 x i16 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i32ptr = addrspacecast i32* undef to i32 addrspace(3)*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i32ptr = addrspacecast <2 x i32*> undef to <2 x i32 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i32ptr = addrspacecast <3 x i32*> undef to <3 x i32 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i32ptr = addrspacecast <4 x i32*> undef to <4 x i32 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i32ptr = addrspacecast <32 x i32*> undef to <32 x i32 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %i64ptr = addrspacecast i64* undef to i64 addrspace(3)*
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2i64ptr = addrspacecast <2 x i64*> undef to <2 x i64 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v3i64ptr = addrspacecast <3 x i64*> undef to <3 x i64 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v4i64ptr = addrspacecast <4 x i64*> undef to <4 x i64 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v32i64ptr = addrspacecast <32 x i64*> undef to <32 x i64 addrspace(3)*>
; ALL-SIZE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret void
;
  %i8ptr = addrspacecast i8* undef to i8 addrspace(3)*
  %v2i8ptr = addrspacecast <2 x i8*> undef to <2 x i8 addrspace(3)*>
  %v3i8ptr = addrspacecast <3 x i8*> undef to <3 x i8 addrspace(3)*>
  %v4i8ptr = addrspacecast <4 x i8*> undef to <4 x i8 addrspace(3)*>
  %v32i8ptr = addrspacecast <32 x i8*> undef to <32 x i8 addrspace(3)*>
  %i16ptr = addrspacecast i16* undef to i16 addrspace(3)*
  %v2i16ptr = addrspacecast <2 x i16*> undef to <2 x i16 addrspace(3)*>
  %v3i16ptr = addrspacecast <3 x i16*> undef to <3 x i16 addrspace(3)*>
  %v4i16ptr = addrspacecast <4 x i16*> undef to <4 x i16 addrspace(3)*>
  %v32i16ptr = addrspacecast <32 x i16*> undef to <32 x i16 addrspace(3)*>
  %i32ptr = addrspacecast i32* undef to i32 addrspace(3)*
  %v2i32ptr = addrspacecast <2 x i32*> undef to <2 x i32 addrspace(3)*>
  %v3i32ptr = addrspacecast <3 x i32*> undef to <3 x i32 addrspace(3)*>
  %v4i32ptr = addrspacecast <4 x i32*> undef to <4 x i32 addrspace(3)*>
  %v32i32ptr = addrspacecast <32 x i32*> undef to <32 x i32 addrspace(3)*>
  %i64ptr = addrspacecast i64* undef to i64 addrspace(3)*
  %v2i64ptr = addrspacecast <2 x i64*> undef to <2 x i64 addrspace(3)*>
  %v3i64ptr = addrspacecast <3 x i64*> undef to <3 x i64 addrspace(3)*>
  %v4i64ptr = addrspacecast <4 x i64*> undef to <4 x i64 addrspace(3)*>
  %v32i64ptr = addrspacecast <32 x i64*> undef to <32 x i64 addrspace(3)*>
  ret void
}

attributes #0 = { nounwind readnone }