10ff21d4ef8db3e81114a06d0dcdd79044ba18a3
[oota-llvm.git] / test / Other / constant-fold-gep.ll
1 ; "PLAIN" - No optimizations. This tests the target-independent
2 ; constant folder.
3 ; RUN: opt -S -o - < %s | FileCheck --check-prefix=PLAIN %s
4
5 ; "OPT" - Optimizations but no targetdata. This tests target-independent
6 ; folding in the optimizers.
7 ; RUN: opt -S -o - -instcombine -globalopt < %s | FileCheck --check-prefix=OPT %s
8
9 ; "TO" - Optimizations and targetdata. This tests target-dependent
10 ; folding in the optimizers.
11 ; RUN: opt -S -o - -instcombine -globalopt -default-data-layout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" < %s | FileCheck --check-prefix=TO %s
12
13 ; "SCEV" - ScalarEvolution but no targetdata.
14 ; RUN: opt -analyze -scalar-evolution < %s | FileCheck --check-prefix=SCEV %s
15
16 ; ScalarEvolution with targetdata isn't interesting on these testcases
17 ; because ScalarEvolution doesn't attempt to duplicate all of instcombine's
18 ; and the constant folders' folding.
19
20 ; PLAIN: %0 = type { i1, double }
21 ; PLAIN: %1 = type { double, float, double, double }
22 ; PLAIN: %2 = type { i64, i64 }
23 ; OPT: %0 = type { i1, double }
24 ; OPT: %1 = type { double, float, double, double }
25 ; OPT: %2 = type { i64, i64 }
26
27 ; The automatic constant folder in opt does not have targetdata access, so
28 ; it can't fold gep arithmetic, in general. However, the constant folder run
29 ; from instcombine and global opt can use targetdata.
30
31 ; PLAIN: @G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1)
32 ; PLAIN: @G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1)
33 ; PLAIN: @F8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2)
34 ; PLAIN: @F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2)
35 ; PLAIN: @H8 = global i8* getelementptr (i8* null, i32 -1)
36 ; PLAIN: @H1 = global i1* getelementptr (i1* null, i32 -1)
37 ; OPT: @G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1)
38 ; OPT: @G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1)
39 ; OPT: @F8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2)
40 ; OPT: @F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2)
41 ; OPT: @H8 = global i8* getelementptr (i8* null, i32 -1)
42 ; OPT: @H1 = global i1* getelementptr (i1* null, i32 -1)
43 ; TO: @G8 = global i8* null
44 ; TO: @G1 = global i1* null
45 ; TO: @F8 = global i8* inttoptr (i64 -1 to i8*)
46 ; TO: @F1 = global i1* inttoptr (i64 -1 to i1*)
47 ; TO: @H8 = global i8* inttoptr (i64 -1 to i8*)
48 ; TO: @H1 = global i1* inttoptr (i64 -1 to i1*)
49
50 @G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1)
51 @G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1)
52 @F8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2)
53 @F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2)
54 @H8 = global i8* getelementptr (i8* inttoptr (i32 0 to i8*), i32 -1)
55 @H1 = global i1* getelementptr (i1* inttoptr (i32 0 to i1*), i32 -1)
56
57 ; The target-independent folder should be able to do some clever
58 ; simplifications on sizeof, alignof, and offsetof expressions. The
59 ; target-dependent folder should fold these down to constants.
60
61 ; PLAIN: @a = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310)
62 ; PLAIN: @b = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
63 ; PLAIN: @c = constant i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2)
64 ; PLAIN: @d = constant i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11)
65 ; PLAIN: @e = constant i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64)
66 ; PLAIN: @f = constant i64 1
67 ; PLAIN: @g = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
68 ; OPT: @a = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310)
69 ; OPT: @b = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
70 ; OPT: @c = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2)
71 ; OPT: @d = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11)
72 ; OPT: @e = constant i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64)
73 ; OPT: @f = constant i64 1
74 ; OPT: @g = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
75 ; TO: @a = constant i64 18480
76 ; TO: @b = constant i64 8
77 ; TO: @c = constant i64 16
78 ; TO: @d = constant i64 88
79 ; TO: @e = constant i64 16
80 ; TO: @f = constant i64 1
81 ; TO: @g = constant i64 8
82
83 @a = constant i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5))
84 @b = constant i64 ptrtoint ([13 x double]* getelementptr ({i1, [13 x double]}* null, i64 0, i32 1) to i64)
85 @c = constant i64 ptrtoint (double* getelementptr ({double, double, double, double}* null, i64 0, i32 2) to i64)
86 @d = constant i64 ptrtoint (double* getelementptr ([13 x double]* null, i64 0, i32 11) to i64)
87 @e = constant i64 ptrtoint (double* getelementptr ({double, float, double, double}* null, i64 0, i32 2) to i64)
88 @f = constant i64 ptrtoint (<{ i16, i128 }>* getelementptr ({i1, <{ i16, i128 }>}* null, i64 0, i32 1) to i64)
89 @g = constant i64 ptrtoint ({double, double}* getelementptr ({i1, {double, double}}* null, i64 0, i32 1) to i64)
90
91 ; The target-dependent folder should cast GEP indices to integer-sized pointers.
92
93 ; PLAIN: @M = constant i64* getelementptr (i64* null, i32 1)
94 ; PLAIN: @N = constant i64* getelementptr (%2* null, i32 0, i32 1)
95 ; PLAIN: @O = constant i64* getelementptr ([2 x i64]* null, i32 0, i32 1)
96 ; OPT: @M = constant i64* getelementptr (i64* null, i32 1)
97 ; OPT: @N = constant i64* getelementptr (%2* null, i32 0, i32 1)
98 ; OPT: @O = constant i64* getelementptr ([2 x i64]* null, i32 0, i32 1)
99 ; TO: @M = constant i64* inttoptr (i64 8 to i64*)
100 ; TO: @N = constant i64* inttoptr (i64 8 to i64*)
101 ; TO: @O = constant i64* inttoptr (i64 8 to i64*)
102
103 @M = constant i64* getelementptr (i64 *null, i32 1)
104 @N = constant i64* getelementptr ({ i64, i64 } *null, i32 0, i32 1)
105 @O = constant i64* getelementptr ([2 x i64] *null, i32 0, i32 1)
106
107 ; Duplicate all of the above as function return values rather than
108 ; global initializers.
109
110 ; PLAIN: define i8* @goo8() nounwind {
111 ; PLAIN:   %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) to i8*
112 ; PLAIN:   ret i8* %t
113 ; PLAIN: }
114 ; PLAIN: define i1* @goo1() nounwind {
115 ; PLAIN:   %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) to i1*
116 ; PLAIN:   ret i1* %t
117 ; PLAIN: }
118 ; PLAIN: define i8* @foo8() nounwind {
119 ; PLAIN:   %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) to i8*
120 ; PLAIN:   ret i8* %t
121 ; PLAIN: }
122 ; PLAIN: define i1* @foo1() nounwind {
123 ; PLAIN:   %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) to i1*
124 ; PLAIN:   ret i1* %t
125 ; PLAIN: }
126 ; PLAIN: define i8* @hoo8() nounwind {
127 ; PLAIN:   %t = bitcast i8* getelementptr (i8* null, i32 -1) to i8*
128 ; PLAIN:   ret i8* %t
129 ; PLAIN: }
130 ; PLAIN: define i1* @hoo1() nounwind {
131 ; PLAIN:   %t = bitcast i1* getelementptr (i1* null, i32 -1) to i1*
132 ; PLAIN:   ret i1* %t
133 ; PLAIN: }
134 ; OPT: define i8* @goo8() nounwind {
135 ; OPT:   ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1)
136 ; OPT: }
137 ; OPT: define i1* @goo1() nounwind {
138 ; OPT:   ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1)
139 ; OPT: }
140 ; OPT: define i8* @foo8() nounwind {
141 ; OPT:   ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2)
142 ; OPT: }
143 ; OPT: define i1* @foo1() nounwind {
144 ; OPT:   ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2)
145 ; OPT: }
146 ; OPT: define i8* @hoo8() nounwind {
147 ; OPT:   ret i8* getelementptr (i8* null, i32 -1)
148 ; OPT: }
149 ; OPT: define i1* @hoo1() nounwind {
150 ; OPT:   ret i1* getelementptr (i1* null, i32 -1)
151 ; OPT: }
152 ; TO: define i8* @goo8() nounwind {
153 ; TO:   ret i8* null
154 ; TO: }
155 ; TO: define i1* @goo1() nounwind {
156 ; TO:   ret i1* null
157 ; TO: }
158 ; TO: define i8* @foo8() nounwind {
159 ; TO:   ret i8* inttoptr (i64 -1 to i8*)
160 ; TO: }
161 ; TO: define i1* @foo1() nounwind {
162 ; TO:   ret i1* inttoptr (i64 -1 to i1*)
163 ; TO: }
164 ; TO: define i8* @hoo8() nounwind {
165 ; TO:   ret i8* inttoptr (i64 -1 to i8*)
166 ; TO: }
167 ; TO: define i1* @hoo1() nounwind {
168 ; TO:   ret i1* inttoptr (i64 -1 to i1*)
169 ; TO: }
170 ; SCEV: Classifying expressions for: @goo8
171 ; SCEV:   %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) to i8*
172 ; SCEV:   -->  ((-1 * sizeof(i8)) + inttoptr (i32 1 to i8*))
173 ; SCEV: Classifying expressions for: @goo1
174 ; SCEV:   %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) to i1*
175 ; SCEV:   -->  ((-1 * sizeof(i1)) + inttoptr (i32 1 to i1*))
176 ; SCEV: Classifying expressions for: @foo8
177 ; SCEV:   %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) to i8*
178 ; SCEV:   -->  ((-2 * sizeof(i8)) + inttoptr (i32 1 to i8*))
179 ; SCEV: Classifying expressions for: @foo1
180 ; SCEV:   %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) to i1*
181 ; SCEV:   -->  ((-2 * sizeof(i1)) + inttoptr (i32 1 to i1*))
182 ; SCEV: Classifying expressions for: @hoo8
183 ; SCEV:   -->  (-1 * sizeof(i8))
184 ; SCEV: Classifying expressions for: @hoo1
185 ; SCEV:   -->  (-1 * sizeof(i1))
186
187 define i8* @goo8() nounwind {
188   %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) to i8*
189   ret i8* %t
190 }
191 define i1* @goo1() nounwind {
192   %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) to i1*
193   ret i1* %t
194 }
195 define i8* @foo8() nounwind {
196   %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) to i8*
197   ret i8* %t
198 }
199 define i1* @foo1() nounwind {
200   %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) to i1*
201   ret i1* %t
202 }
203 define i8* @hoo8() nounwind {
204   %t = bitcast i8* getelementptr (i8* inttoptr (i32 0 to i8*), i32 -1) to i8*
205   ret i8* %t
206 }
207 define i1* @hoo1() nounwind {
208   %t = bitcast i1* getelementptr (i1* inttoptr (i32 0 to i1*), i32 -1) to i1*
209   ret i1* %t
210 }
211
212 ; PLAIN: define i64 @fa() nounwind {
213 ; PLAIN:   %t = bitcast i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) to i64
214 ; PLAIN:   ret i64 %t
215 ; PLAIN: }
216 ; PLAIN: define i64 @fb() nounwind {
217 ; PLAIN:   %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64
218 ; PLAIN:   ret i64 %t
219 ; PLAIN: }
220 ; PLAIN: define i64 @fc() nounwind {
221 ; PLAIN:   %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) to i64
222 ; PLAIN:   ret i64 %t
223 ; PLAIN: }
224 ; PLAIN: define i64 @fd() nounwind {
225 ; PLAIN:   %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) to i64
226 ; PLAIN:   ret i64 %t
227 ; PLAIN: }
228 ; PLAIN: define i64 @fe() nounwind {
229 ; PLAIN:   %t = bitcast i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) to i64
230 ; PLAIN:   ret i64 %t
231 ; PLAIN: }
232 ; PLAIN: define i64 @ff() nounwind {
233 ; PLAIN:   %t = bitcast i64 1 to i64
234 ; PLAIN:   ret i64 %t
235 ; PLAIN: }
236 ; PLAIN: define i64 @fg() nounwind {
237 ; PLAIN:   %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
238 ; PLAIN:   ret i64 %t
239 ; PLAIN: }
240 ; OPT: define i64 @fa() nounwind {
241 ; OPT:   ret i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310)
242 ; OPT: }
243 ; OPT: define i64 @fb() nounwind {
244 ; OPT:   ret i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
245 ; OPT: }
246 ; OPT: define i64 @fc() nounwind {
247 ; OPT:   ret i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2)
248 ; OPT: }
249 ; OPT: define i64 @fd() nounwind {
250 ; OPT:   ret i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11)
251 ; OPT: }
252 ; OPT: define i64 @fe() nounwind {
253 ; OPT:   ret i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64)
254 ; OPT: }
255 ; OPT: define i64 @ff() nounwind {
256 ; OPT:   ret i64 1
257 ; OPT: }
258 ; OPT: define i64 @fg() nounwind {
259 ; OPT:   ret i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
260 ; OPT: }
261 ; TO: define i64 @fa() nounwind {
262 ; TO:   ret i64 18480
263 ; TO: }
264 ; TO: define i64 @fb() nounwind {
265 ; TO:   ret i64 8
266 ; TO: }
267 ; TO: define i64 @fc() nounwind {
268 ; TO:   ret i64 16
269 ; TO: }
270 ; TO: define i64 @fd() nounwind {
271 ; TO:   ret i64 88
272 ; TO: }
273 ; TO: define i64 @fe() nounwind {
274 ; TO:   ret i64 16
275 ; TO: }
276 ; TO: define i64 @ff() nounwind {
277 ; TO:   ret i64 1
278 ; TO: }
279 ; TO: define i64 @fg() nounwind {
280 ; TO:   ret i64 8
281 ; TO: }
282 ; SCEV: Classifying expressions for: @fa
283 ; SCEV:   %t = bitcast i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) to i64 
284 ; SCEV:   -->  (2310 * sizeof(double))
285 ; SCEV: Classifying expressions for: @fb
286 ; SCEV:   %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 
287 ; SCEV:   -->  alignof(double)
288 ; SCEV: Classifying expressions for: @fc
289 ; SCEV:   %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) to i64 
290 ; SCEV:   -->  (2 * sizeof(double))
291 ; SCEV: Classifying expressions for: @fd
292 ; SCEV:   %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) to i64 
293 ; SCEV:   -->  (11 * sizeof(double))
294 ; SCEV: Classifying expressions for: @fe
295 ; SCEV:   %t = bitcast i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) to i64 
296 ; SCEV:   -->  offsetof({ double, float, double, double }, 2)
297 ; SCEV: Classifying expressions for: @ff
298 ; SCEV:   %t = bitcast i64 1 to i64 
299 ; SCEV:   -->  1
300 ; SCEV: Classifying expressions for: @fg
301 ; SCEV:   %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64)
302 ; SCEV:   -->  alignof(double)
303
304 define i64 @fa() nounwind {
305   %t = bitcast i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) to i64
306   ret i64 %t
307 }
308 define i64 @fb() nounwind {
309   %t = bitcast i64 ptrtoint ([13 x double]* getelementptr ({i1, [13 x double]}* null, i64 0, i32 1) to i64) to i64
310   ret i64 %t
311 }
312 define i64 @fc() nounwind {
313   %t = bitcast i64 ptrtoint (double* getelementptr ({double, double, double, double}* null, i64 0, i32 2) to i64) to i64
314   ret i64 %t
315 }
316 define i64 @fd() nounwind {
317   %t = bitcast i64 ptrtoint (double* getelementptr ([13 x double]* null, i64 0, i32 11) to i64) to i64
318   ret i64 %t
319 }
320 define i64 @fe() nounwind {
321   %t = bitcast i64 ptrtoint (double* getelementptr ({double, float, double, double}* null, i64 0, i32 2) to i64) to i64
322   ret i64 %t
323 }
324 define i64 @ff() nounwind {
325   %t = bitcast i64 ptrtoint (<{ i16, i128 }>* getelementptr ({i1, <{ i16, i128 }>}* null, i64 0, i32 1) to i64) to i64
326   ret i64 %t
327 }
328 define i64 @fg() nounwind {
329   %t = bitcast i64 ptrtoint ({double, double}* getelementptr ({i1, {double, double}}* null, i64 0, i32 1) to i64) to i64
330   ret i64 %t
331 }
332
333 ; PLAIN: define i64* @fM() nounwind {
334 ; PLAIN:   %t = bitcast i64* getelementptr (i64* null, i32 1) to i64*
335 ; PLAIN:   ret i64* %t
336 ; PLAIN: }
337 ; PLAIN: define i64* @fN() nounwind {
338 ; PLAIN:   %t = bitcast i64* getelementptr (%2* null, i32 0, i32 1) to i64*
339 ; PLAIN:   ret i64* %t
340 ; PLAIN: }
341 ; PLAIN: define i64* @fO() nounwind {
342 ; PLAIN:   %t = bitcast i64* getelementptr ([2 x i64]* null, i32 0, i32 1) to i64*
343 ; PLAIN:   ret i64* %t
344 ; PLAIN: }
345 ; OPT: define i64* @fM() nounwind {
346 ; OPT:   ret i64* getelementptr (i64* null, i32 1)
347 ; OPT: }
348 ; OPT: define i64* @fN() nounwind {
349 ; OPT:   ret i64* getelementptr (%2* null, i32 0, i32 1)
350 ; OPT: }
351 ; OPT: define i64* @fO() nounwind {
352 ; OPT:   ret i64* getelementptr ([2 x i64]* null, i32 0, i32 1)
353 ; OPT: }
354 ; TO: define i64* @fM() nounwind {
355 ; TO:   ret i64* inttoptr (i64 8 to i64*)
356 ; TO: }
357 ; TO: define i64* @fN() nounwind {
358 ; TO:   ret i64* inttoptr (i64 8 to i64*)
359 ; TO: }
360 ; TO: define i64* @fO() nounwind {
361 ; TO:   ret i64* inttoptr (i64 8 to i64*)
362 ; TO: }
363 ; SCEV: Classifying expressions for: @fM
364 ; SCEV:   %t = bitcast i64* getelementptr (i64* null, i32 1) to i64* 
365 ; SCEV:   -->  sizeof(i64)
366 ; SCEV: Classifying expressions for: @fN
367 ; SCEV:   %t = bitcast i64* getelementptr (%2* null, i32 0, i32 1) to i64* 
368 ; SCEV:   -->  sizeof(i64)
369 ; SCEV: Classifying expressions for: @fO
370 ; SCEV:   %t = bitcast i64* getelementptr ([2 x i64]* null, i32 0, i32 1) to i64* 
371 ; SCEV:   -->  sizeof(i64)
372
373 define i64* @fM() nounwind {
374   %t = bitcast i64* getelementptr (i64 *null, i32 1) to i64*
375   ret i64* %t
376 }
377 define i64* @fN() nounwind {
378   %t = bitcast i64* getelementptr ({ i64, i64 } *null, i32 0, i32 1) to i64*
379   ret i64* %t
380 }
381 define i64* @fO() nounwind {
382   %t = bitcast i64* getelementptr ([2 x i64] *null, i32 0, i32 1) to i64*
383   ret i64* %t
384 }