File: llvm-associate_04-97f4e70.stdout

package info (click to toggle)
lfortran 0.61.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 61,892 kB
  • sloc: cpp: 181,767; f90: 92,175; python: 17,616; ansic: 10,170; yacc: 2,377; sh: 1,444; fortran: 892; makefile: 38; javascript: 15
file content (180 lines) | stat: -rw-r--r-- 7,824 bytes parent folder | download | duplicates (2)
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
; ModuleID = 'LFortran'
source_filename = "LFortran"

%string_descriptor = type <{ i8*, i64 }>

@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1
@serialization_info = private unnamed_addr constant [9 x i8] c"R4,R4,R4\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
@serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1
@3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1
@"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\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

define float @_lcompilers_cos_f32(float* %x) {
.entry:
  %_lcompilers_cos_f32 = alloca float, align 4
  %0 = load float, float* %x, align 4
  %1 = call float @_lfortran_scos(float %0)
  store float %1, float* %_lcompilers_cos_f32, align 4
  br label %return

return:                                           ; preds = %.entry
  br label %FINALIZE_SYMTABLE__lcompilers_cos_f32

FINALIZE_SYMTABLE__lcompilers_cos_f32:            ; preds = %return
  %2 = load float, float* %_lcompilers_cos_f32, align 4
  ret float %2
}

declare float @_lfortran_scos(float)

define i32 @main(i32 %0, i8** %1) {
.entry:
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %a = alloca float, align 4
  %myreal = alloca float, align 4
  %theta = alloca float, align 4
  %x = alloca float, align 4
  %y = alloca float, align 4
  store float 0x3FDAE147A0000000, float* %x, align 4
  store float 0x3FD6666660000000, float* %y, align 4
  store float 0x4022333340000000, float* %myreal, align 4
  store float 1.500000e+00, float* %theta, align 4
  store float 0x3FD99999A0000000, float* %a, align 4
  br label %associate_block_start

associate_block_start:                            ; preds = %.entry
  %2 = call i8* @llvm.stacksave()
  %v = alloca float*, align 8
  store float* null, float** %v, align 8
  %z = alloca float, align 4
  %3 = load float, float* %x, align 4
  %4 = fmul float %3, 2.000000e+00
  %5 = load float, float* %y, align 4
  %6 = fmul float %5, 2.000000e+00
  %7 = fadd float %4, %6
  %8 = fneg float %7
  %9 = call float @_lcompilers_cos_f32(float* %theta)
  %10 = fmul float %8, %9
  store float %10, float* %z, align 4
  store float* %myreal, float** %v, align 8
  %11 = alloca i64, align 8
  %12 = load float, float* %a, align 4
  %13 = load float, float* %z, align 4
  %14 = fadd float %12, %13
  %15 = alloca float, align 4
  store float %14, float* %15, align 4
  %16 = load float, float* %a, align 4
  %17 = load float, float* %z, align 4
  %18 = fsub float %16, %17
  %19 = alloca float, align 4
  store float %18, float* %19, align 4
  %20 = load float*, float** %v, align 8
  %21 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @serialization_info, i32 0, i32 0), i64* %11, i32 0, i32 0, float* %15, float* %19, float* %20)
  %22 = load i64, i64* %11, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %21, i8** %23, align 8
  %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %22, i64* %24, align 4
  %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %26 = load i8*, i8** %25, align 8
  %27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %28 = load i64, i64* %27, align 4
  %29 = trunc i64 %28 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %26, i32 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  %30 = icmp eq i8* %21, null
  br i1 %30, label %free_done, label %free_nonnull

free_nonnull:                                     ; preds = %associate_block_start
  call void @_lfortran_free(i8* %21)
  br label %free_done

free_done:                                        ; preds = %free_nonnull, %associate_block_start
  %31 = load float*, float** %v, align 8
  %32 = load float*, float** %v, align 8
  %33 = load float, float* %32, align 4
  %34 = fmul float %33, 0x4012666660000000
  store float %34, float* %31, align 4
  br label %associate_block_end

associate_block_end:                              ; preds = %free_done
  br label %FINALIZE_SYMTABLE_associate_block

FINALIZE_SYMTABLE_associate_block:                ; preds = %associate_block_end
  call void @llvm.stackrestore(i8* %2)
  %35 = alloca i64, align 8
  %36 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %35, i32 0, i32 0, float* %myreal)
  %37 = load i64, i64* %35, align 4
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %36, i8** %38, align 8
  %39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %37, i64* %39, align 4
  %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %41 = load i8*, i8** %40, align 8
  %42 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %43 = load i64, i64* %42, align 4
  %44 = trunc i64 %43 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %41, i32 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  %45 = icmp eq i8* %36, null
  br i1 %45, label %free_done3, label %free_nonnull2

free_nonnull2:                                    ; preds = %FINALIZE_SYMTABLE_associate_block
  call void @_lfortran_free(i8* %36)
  br label %free_done3

free_done3:                                       ; preds = %free_nonnull2, %FINALIZE_SYMTABLE_associate_block
  %46 = load float, float* %myreal, align 4
  %47 = fsub float %46, 0x4044EE1480000000
  %48 = fcmp ogt float %47, 0x3EE4F8B580000000
  %49 = load float, float* %myreal, align 4
  %50 = fsub float %49, 0x4044EE1480000000
  %51 = fcmp olt float %50, 0xBEE4F8B580000000
  %52 = icmp eq i1 %48, false
  %53 = select i1 %52, i1 %51, i1 %48
  br i1 %53, label %then, label %else

then:                                             ; preds = %free_done3
  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 %ifcont

else:                                             ; preds = %free_done3
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont
  br label %FINALIZE_SYMTABLE_associate_04

FINALIZE_SYMTABLE_associate_04:                   ; preds = %return
  ret i32 0
}

declare void @_lpython_call_initial_functions(i32, i8**)

; Function Attrs: nounwind
declare i8* @llvm.stacksave() #0

declare i8* @_lcompilers_string_format_fortran(i8*, i64, i8*, i64*, i32, i32, ...)

declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32)

declare void @_lfortran_free(i8*)

; Function Attrs: nounwind
declare void @llvm.stackrestore(i8*) #0

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

declare void @exit(i32)

declare void @_lpython_free_argv()

attributes #0 = { nounwind }