test: regenerate test files with gentests

This commit is contained in:
Li Jie
2025-01-13 10:38:46 +08:00
parent 85d01d6f28
commit f06d292382
110 changed files with 6107 additions and 6985 deletions

View File

@@ -1,17 +1,15 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/math'
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/math"
@"main.init$guard" = global i1 false, align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard", align 1
br i1 %0, label %_llgo_2, label %_llgo_1
_llgo_1: ; preds = %_llgo_0
store i1 true, ptr @"main.init$guard", align 1
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard", align 1
call void @math.init()
br label %_llgo_2
@@ -19,28 +17,22 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
define i32 @main(i32 %0, ptr %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.main"() {
_llgo_0:
store i32 %0, ptr @__llgo_argc, align 4
store ptr %1, ptr @__llgo_argv, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
call void @main.init()
%2 = call double @sqrt(double 2.000000e+00)
%0 = call double @sqrt(double 2.000000e+00)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %0)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%1 = call double @math.Abs(double -1.200000e+00)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%2 = call double @math.Ldexp(double 1.200000e+00, i64 3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %2)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%3 = call double @math.Abs(double -1.200000e+00)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%4 = call double @math.Ldexp(double 1.200000e+00, i64 3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @math.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare double @sqrt(double)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double)