File: llvm-binop_03-d0adef1.stdout

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (137 lines) | stat: -rw-r--r-- 6,531 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
; 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 [3 x i8] c"I8\00", align 1
@1 = 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
@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
@serialization_info.1 = private unnamed_addr constant [3 x i8] c"R8\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

define double @_lcompilers_abs_f64(double* %x) {
.entry:
  %_lcompilers_abs_f64 = alloca double, align 8
  %0 = load double, double* %x, align 8
  %1 = fcmp oge double %0, 0.000000e+00
  br i1 %1, label %then, label %else

then:                                             ; preds = %.entry
  %2 = load double, double* %x, align 8
  store double %2, double* %_lcompilers_abs_f64, align 8
  br label %ifcont

else:                                             ; preds = %.entry
  %3 = load double, double* %x, align 8
  %4 = fneg double %3
  store double %4, double* %_lcompilers_abs_f64, align 8
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  br label %return

return:                                           ; preds = %ifcont
  %5 = load double, double* %_lcompilers_abs_f64, align 8
  ret double %5
}

define i32 @main(i32 %0, i8** %1) {
.entry:
  %call_arg_value = alloca double, align 8
  %x = alloca i64, align 8
  call void @_lpython_call_initial_functions(i32 %0, i8** %1)
  %x1 = alloca i64, align 8
  %y = alloca double, align 8
  store i64 665663010, i64* %x1, align 4
  %2 = load i64, i64* %x1, align 4
  %simplified_pow_operation = mul i64 %2, %2
  store i64 %simplified_pow_operation, i64* %x1, align 4
  %3 = alloca i64, align 8
  %4 = 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, i32 0, i32 0), i64* %3, i32 0, i32 0, i64* %x1)
  %5 = load i64, i64* %3, align 4
  %stringFormat_desc = alloca %string_descriptor, align 8
  %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  store i8* %4, i8** %6, align 8
  %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  store i64 %5, i64* %7, align 4
  %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0
  %9 = load i8*, i8** %8, align 8
  %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1
  %11 = load i64, i64* %10, align 4
  %12 = trunc i64 %11 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %4)
  %13 = load i64, i64* %x1, align 4
  %14 = icmp ne i64 %13, 443107242882260100
  br i1 %14, label %then, label %else

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

else:                                             ; preds = %.entry
  br label %ifcont

ifcont:                                           ; preds = %else, %then
  store double 0x41C3D69B11000000, double* %y, align 8
  %15 = load double, double* %y, align 8
  %simplified_pow_operation2 = fmul double %15, %15
  store double %simplified_pow_operation2, double* %y, align 8
  %16 = alloca i64, align 8
  %17 = 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* %16, i32 0, i32 0, double* %y)
  %18 = load i64, i64* %16, align 4
  %stringFormat_desc3 = alloca %string_descriptor, align 8
  %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 0
  store i8* %17, i8** %19, align 8
  %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 1
  store i64 %18, i64* %20, align 4
  %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 0
  %22 = load i8*, i8** %21, align 8
  %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc3, i32 0, i32 1
  %24 = load i64, i64* %23, align 4
  %25 = trunc i64 %24 to i32
  call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %22, i32 %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1)
  call void @_lfortran_free(i8* %17)
  %26 = load double, double* %y, align 8
  %27 = fsub double %26, 0x439898EEC2459972
  store double %27, double* %call_arg_value, align 8
  %28 = call double @_lcompilers_abs_f64(double* %call_arg_value)
  %29 = fcmp ogt double %28, 0x3BFD83C940000000
  br i1 %29, label %then4, label %else5

then4:                                            ; preds = %ifcont
  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 %ifcont6

else5:                                            ; preds = %ifcont
  br label %ifcont6

ifcont6:                                          ; preds = %else5, %then4
  call void @_lpython_free_argv()
  br label %return

return:                                           ; preds = %ifcont6
  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()