File: llvm-associate_04-97f4e70.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 (156 lines) | stat: -rw-r--r-- 7,048 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
; 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
  %v = alloca float*, align 8
  store float* null, float** %v, align 8
  %z = alloca float, align 4
  %2 = load float, float* %x, align 4
  %3 = fmul float %2, 2.000000e+00
  %4 = load float, float* %y, align 4
  %5 = fmul float %4, 2.000000e+00
  %6 = fadd float %3, %5
  %7 = fneg float %6
  %8 = call float @_lcompilers_cos_f32(float* %theta)
  %9 = fmul float %7, %8
  store float %9, float* %z, align 4
  store float* %myreal, float** %v, align 8
  %10 = alloca i64, align 8
  %11 = load float, float* %a, align 4
  %12 = load float, float* %z, align 4
  %13 = fadd float %11, %12
  %14 = alloca float, align 4
  store float %13, float* %14, align 4
  %15 = load float, float* %a, align 4
  %16 = load float, float* %z, align 4
  %17 = fsub float %15, %16
  %18 = alloca float, align 4
  store float %17, float* %18, align 4
  %19 = load float*, float** %v, align 8
  %20 = 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* %10, i32 0, i32 0, float* %14, float* %18, float* %19)
  %21 = load i64, i64* %10, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %20, i8** %22, align 8
  %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %21, i64* %23, align 4
  %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %25 = load i8*, i8** %24, align 8
  %26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %27 = load i64, i64* %26, align 4
  %28 = trunc i64 %27 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %25, i32 %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %20)
  %29 = load float*, float** %v, align 8
  %30 = load float*, float** %v, align 8
  %31 = load float, float* %30, align 4
  %32 = fmul float %31, 0x4012666660000000
  store float %32, float* %29, align 4
  br label %associate_block_end

associate_block_end:                              ; preds = %associate_block_start
  br label %FINALIZE_SYMTABLE_associate_block

FINALIZE_SYMTABLE_associate_block:                ; preds = %associate_block_end
  %33 = alloca i64, align 8
  %34 = 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* %33, i32 0, i32 0, float* %myreal)
  %35 = load i64, i64* %33, align 4
  %stringFormat_desc1 = alloca %string_descriptor, align 8
  %36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  store i8* %34, i8** %36, align 8
  %37 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  store i64 %35, i64* %37, align 4
  %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0
  %39 = load i8*, i8** %38, align 8
  %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1
  %41 = load i64, i64* %40, align 4
  %42 = trunc i64 %41 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %39, i32 %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %34)
  %43 = load float, float* %myreal, align 4
  %44 = fsub float %43, 0x4044EE1480000000
  %45 = fcmp ogt float %44, 0x3EE4F8B580000000
  %46 = load float, float* %myreal, align 4
  %47 = fsub float %46, 0x4044EE1480000000
  %48 = fcmp olt float %47, 0xBEE4F8B580000000
  %49 = icmp eq i1 %45, false
  %50 = select i1 %49, i1 %48, i1 %45
  br i1 %50, label %then, label %else

then:                                             ; preds = %FINALIZE_SYMTABLE_associate_block
  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 = %FINALIZE_SYMTABLE_associate_block
  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**)

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*)

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

declare void @exit(i32)

declare void @_lpython_free_argv()