File: llvm-while_02-3db2b04.stdout

package info (click to toggle)
lfortran 0.59.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 56,736 kB
  • sloc: cpp: 168,052; f90: 74,272; python: 17,537; ansic: 7,705; yacc: 2,345; sh: 1,334; fortran: 895; makefile: 37; javascript: 15
file content (207 lines) | stat: -rw-r--r-- 8,448 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
; ModuleID = 'LFortran'
source_filename = "LFortran"

@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1
@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1

define i32 @main(i32 %0, i8** %1) {
.entry:
  %i = alloca i32, align 4
  %j = alloca i32, align 4
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %i1 = alloca i32, align 4
  %j2 = alloca i32, align 4
  store i32 0, i32* %i1, align 4
  store i32 0, i32* %j2, align 4
  br label %loop.head

loop.head:                                        ; preds = %loop.body, %.entry
  %2 = load i32, i32* %i1, align 4
  %3 = icmp slt i32 %2, 10
  br i1 %3, label %loop.body, label %loop.end

loop.body:                                        ; preds = %loop.head
  %4 = load i32, i32* %i1, align 4
  %5 = add i32 %4, 1
  store i32 %5, i32* %i1, align 4
  %6 = load i32, i32* %j2, align 4
  %7 = load i32, i32* %i1, align 4
  %8 = add i32 %6, %7
  store i32 %8, i32* %j2, align 4
  br label %loop.head

loop.end:                                         ; preds = %loop.head
  %9 = load i32, i32* %j2, align 4
  %10 = icmp ne i32 %9, 55
  br i1 %10, label %then, label %else

then:                                             ; preds = %loop.end
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont

else:                                             ; preds = %loop.end
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  %11 = load i32, i32* %i1, align 4
  %12 = icmp ne i32 %11, 10
  br i1 %12, label %then3, label %else4

then3:                                            ; preds = %ifcont
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont5

else4:                                            ; preds = %ifcont
  br label %ifcont5

ifcont5:                                          ; preds = %else4, %then3
  store i32 0, i32* %i1, align 4
  store i32 0, i32* %j2, align 4
  br label %loop.head6

loop.head6:                                       ; preds = %ifcont10, %ifcont5
  %13 = load i32, i32* %i1, align 4
  %14 = icmp slt i32 %13, 10
  br i1 %14, label %loop.body7, label %loop.end11

loop.body7:                                       ; preds = %loop.head6
  %15 = load i32, i32* %i1, align 4
  %16 = add i32 %15, 1
  store i32 %16, i32* %i1, align 4
  %17 = load i32, i32* %i1, align 4
  %18 = icmp eq i32 %17, 2
  br i1 %18, label %then8, label %else9

then8:                                            ; preds = %loop.body7
  br label %loop.end11

unreachable_after_exit:                           ; No predecessors!
  br label %ifcont10

else9:                                            ; preds = %loop.body7
  br label %ifcont10

ifcont10:                                         ; preds = %else9, %unreachable_after_exit
  %19 = load i32, i32* %j2, align 4
  %20 = load i32, i32* %i1, align 4
  %21 = add i32 %19, %20
  store i32 %21, i32* %j2, align 4
  br label %loop.head6

loop.end11:                                       ; preds = %then8, %loop.head6
  %22 = load i32, i32* %j2, align 4
  %23 = icmp ne i32 %22, 1
  br i1 %23, label %then12, label %else13

then12:                                           ; preds = %loop.end11
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont14

else13:                                           ; preds = %loop.end11
  br label %ifcont14

ifcont14:                                         ; preds = %else13, %then12
  %24 = load i32, i32* %i1, align 4
  %25 = icmp ne i32 %24, 2
  br i1 %25, label %then15, label %else16

then15:                                           ; preds = %ifcont14
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont17

else16:                                           ; preds = %ifcont14
  br label %ifcont17

ifcont17:                                         ; preds = %else16, %then15
  store i32 0, i32* %i1, align 4
  store i32 0, i32* %j2, align 4
  br label %loop.head18

loop.head18:                                      ; preds = %ifcont22, %then20, %ifcont17
  %26 = load i32, i32* %i1, align 4
  %27 = icmp slt i32 %26, 10
  br i1 %27, label %loop.body19, label %loop.end23

loop.body19:                                      ; preds = %loop.head18
  %28 = load i32, i32* %i1, align 4
  %29 = add i32 %28, 1
  store i32 %29, i32* %i1, align 4
  %30 = load i32, i32* %i1, align 4
  %31 = icmp eq i32 %30, 2
  br i1 %31, label %then20, label %else21

then20:                                           ; preds = %loop.body19
  br label %loop.head18

unreachable_after_cycle:                          ; No predecessors!
  br label %ifcont22

else21:                                           ; preds = %loop.body19
  br label %ifcont22

ifcont22:                                         ; preds = %else21, %unreachable_after_cycle
  %32 = load i32, i32* %j2, align 4
  %33 = load i32, i32* %i1, align 4
  %34 = add i32 %32, %33
  store i32 %34, i32* %j2, align 4
  br label %loop.head18

loop.end23:                                       ; preds = %loop.head18
  %35 = load i32, i32* %j2, align 4
  %36 = icmp ne i32 %35, 53
  br i1 %36, label %then24, label %else25

then24:                                           ; preds = %loop.end23
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont26

else25:                                           ; preds = %loop.end23
  br label %ifcont26

ifcont26:                                         ; preds = %else25, %then24
  %37 = load i32, i32* %i1, align 4
  %38 = icmp ne i32 %37, 10
  br i1 %38, label %then27, label %else28

then27:                                           ; preds = %ifcont26
  call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0))
  call void @exit(i32 1)
  br label %ifcont29

else28:                                           ; preds = %ifcont26
  br label %ifcont29

ifcont29:                                         ; preds = %else28, %then27
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont29
  br label %FINALIZE_SYMTABLE_while_02

FINALIZE_SYMTABLE_while_02:                       ; preds = %return
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

declare void @_lcompilers_print_error(i8*, ...)

declare void @exit(i32)

declare void @_lpython_free_argv()