-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoLlvm.test.ts.snap
532 lines (482 loc) · 21.3 KB
/
toLlvm.test.ts.snap
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`toLlvm 1`] = `
"; ModuleID = 'alia'
source_filename = \\"alia\\"
@str_0 = private unnamed_addr constant [6 x i8] c\\"left_\\\\00\\", align 1
@str_1 = private unnamed_addr constant [2 x i8] c\\"\\\\0A\\\\00\\", align 1
@str_2 = private unnamed_addr constant [7 x i8] c\\"right_\\\\00\\", align 1
@str_3 = private unnamed_addr constant [35 x i8] c\\"Calling a function using pointer:\\\\0A\\\\00\\", align 1
@str_4 = private unnamed_addr constant [24 x i8] c\\"Function as an actual:\\\\0A\\\\00\\", align 1
@str_5 = private unnamed_addr constant [52 x i8] c\\"Calling a function returned from another function:\\\\0A\\\\00\\", align 1
@str_6 = private unnamed_addr constant [7 x i8] c\\"Test #\\\\00\\", align 1
@str_7 = private unnamed_addr constant [3 x i8] c\\": \\\\00\\", align 1
@str_8 = private unnamed_addr constant [6 x i8] c\\"Pass\\\\0A\\\\00\\", align 1
@str_9 = private unnamed_addr constant [6 x i8] c\\"Fail\\\\0A\\\\00\\", align 1
@str_10 = private unnamed_addr constant [6 x i8] c\\"FAIL\\\\0A\\\\00\\", align 1
@str_11 = private unnamed_addr constant [11 x i8] c\\"Expected: \\\\00\\", align 1
@str_12 = private unnamed_addr constant [11 x i8] c\\"\\\\0AReceived:\\\\00\\", align 1
@str_13 = private unnamed_addr constant [3 x i8] c\\"\\\\0A\\\\0A\\\\00\\", align 1
@str_14 = private unnamed_addr constant [8 x i8] c\\"Passed \\\\00\\", align 1
@str_15 = private unnamed_addr constant [5 x i8] c\\" of \\\\00\\", align 1
@str_16 = private unnamed_addr constant [10 x i8] c\\" tests\\\\0A\\\\0A\\\\0A\\\\00\\", align 1
@str_17 = private unnamed_addr constant [10 x i8] c\\"Section #\\\\00\\", align 1
@str_18 = private unnamed_addr constant [3 x i8] c\\":\\\\0A\\\\00\\", align 1
@global_globalPointer = global i64 (i64)* null
@global_failCount = global i64 0
@global_totalCount = global i64 0
@global_testNumber = global i64 0
@global_var = global i64 0
@str_0.1 = private unnamed_addr constant [6 x i8] c\\"left_\\\\00\\", align 1
@str_1.2 = private unnamed_addr constant [2 x i8] c\\"\\\\0A\\\\00\\", align 1
@str_2.3 = private unnamed_addr constant [7 x i8] c\\"right_\\\\00\\", align 1
@str_3.4 = private unnamed_addr constant [35 x i8] c\\"Calling a function using pointer:\\\\0A\\\\00\\", align 1
@str_4.5 = private unnamed_addr constant [24 x i8] c\\"Function as an actual:\\\\0A\\\\00\\", align 1
@str_5.6 = private unnamed_addr constant [52 x i8] c\\"Calling a function returned from another function:\\\\0A\\\\00\\", align 1
@str_6.7 = private unnamed_addr constant [7 x i8] c\\"Test #\\\\00\\", align 1
@str_7.8 = private unnamed_addr constant [3 x i8] c\\": \\\\00\\", align 1
@str_8.9 = private unnamed_addr constant [6 x i8] c\\"Pass\\\\0A\\\\00\\", align 1
@str_9.10 = private unnamed_addr constant [6 x i8] c\\"Fail\\\\0A\\\\00\\", align 1
@str_10.11 = private unnamed_addr constant [6 x i8] c\\"FAIL\\\\0A\\\\00\\", align 1
@str_11.12 = private unnamed_addr constant [11 x i8] c\\"Expected: \\\\00\\", align 1
@str_12.13 = private unnamed_addr constant [11 x i8] c\\"\\\\0AReceived:\\\\00\\", align 1
@str_13.14 = private unnamed_addr constant [3 x i8] c\\"\\\\0A\\\\0A\\\\00\\", align 1
@str_14.15 = private unnamed_addr constant [8 x i8] c\\"Passed \\\\00\\", align 1
@str_15.16 = private unnamed_addr constant [5 x i8] c\\" of \\\\00\\", align 1
@str_16.17 = private unnamed_addr constant [10 x i8] c\\" tests\\\\0A\\\\0A\\\\0A\\\\00\\", align 1
@str_17.18 = private unnamed_addr constant [10 x i8] c\\"Section #\\\\00\\", align 1
@str_18.19 = private unnamed_addr constant [3 x i8] c\\":\\\\0A\\\\00\\", align 1
declare extern_weak i64 @mayhem()
declare extern_weak void @printBool(i64)
declare extern_weak void @printInt(i64)
declare extern_weak void @printString(i8*)
declare extern_weak i64 @getBool()
declare extern_weak i64 @getInt()
define i64 @global_break() {
entry:
ret i64 0
}
define i64 @global_left(i64 %a) {
entry:
%a1 = alloca i64, align 8
store i64 %a, i64* %a1, align 4
call void @printString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str_0, i32 0, i32 0))
%a2 = load i64, i64* %a1, align 4
call void @printInt(i64 %a2)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
ret i64 0
}
define i64 @global_right(i64 %a) {
entry:
%a1 = alloca i64, align 8
store i64 %a, i64* %a1, align 4
call void @printString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str_2, i32 0, i32 0))
%a2 = load i64, i64* %a1, align 4
call void @printInt(i64 %a2)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
ret i64 0
}
define i64 (i64)* @global_twice(i64 (i64)* %f, i64 %a) {
entry:
%f1 = alloca i64 (i64)*, align 8
store i64 (i64)* %f, i64 (i64)** %f1, align 8
%a2 = alloca i64, align 8
store i64 %a, i64* %a2, align 4
%a3 = load i64, i64* %a2, align 4
%f4 = load i64 (i64)*, i64 (i64)** %f1, align 8
%calltmp = call i64 %f4(i64 %a3)
%a5 = load i64, i64* %a2, align 4
%f6 = load i64 (i64)*, i64 (i64)** %f1, align 8
%calltmp7 = call i64 %f6(i64 %a5)
%f8 = load i64 (i64)*, i64 (i64)** %f1, align 8
ret i64 (i64)* %f8
deadCodeAfterReturn: ; No predecessors!
ret i64 (i64)* null
}
define i64 @global_testFunctionPointers() {
entry:
%localPointer = alloca i64 (i64)*, align 8
store i64 (i64)* null, i64 (i64)** %localPointer, align 8
%a = alloca i64, align 8
store i64 0, i64* %a, align 4
%calltmp = call i64 @mayhem()
store i64 %calltmp, i64* %a, align 4
%b = alloca i64, align 8
store i64 0, i64* %b, align 4
%calltmp1 = call i64 @mayhem()
store i64 %calltmp1, i64* %b, align 4
%a2 = load i64, i64* %a, align 4
%b3 = load i64, i64* %b, align 4
%sgttmp = icmp sgt i64 %a2, %b3
%0 = sext i1 %sgttmp to i64
%ifcond = icmp ne i64 %0, 0
br i1 %ifcond, label %then, label %else
then: ; preds = %entry
store i64 (i64)* @global_left, i64 (i64)** @global_globalPointer, align 8
store i64 (i64)* @global_right, i64 (i64)** %localPointer, align 8
br label %ifcont
else: ; preds = %entry
store i64 (i64)* @global_right, i64 (i64)** @global_globalPointer, align 8
store i64 (i64)* @global_left, i64 (i64)** %localPointer, align 8
br label %ifcont
ifcont: ; preds = %else, %then
%calltmp4 = call i64 @global_break()
call void @printString(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @str_3, i32 0, i32 0))
%b5 = load i64, i64* %b, align 4
%localPointer6 = load i64 (i64)*, i64 (i64)** %localPointer, align 8
%calltmp7 = call i64 %localPointer6(i64 %b5)
%result = alloca i64 (i64)*, align 8
store i64 (i64)* null, i64 (i64)** %result, align 8
call void @printString(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_4, i32 0, i32 0))
%globalPointer = load i64 (i64)*, i64 (i64)** @global_globalPointer, align 8
%a8 = load i64, i64* %a, align 4
%calltmp9 = call i64 (i64)* @global_twice(i64 (i64)* %globalPointer, i64 %a8)
store i64 (i64)* %calltmp9, i64 (i64)** %result, align 8
call void @printString(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @str_5, i32 0, i32 0))
%a10 = load i64, i64* %a, align 4
%result11 = load i64 (i64)*, i64 (i64)** %result, align 8
%calltmp12 = call i64 %result11(i64 %a10)
ret i64 0
}
define i64 @global_assertBool(i64 %result) {
entry:
%result1 = alloca i64, align 8
store i64 %result, i64* %result1, align 4
%totalCount = load i64, i64* @global_totalCount, align 4
%addtmp = add i64 %totalCount, 1
store i64 %addtmp, i64* @global_totalCount, align 4
call void @printString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str_6, i32 0, i32 0))
%totalCount2 = load i64, i64* @global_totalCount, align 4
call void @printInt(i64 %totalCount2)
call void @printString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str_7, i32 0, i32 0))
%result3 = load i64, i64* %result1, align 4
%ifcond = icmp ne i64 %result3, 0
br i1 %ifcond, label %then, label %else
then: ; preds = %entry
call void @printString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str_8, i32 0, i32 0))
br label %ifcont
else: ; preds = %entry
call void @printString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str_9, i32 0, i32 0))
%failCount = load i64, i64* @global_failCount, align 4
%addtmp4 = add i64 %failCount, 1
store i64 %addtmp4, i64* @global_failCount, align 4
br label %ifcont
ifcont: ; preds = %else, %then
ret i64 0
}
define i64 @global_not(i64 %a) {
entry:
%a1 = alloca i64, align 8
store i64 %a, i64* %a1, align 4
%a2 = load i64, i64* %a1, align 4
%nottmp = xor i64 %a2, -1
%booltmp = trunc i64 %nottmp to i1
%0 = sext i1 %booltmp to i64
ret i64 %0
deadCodeAfterReturn: ; No predecessors!
ret i64 0
}
define i64 @global_assert(i64 %result, i64 %expected) {
entry:
%result1 = alloca i64, align 8
store i64 %result, i64* %result1, align 4
%expected2 = alloca i64, align 8
store i64 %expected, i64* %expected2, align 4
%totalCount = load i64, i64* @global_totalCount, align 4
%addtmp = add i64 %totalCount, 1
store i64 %addtmp, i64* @global_totalCount, align 4
call void @printString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str_6, i32 0, i32 0))
%totalCount3 = load i64, i64* @global_totalCount, align 4
call void @printInt(i64 %totalCount3)
call void @printString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str_7, i32 0, i32 0))
%result4 = load i64, i64* %result1, align 4
%expected5 = load i64, i64* %expected2, align 4
%seteq = icmp eq i64 %result4, %expected5
%0 = sext i1 %seteq to i64
%ifcond = icmp ne i64 %0, 0
br i1 %ifcond, label %then, label %else
then: ; preds = %entry
call void @printString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str_8, i32 0, i32 0))
br label %ifcont
else: ; preds = %entry
call void @printString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str_10, i32 0, i32 0))
call void @printString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str_11, i32 0, i32 0))
%expected6 = load i64, i64* %expected2, align 4
call void @printInt(i64 %expected6)
call void @printString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str_12, i32 0, i32 0))
%result7 = load i64, i64* %result1, align 4
call void @printInt(i64 %result7)
call void @printString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str_13, i32 0, i32 0))
%failCount = load i64, i64* @global_failCount, align 4
%addtmp8 = add i64 %failCount, 1
store i64 %addtmp8, i64* @global_failCount, align 4
br label %ifcont
ifcont: ; preds = %else, %then
ret i64 0
}
define i64 @global_printSummary() {
entry:
call void @printString(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str_14, i32 0, i32 0))
%totalCount = load i64, i64* @global_totalCount, align 4
%failCount = load i64, i64* @global_failCount, align 4
%subtmp = sub i64 %totalCount, %failCount
call void @printInt(i64 %subtmp)
call void @printString(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str_15, i32 0, i32 0))
%totalCount1 = load i64, i64* @global_totalCount, align 4
call void @printInt(i64 %totalCount1)
call void @printString(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str_16, i32 0, i32 0))
ret i64 0
}
define i64 @global_printTestHeader() {
entry:
%testNumber = load i64, i64* @global_testNumber, align 4
%addtmp = add i64 %testNumber, 1
store i64 %addtmp, i64* @global_testNumber, align 4
call void @printString(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str_17, i32 0, i32 0))
%testNumber1 = load i64, i64* @global_testNumber, align 4
call void @printInt(i64 %testNumber1)
call void @printString(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str_18, i32 0, i32 0))
ret i64 0
}
define i64 @global_testLoops() {
entry:
%i = alloca i64, align 8
store i64 0, i64* %i, align 4
br label %then
then: ; preds = %then2, %entry
%i1 = load i64, i64* %i, align 4
%slttmp = icmp slt i64 %i1, 10
%0 = sext i1 %slttmp to i64
%ifcond = icmp ne i64 %0, 0
br i1 %ifcond, label %then2, label %else
then2: ; preds = %then
%i3 = load i64, i64* %i, align 4
call void @printInt(i64 %i3)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%i4 = load i64, i64* %i, align 4
%addtmp = add i64 %i4, 1
store i64 %addtmp, i64* %i, align 4
br label %then
else: ; preds = %then
br label %ifcont
ifcont: ; preds = %else
%b = alloca i64, align 8
store i64 0, i64* %b, align 4
store i64 10, i64* %b, align 4
br label %then5
then5: ; preds = %then8, %ifcont
%b6 = load i64, i64* %b, align 4
%sgttmp = icmp sgt i64 %b6, 0
%1 = sext i1 %sgttmp to i64
%ifcond7 = icmp ne i64 %1, 0
br i1 %ifcond7, label %then8, label %else12
then8: ; preds = %then5
%b9 = load i64, i64* %b, align 4
call void @printInt(i64 %b9)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%b10 = load i64, i64* %b, align 4
%addtmp11 = sub i64 %b10, 1
store i64 %addtmp11, i64* %b, align 4
br label %then5
else12: ; preds = %then5
br label %ifcont13
ifcont13: ; preds = %else12
ret i64 0
}
define i64 @global_testOperators() {
entry:
%calltmp = call i64 @global_assertBool(i64 1)
%calltmp1 = call i64 @global_assertBool(i64 1)
%calltmp2 = call i64 @global_not(i64 0)
%calltmp3 = call i64 @global_assertBool(i64 %calltmp2)
%calltmp4 = call i64 @global_assertBool(i64 1)
%calltmp5 = call i64 @global_not(i64 0)
%calltmp6 = call i64 @global_assertBool(i64 %calltmp5)
%calltmp7 = call i64 @global_assertBool(i64 1)
%calltmp8 = call i64 @global_not(i64 0)
%calltmp9 = call i64 @global_assertBool(i64 %calltmp8)
%calltmp10 = call i64 @global_not(i64 0)
%calltmp11 = call i64 @global_assertBool(i64 %calltmp10)
%calltmp12 = call i64 @global_assertBool(i64 -1)
%calltmp13 = call i64 @global_not(i64 0)
%calltmp14 = call i64 @global_assertBool(i64 %calltmp13)
%calltmp15 = call i64 @global_not(i64 0)
%calltmp16 = call i64 @global_assertBool(i64 %calltmp15)
%calltmp17 = call i64 @global_not(i64 0)
%calltmp18 = call i64 @global_assertBool(i64 %calltmp17)
%calltmp19 = call i64 @global_not(i64 0)
%calltmp20 = call i64 @global_assertBool(i64 %calltmp19)
%calltmp21 = call i64 @global_assertBool(i64 -1)
%calltmp22 = call i64 @global_assertBool(i64 -1)
%calltmp23 = call i64 @global_assertBool(i64 -1)
%calltmp24 = call i64 @global_not(i64 0)
%calltmp25 = call i64 @global_assertBool(i64 %calltmp24)
%calltmp26 = call i64 @global_not(i64 0)
%calltmp27 = call i64 @global_assertBool(i64 %calltmp26)
%calltmp28 = call i64 @global_assertBool(i64 -1)
%calltmp29 = call i64 @global_assertBool(i64 -1)
%calltmp30 = call i64 @global_not(i64 0)
%calltmp31 = call i64 @global_assertBool(i64 %calltmp30)
%calltmp32 = call i64 @global_assertBool(i64 -1)
%calltmp33 = call i64 @global_assertBool(i64 -1)
%calltmp34 = call i64 @global_not(i64 0)
%calltmp35 = call i64 @global_assertBool(i64 %calltmp34)
%calltmp36 = call i64 @global_assert(i64 5, i64 5)
%calltmp37 = call i64 @global_assert(i64 -1, i64 -1)
%calltmp38 = call i64 @global_assert(i64 6, i64 6)
%calltmp39 = call i64 @global_assert(i64 2, i64 2)
ret i64 0
}
define i64 @global_testShadowingHelper() {
entry:
store i64 4, i64* @global_var, align 4
%var = alloca i64, align 8
store i64 0, i64* %var, align 4
store i64 2, i64* %var, align 4
%var1 = load i64, i64* %var, align 4
ret i64 %var1
deadCodeAfterReturn: ; No predecessors!
ret i64 0
}
define i64 @global_testShadowing() {
entry:
%returnValue = alloca i64, align 8
store i64 0, i64* %returnValue, align 4
%calltmp = call i64 @global_testShadowingHelper()
store i64 %calltmp, i64* %returnValue, align 4
%var = load i64, i64* @global_var, align 4
%calltmp1 = call i64 @global_assert(i64 %var, i64 4)
%returnValue2 = load i64, i64* %returnValue, align 4
%calltmp3 = call i64 @global_assert(i64 %returnValue2, i64 2)
ret i64 0
}
define i64 @global_testLongExpression(i64 %isFirstCall) {
entry:
%isFirstCall1 = alloca i64, align 8
store i64 %isFirstCall, i64* %isFirstCall1, align 4
%a = alloca i64, align 8
store i64 0, i64* %a, align 4
store i64 1, i64* %a, align 4
%b = alloca i64, align 8
store i64 0, i64* %b, align 4
store i64 2, i64* %b, align 4
%c = alloca i64, align 8
store i64 0, i64* %c, align 4
store i64 3, i64* %c, align 4
%d = alloca i64, align 8
store i64 0, i64* %d, align 4
store i64 4, i64* %d, align 4
%e = alloca i64, align 8
store i64 0, i64* %e, align 4
store i64 5, i64* %e, align 4
%f = alloca i64, align 8
store i64 0, i64* %f, align 4
store i64 6, i64* %f, align 4
%g = alloca i64, align 8
store i64 0, i64* %g, align 4
store i64 7, i64* %g, align 4
%isFirstCall2 = load i64, i64* %isFirstCall1, align 4
%ifcond = icmp ne i64 %isFirstCall2, 0
br i1 %ifcond, label %then, label %else
then: ; preds = %entry
%a3 = load i64, i64* %a, align 4
%b4 = load i64, i64* %b, align 4
%addtmp = add i64 %a3, %b4
%d5 = load i64, i64* %d, align 4
%c6 = load i64, i64* %c, align 4
%divtmp = sdiv i64 %d5, %c6
%multtmp = mul i64 %addtmp, %divtmp
%calltmp = call i64 @global_testLongExpression(i64 0)
%e7 = load i64, i64* %e, align 4
%divtmp8 = sdiv i64 %calltmp, %e7
%subtmp = sub i64 %multtmp, %divtmp8
store i64 %subtmp, i64* %a, align 4
%a9 = load i64, i64* %a, align 4
%calltmp10 = call i64 @global_assert(i64 %a9, i64 -2)
br label %ifcont
else: ; preds = %entry
%a11 = load i64, i64* %a, align 4
%b12 = load i64, i64* %b, align 4
%c13 = load i64, i64* %c, align 4
%d14 = load i64, i64* %d, align 4
%e15 = load i64, i64* %e, align 4
%f16 = load i64, i64* %f, align 4
%g17 = load i64, i64* %g, align 4
%addtmp18 = add i64 %f16, %g17
%addtmp19 = add i64 %e15, %addtmp18
%addtmp20 = add i64 %d14, %addtmp19
%addtmp21 = add i64 %c13, %addtmp20
%addtmp22 = add i64 %b12, %addtmp21
%addtmp23 = add i64 %a11, %addtmp22
store i64 %addtmp23, i64* %a, align 4
%a24 = load i64, i64* %a, align 4
%calltmp25 = call i64 @global_assert(i64 %a24, i64 28)
%a26 = load i64, i64* %a, align 4
ret i64 %a26
deadCodeAfterReturn: ; No predecessors!
br label %ifcont
ifcont: ; preds = %deadCodeAfterReturn, %then
ret i64 0
}
define i64 @global_tonOfArguments(i64 %a, i64 %b, i64 %c, i64 %d, i64 %e, i64 %f, i64 %g) {
entry:
%a1 = alloca i64, align 8
store i64 %a, i64* %a1, align 4
%b2 = alloca i64, align 8
store i64 %b, i64* %b2, align 4
%c3 = alloca i64, align 8
store i64 %c, i64* %c3, align 4
%d4 = alloca i64, align 8
store i64 %d, i64* %d4, align 4
%e5 = alloca i64, align 8
store i64 %e, i64* %e5, align 4
%f6 = alloca i64, align 8
store i64 %f, i64* %f6, align 4
%g7 = alloca i64, align 8
store i64 %g, i64* %g7, align 4
%a8 = load i64, i64* %a1, align 4
call void @printInt(i64 %a8)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%b9 = load i64, i64* %b2, align 4
call void @printInt(i64 %b9)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%c10 = load i64, i64* %c3, align 4
call void @printInt(i64 %c10)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%d11 = load i64, i64* %d4, align 4
call void @printInt(i64 %d11)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%e12 = load i64, i64* %e5, align 4
call void @printInt(i64 %e12)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%f13 = load i64, i64* %f6, align 4
call void @printInt(i64 %f13)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
%g14 = load i64, i64* %g7, align 4
call void @printInt(i64 %g14)
call void @printString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str_1, i32 0, i32 0))
ret i64 0
}
define i64 @global_testTonOfArguments() {
entry:
%calltmp = call i64 @global_tonOfArguments(i64 11, i64 22, i64 33, i64 44, i64 55, i64 66, i64 77)
ret i64 0
}
define i64 @main() {
entry:
%calltmp = call i64 @global_printTestHeader()
%calltmp1 = call i64 @global_testOperators()
%calltmp2 = call i64 @global_printTestHeader()
%calltmp3 = call i64 @global_testLoops()
%calltmp4 = call i64 @global_printTestHeader()
%calltmp5 = call i64 @global_testTonOfArguments()
%calltmp6 = call i64 @global_printTestHeader()
%calltmp7 = call i64 @global_testShadowing()
%calltmp8 = call i64 @global_printTestHeader()
%calltmp9 = call i64 @global_testLongExpression(i64 1)
%calltmp10 = call i64 @global_printTestHeader()
%calltmp11 = call i64 @global_testFunctionPointers()
%calltmp12 = call i64 @global_printSummary()
ret i64 0
}
"
`;