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,67 +1,59 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/map'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/map"
%"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
@"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/_testrt/map.init$guard" = global i1 false, align 1
@_llgo_int = linkonce global ptr null, align 8
@"map[_llgo_int]_llgo_int" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [7 x i8] c"topbits", align 1
@1 = private unnamed_addr constant [4 x i8] c"keys", align 1
@2 = private unnamed_addr constant [5 x i8] c"elems", align 1
@3 = private unnamed_addr constant [8 x i8] c"overflow", align 1
@4 = private unnamed_addr constant [4 x i8] c"main", align 1
@4 = private unnamed_addr constant [46 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/map", align 1
@5 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/map.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/map.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
call void @"main.init$after"()
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$after"()
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
define i32 @main(i32 %0, ptr %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/map.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 = load ptr, ptr @_llgo_int, align 8
%0 = load ptr, ptr @_llgo_int, align 8
%1 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %1, i64 2)
%3 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %3, i64 2)
%5 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 23, ptr %6, align 4
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %5, ptr %4, ptr %6)
store i64 100, ptr %7, align 4
%8 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 7, ptr %9, align 4
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %8, ptr %4, ptr %9)
store i64 29, ptr %10, align 4
%11 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 23, ptr %12, align 4
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess1"(ptr %11, ptr %4, ptr %12)
%14 = load i64, ptr %13, align 4
%15 = call i32 (ptr, ...) @printf(ptr @5, i64 %14)
ret i32 0
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 23, ptr %4, align 4
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %3, ptr %2, ptr %4)
store i64 100, ptr %5, align 4
%6 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 7, ptr %7, align 4
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %6, ptr %2, ptr %7)
store i64 29, ptr %8, align 4
%9 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 23, ptr %10, align 4
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess1"(ptr %9, ptr %2, ptr %10)
%12 = load i64, ptr %11, align 4
%13 = call i32 (ptr, ...) @printf(ptr @5, i64 %12)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/map.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null
@@ -103,7 +95,7 @@ _llgo_3: ; preds = %_llgo_2
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %18, 0
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23, i64 4, 1
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i64 4, 2
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25)
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 46 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25)
%27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %5, ptr %6, ptr %26, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %27)
store ptr %27, ptr @"map[_llgo_int]_llgo_int", align 8