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,23 +1,21 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/abinamed'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/abinamed"
%main.T = type { ptr, ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = type { ptr, ptr, i64, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.eface = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface" = type { ptr, ptr }
%"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/abi.StructType" = type { %"github.com/goplus/llgo/runtime/abi.Type", %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr }
@"main.init$guard" = global i1 false, align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@_llgo_main.T = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [51 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/abinamed", align 1
@1 = private unnamed_addr constant [1 x i8] c"T", align 1
@"*_llgo_main.T" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/runtime/abi.Type" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [34 x i8] c"github.com/goplus/llgo/runtime/abi", align 1
@3 = private unnamed_addr constant [4 x i8] c"Type", align 1
@@ -29,14 +27,14 @@ source_filename = "main"
@_llgo_Pointer = linkonce global ptr null, align 8
@_llgo_bool = linkonce global ptr null, align 8
@"_llgo_func$fC75jGwF1nV5TF91gEeTF_JCtbG9Z7_yOawHBxqBh6E" = linkonce global ptr null, align 8
@"main.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU" = linkonce global ptr null, align 8
@5 = private unnamed_addr constant [2 x i8] c"$f", align 1
@6 = private unnamed_addr constant [5 x i8] c"$data", align 1
@_llgo_byte = linkonce global ptr null, align 8
@"*_llgo_byte" = linkonce global ptr null, align 8
@_llgo_string = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/runtime/abi.Type" = linkonce global ptr null, align 8
@"main.struct$-sQ1S_TW5WNLDageftHP017iwpTTWpvZTx7xZ5oHpvI" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$rDuZQXjMH4bpTOSCKOPXfXtIjD6YwQ9oTASrJ2N76VQ" = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [5 x i8] c"Size_", align 1
@8 = private unnamed_addr constant [8 x i8] c"PtrBytes", align 1
@9 = private unnamed_addr constant [4 x i8] c"Hash", align 1
@@ -108,9 +106,9 @@ source_filename = "main"
@46 = private unnamed_addr constant [7 x i8] c"MapType", align 1
@"_llgo_github.com/goplus/llgo/runtime/abi.MapType" = linkonce global ptr null, align 8
@"_llgo_func$ahHMZCcDhfW-lrs446sPkiW0NoVa2vpmK_wKarVa_20" = linkonce global ptr null, align 8
@"main.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc" = linkonce global ptr null, align 8
@_llgo_uint16 = linkonce global ptr null, align 8
@"main.struct$fcvaNpt6kbBgWOAYzHzrrsaKXunEtzMD4RdymMNJqTs" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$cKxX1dk_4FUaJkVYGogwwhApUh157NiM4dYa4KgJkeI" = linkonce global ptr null, align 8
@47 = private unnamed_addr constant [6 x i8] c"Bucket", align 1
@48 = private unnamed_addr constant [6 x i8] c"Hasher", align 1
@49 = private unnamed_addr constant [7 x i8] c"KeySize", align 1
@@ -157,8 +155,8 @@ source_filename = "main"
@75 = private unnamed_addr constant [5 x i8] c"Mtyp_", align 1
@76 = private unnamed_addr constant [4 x i8] c"Ifn_", align 1
@77 = private unnamed_addr constant [4 x i8] c"Tfn_", align 1
@"[]_llgo_main.T" = linkonce global ptr null, align 8
@"main.struct$0I14CsQEZ9iadCku0_1cAZfCJoBbFdmFH4XChi4XRoo" = linkonce global ptr null, align 8
@"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$ZLmusojvth_AeIAGC574HWDNbqH0qIBjDCc2msmnDYs" = linkonce global ptr null, align 8
@78 = private unnamed_addr constant [1 x i8] c"p", align 1
@79 = private unnamed_addr constant [1 x i8] c"t", align 1
@80 = private unnamed_addr constant [1 x i8] c"n", align 1
@@ -170,238 +168,234 @@ source_filename = "main"
@86 = private unnamed_addr constant [13 x i8] c"error field 2", align 1
@87 = private unnamed_addr constant [13 x i8] c"error field 3", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.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/_testrt/abinamed.init$guard", align 1
call void @"github.com/goplus/llgo/runtime/abi.init"()
call void @"main.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.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/abinamed.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_main.T, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %main.T zeroinitializer, ptr %3, align 8
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr %3, 1
%6 = call ptr @main.toEface(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5)
%7 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 72)
store %"github.com/goplus/llgo/runtime/abi.Type" zeroinitializer, ptr %8, align 8
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr %8, 1
%11 = call ptr @main.toEface(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %10)
%12 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%13 = load ptr, ptr %12, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %13)
%0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T" zeroinitializer, ptr %1, align 8
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1
%4 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3)
%5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 72)
store %"github.com/goplus/llgo/runtime/abi.Type" zeroinitializer, ptr %6, align 8
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %6, 1
%9 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8)
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%11 = load ptr, ptr %10, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %11)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%14 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%13 = load ptr, ptr %12, align 8
%14 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %13, i32 0, i32 10
%15 = load ptr, ptr %14, align 8
%16 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %15, i32 0, i32 10
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0
%17 = load ptr, ptr %16, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%18 = getelementptr inbounds %main.eface, ptr %11, i32 0, i32 0
%18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0
%19 = load ptr, ptr %18, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%20 = getelementptr inbounds %main.eface, ptr %11, i32 0, i32 0
%20 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %19, i32 0, i32 10
%21 = load ptr, ptr %20, align 8
%22 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %21, i32 0, i32 10
%23 = load ptr, ptr %22, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %23)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %21)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%24 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %24, i8 0, i64 56, i1 false)
%25 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%26 = load ptr, ptr %25, align 8
%27 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %26)
%28 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %27, i32 0, i32 2
%29 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %28, align 8
%30 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, 0
%31 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, 1
%32 = icmp sge i64 0, %31
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %32)
%33 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %30, i64 0
%34 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %33, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %34, ptr %24, align 8
%35 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %24, i32 0, i32 1
%22 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %22, i8 0, i64 56, i1 false)
%23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%24 = load ptr, ptr %23, align 8
%25 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %24)
%26 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %25, i32 0, i32 2
%27 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %26, align 8
%28 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, 0
%29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, 1
%30 = icmp sge i64 0, %29
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %30)
%31 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %28, i64 0
%32 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %31, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %32, ptr %22, align 8
%33 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %22, i32 0, i32 1
%34 = load ptr, ptr %33, align 8
%35 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%36 = load ptr, ptr %35, align 8
%37 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%37 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %36, i32 0, i32 10
%38 = load ptr, ptr %37, align 8
%39 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %38, i32 0, i32 10
%40 = load ptr, ptr %39, align 8
%41 = icmp ne ptr %36, %40
br i1 %41, label %_llgo_1, label %_llgo_2
%39 = icmp ne ptr %34, %38
br i1 %39, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%42 = load ptr, ptr @_llgo_string, align 8
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @82, i64 13 }, ptr %43, align 8
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45)
%40 = load ptr, ptr @_llgo_string, align 8
%41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @82, i64 13 }, ptr %41, align 8
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %40, 0
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, ptr %41, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %43)
unreachable
_llgo_2: ; preds = %_llgo_0
%46 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %24, i32 0, i32 1
%47 = load ptr, ptr %46, align 8
%48 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %47)
%49 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%50 = load ptr, ptr %49, align 8
%51 = icmp ne ptr %48, %50
br i1 %51, label %_llgo_3, label %_llgo_4
%44 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %22, i32 0, i32 1
%45 = load ptr, ptr %44, align 8
%46 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %45)
%47 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%48 = load ptr, ptr %47, align 8
%49 = icmp ne ptr %46, %48
br i1 %49, label %_llgo_3, label %_llgo_4
_llgo_3: ; preds = %_llgo_2
%52 = load ptr, ptr @_llgo_string, align 8
%53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @83, i64 18 }, ptr %53, align 8
%54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %52, 0
%55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %54, ptr %53, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %55)
%50 = load ptr, ptr @_llgo_string, align 8
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @83, i64 18 }, ptr %51, align 8
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %50, 0
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %52, ptr %51, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %53)
unreachable
_llgo_4: ; preds = %_llgo_2
%56 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %56, i8 0, i64 56, i1 false)
%57 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%58 = load ptr, ptr %57, align 8
%59 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %58)
%60 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %59, i32 0, i32 2
%61 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %60, align 8
%62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, 0
%63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, 1
%64 = icmp sge i64 1, %63
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %64)
%65 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %62, i64 1
%66 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %65, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %66, ptr %56, align 8
%67 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %56, i32 0, i32 1
%54 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %54, i8 0, i64 56, i1 false)
%55 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%56 = load ptr, ptr %55, align 8
%57 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %56)
%58 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %57, i32 0, i32 2
%59 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %58, align 8
%60 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, 0
%61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, 1
%62 = icmp sge i64 1, %61
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %62)
%63 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %60, i64 1
%64 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %63, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %64, ptr %54, align 8
%65 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %54, i32 0, i32 1
%66 = load ptr, ptr %65, align 8
%67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0
%68 = load ptr, ptr %67, align 8
%69 = getelementptr inbounds %main.eface, ptr %11, i32 0, i32 0
%69 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %68, i32 0, i32 10
%70 = load ptr, ptr %69, align 8
%71 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %70, i32 0, i32 10
%72 = load ptr, ptr %71, align 8
%73 = icmp ne ptr %68, %72
br i1 %73, label %_llgo_5, label %_llgo_6
%71 = icmp ne ptr %66, %70
br i1 %71, label %_llgo_5, label %_llgo_6
_llgo_5: ; preds = %_llgo_4
%74 = load ptr, ptr @_llgo_string, align 8
%75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @84, i64 13 }, ptr %75, align 8
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %74, 0
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %76, ptr %75, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %77)
%72 = load ptr, ptr @_llgo_string, align 8
%73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @84, i64 13 }, ptr %73, align 8
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %72, 0
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %74, ptr %73, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %75)
unreachable
_llgo_6: ; preds = %_llgo_4
%78 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %56, i32 0, i32 1
%79 = load ptr, ptr %78, align 8
%80 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %79)
%81 = getelementptr inbounds %main.eface, ptr %11, i32 0, i32 0
%82 = load ptr, ptr %81, align 8
%83 = icmp ne ptr %80, %82
br i1 %83, label %_llgo_7, label %_llgo_8
%76 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %54, i32 0, i32 1
%77 = load ptr, ptr %76, align 8
%78 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %77)
%79 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0
%80 = load ptr, ptr %79, align 8
%81 = icmp ne ptr %78, %80
br i1 %81, label %_llgo_7, label %_llgo_8
_llgo_7: ; preds = %_llgo_6
%84 = load ptr, ptr @_llgo_string, align 8
%85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @85, i64 18 }, ptr %85, align 8
%86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %84, 0
%87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %86, ptr %85, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %87)
%82 = load ptr, ptr @_llgo_string, align 8
%83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @85, i64 18 }, ptr %83, align 8
%84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %82, 0
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %84, ptr %83, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %85)
unreachable
_llgo_8: ; preds = %_llgo_6
%88 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %88, i8 0, i64 56, i1 false)
%89 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%90 = load ptr, ptr %89, align 8
%91 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %90)
%92 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %91, i32 0, i32 2
%93 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %92, align 8
%94 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, 0
%95 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, 1
%96 = icmp sge i64 2, %95
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %96)
%97 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %94, i64 2
%98 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %97, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %98, ptr %88, align 8
%99 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %88, i32 0, i32 1
%86 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %86, i8 0, i64 56, i1 false)
%87 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%88 = load ptr, ptr %87, align 8
%89 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %88)
%90 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %89, i32 0, i32 2
%91 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %90, align 8
%92 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, 0
%93 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, 1
%94 = icmp sge i64 2, %93
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %94)
%95 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %92, i64 2
%96 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %95, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %96, ptr %86, align 8
%97 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %86, i32 0, i32 1
%98 = load ptr, ptr %97, align 8
%99 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %9, i32 0, i32 0
%100 = load ptr, ptr %99, align 8
%101 = getelementptr inbounds %main.eface, ptr %11, i32 0, i32 0
%102 = load ptr, ptr %101, align 8
%103 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %102)
%104 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %103, i32 0, i32 2
%105 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %104, align 8
%106 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %105, 0
%107 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %105, 1
%108 = icmp sge i64 0, %107
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %108)
%109 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %106, i64 0
%110 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %109, i32 0, i32 1
%111 = load ptr, ptr %110, align 8
%112 = icmp ne ptr %100, %111
br i1 %112, label %_llgo_9, label %_llgo_10
%101 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %100)
%102 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %101, i32 0, i32 2
%103 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %102, align 8
%104 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %103, 0
%105 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %103, 1
%106 = icmp sge i64 0, %105
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %106)
%107 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %104, i64 0
%108 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %107, i32 0, i32 1
%109 = load ptr, ptr %108, align 8
%110 = icmp ne ptr %98, %109
br i1 %110, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
%113 = load ptr, ptr @_llgo_string, align 8
%114 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @86, i64 13 }, ptr %114, align 8
%115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %113, 0
%116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %115, ptr %114, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %116)
%111 = load ptr, ptr @_llgo_string, align 8
%112 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @86, i64 13 }, ptr %112, align 8
%113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %111, 0
%114 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %113, ptr %112, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %114)
unreachable
_llgo_10: ; preds = %_llgo_8
%117 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %117, i8 0, i64 56, i1 false)
%118 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%119 = load ptr, ptr %118, align 8
%120 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %119)
%121 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %120, i32 0, i32 2
%122 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %121, align 8
%123 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, 0
%124 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, 1
%125 = icmp sge i64 3, %124
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %125)
%126 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %123, i64 3
%127 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %126, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %127, ptr %117, align 8
%128 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %117, i32 0, i32 1
%129 = load ptr, ptr %128, align 8
%130 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %129)
%131 = getelementptr inbounds %main.eface, ptr %6, i32 0, i32 0
%132 = load ptr, ptr %131, align 8
%133 = icmp ne ptr %130, %132
br i1 %133, label %_llgo_11, label %_llgo_12
%115 = alloca %"github.com/goplus/llgo/runtime/abi.StructField", align 8
call void @llvm.memset(ptr %115, i8 0, i64 56, i1 false)
%116 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%117 = load ptr, ptr %116, align 8
%118 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).StructType"(ptr %117)
%119 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructType", ptr %118, i32 0, i32 2
%120 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %119, align 8
%121 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %120, 0
%122 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %120, 1
%123 = icmp sge i64 3, %122
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %123)
%124 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %121, i64 3
%125 = load %"github.com/goplus/llgo/runtime/abi.StructField", ptr %124, align 8
store %"github.com/goplus/llgo/runtime/abi.StructField" %125, ptr %115, align 8
%126 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.StructField", ptr %115, i32 0, i32 1
%127 = load ptr, ptr %126, align 8
%128 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %127)
%129 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.eface", ptr %4, i32 0, i32 0
%130 = load ptr, ptr %129, align 8
%131 = icmp ne ptr %128, %130
br i1 %131, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
%134 = load ptr, ptr @_llgo_string, align 8
%135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @87, i64 13 }, ptr %135, align 8
%136 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %134, 0
%137 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %136, ptr %135, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %137)
%132 = load ptr, ptr @_llgo_string, align 8
%133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @87, i64 13 }, ptr %133, align 8
%134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %132, 0
%135 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %134, ptr %133, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %135)
unreachable
_llgo_12: ; preds = %_llgo_10
ret i32 0
ret void
}
define ptr @main.toEface(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.toEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, ptr %1, align 8
@@ -410,34 +404,32 @@ _llgo_0:
declare void @"github.com/goplus/llgo/runtime/abi.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%1 = load ptr, ptr @_llgo_main.T, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
store ptr %0, ptr @_llgo_main.T, align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
%3 = load ptr, ptr @_llgo_main.T, align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%5 = load ptr, ptr @"*_llgo_main.T", align 8
%3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%5 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%6 = icmp eq ptr %5, null
br i1 %6, label %_llgo_3, label %_llgo_4
_llgo_3: ; preds = %_llgo_2
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %7)
store ptr %7, ptr @"*_llgo_main.T", align 8
store ptr %7, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
br label %_llgo_4
_llgo_4: ; preds = %_llgo_3, %_llgo_2
%8 = load ptr, ptr @"*_llgo_main.T", align 8
%8 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 34 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 80, i64 0, i64 23)
%10 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8
%11 = icmp eq ptr %10, null
@@ -580,9 +572,9 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %72, 0
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 1
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 2
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77)
store ptr %78, ptr @"main.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8
%79 = load ptr, ptr @"main.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77)
store ptr %78, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8
%79 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$6Ehc6TOqEXOG056rtIWcVOuWzJK8QENYOqW7yQ1sEPU", align 8
%80 = load ptr, ptr @_llgo_byte, align 8
%81 = icmp eq ptr %80, null
br i1 %81, label %_llgo_23, label %_llgo_24
@@ -676,7 +668,7 @@ _llgo_30: ; preds = %_llgo_29, %_llgo_28
%135 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %132, 0
%136 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %135, i64 2, 1
%137 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %136, i64 2, 2
%138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %137)
%138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %137)
%139 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 5 }, ptr %138, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
%141 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %140)
@@ -711,9 +703,9 @@ _llgo_30: ; preds = %_llgo_29, %_llgo_28
%159 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %147, 0
%160 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %159, i64 11, 1
%161 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %160, i64 11, 2
%162 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %161)
store ptr %162, ptr @"main.struct$-sQ1S_TW5WNLDageftHP017iwpTTWpvZTx7xZ5oHpvI", align 8
%163 = load ptr, ptr @"main.struct$-sQ1S_TW5WNLDageftHP017iwpTTWpvZTx7xZ5oHpvI", align 8
%162 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 72, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %161)
store ptr %162, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$rDuZQXjMH4bpTOSCKOPXfXtIjD6YwQ9oTASrJ2N76VQ", align 8
%163 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$rDuZQXjMH4bpTOSCKOPXfXtIjD6YwQ9oTASrJ2N76VQ", align 8
br i1 %11, label %_llgo_31, label %_llgo_32
_llgo_31: ; preds = %_llgo_30
@@ -724,8 +716,8 @@ _llgo_31: ; preds = %_llgo_30
_llgo_32: ; preds = %_llgo_40, %_llgo_30
%166 = load ptr, ptr @"_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8
%167 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/runtime/abi.Type", align 8
%168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%169 = load ptr, ptr @"[]_llgo_main.T", align 8
%168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%169 = load ptr, ptr @"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%170 = icmp eq ptr %169, null
br i1 %170, label %_llgo_133, label %_llgo_134
@@ -796,7 +788,7 @@ _llgo_38: ; preds = %_llgo_37, %_llgo_36
%210 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %205, 0
%211 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %210, i64 4, 1
%212 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %211, i64 4, 2
%213 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 96, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %212)
%213 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 96, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %212)
store ptr %213, ptr @"_llgo_struct$_wxpay9lRP3cWU1eNzUY8uwDJyoHmQ6toXBadyiL6io", align 8
%214 = load ptr, ptr @"_llgo_struct$_wxpay9lRP3cWU1eNzUY8uwDJyoHmQ6toXBadyiL6io", align 8
br i1 %192, label %_llgo_39, label %_llgo_40
@@ -1125,7 +1117,7 @@ _llgo_58: ; preds = %_llgo_57, %_llgo_56
%435 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %431, 0
%436 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %435, i64 3, 1
%437 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %436, i64 3, 2
%438 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %437)
%438 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %437)
store ptr %438, ptr @"_llgo_struct$1ug-gfLTkNOIzG-RN7EFFwGKI01E7iqUGVZBMudT8KA", align 8
%439 = load ptr, ptr @"_llgo_struct$1ug-gfLTkNOIzG-RN7EFFwGKI01E7iqUGVZBMudT8KA", align 8
br i1 %411, label %_llgo_59, label %_llgo_60
@@ -1183,7 +1175,7 @@ _llgo_60: ; preds = %_llgo_82, %_llgo_58
%482 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %477, 0
%483 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %482, i64 4, 1
%484 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %483, i64 4, 2
%485 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 40, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %484)
%485 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 40, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %484)
store ptr %485, ptr @"_llgo_struct$jXUHcnL1PMmNRB-pn2cBRAQ7OYcwCM_YkvLqlL0ZYaE", align 8
%486 = load ptr, ptr @"_llgo_struct$jXUHcnL1PMmNRB-pn2cBRAQ7OYcwCM_YkvLqlL0ZYaE", align 8
br i1 %408, label %_llgo_131, label %_llgo_132
@@ -1328,7 +1320,7 @@ _llgo_74: ; preds = %_llgo_73, %_llgo_72
%568 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %565, 0
%569 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %568, i64 2, 1
%570 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %569, i64 2, 2
%571 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %570)
%571 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %570)
store ptr %571, ptr @"_llgo_struct$nK3p3a0VXRT6CeR0p3-gSrD3XdcHx2I7dlhqG-Zjudw", align 8
%572 = load ptr, ptr @"_llgo_struct$nK3p3a0VXRT6CeR0p3-gSrD3XdcHx2I7dlhqG-Zjudw", align 8
br i1 %558, label %_llgo_75, label %_llgo_76
@@ -1412,7 +1404,7 @@ _llgo_80: ; preds = %_llgo_79, %_llgo_76
%622 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %618, 0
%623 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %622, i64 3, 1
%624 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %623, i64 3, 2
%625 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %624)
%625 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %624)
store ptr %625, ptr @"_llgo_struct$eoXJdAUqA_SyytMpb3QTBaQ2Bh9nLc089-gvCiW55io", align 8
%626 = load ptr, ptr @"_llgo_struct$eoXJdAUqA_SyytMpb3QTBaQ2Bh9nLc089-gvCiW55io", align 8
br i1 %555, label %_llgo_81, label %_llgo_82
@@ -1781,9 +1773,9 @@ _llgo_98: ; preds = %_llgo_97, %_llgo_96
%887 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %884, 0
%888 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %887, i64 2, 1
%889 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %888, i64 2, 2
%890 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %889)
store ptr %890, ptr @"main.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8
%891 = load ptr, ptr @"main.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8
%890 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %889)
store ptr %890, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8
%891 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$Oy3XhjARgY_pH1HU6oBj0nSC2Qs1A6CU4bRajpBttZc", align 8
%892 = load ptr, ptr @_llgo_uint16, align 8
%893 = icmp eq ptr %892, null
br i1 %893, label %_llgo_99, label %_llgo_100
@@ -1835,7 +1827,7 @@ _llgo_100: ; preds = %_llgo_99, %_llgo_98
%928 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %925, 0
%929 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %928, i64 2, 1
%930 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %929, i64 2, 2
%931 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %930)
%931 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %930)
%932 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @48, i64 6 }, ptr %931, i64 96, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%933 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
%934 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @49, i64 7 }, ptr %933, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
@@ -1867,9 +1859,9 @@ _llgo_100: ; preds = %_llgo_99, %_llgo_98
%951 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %941, 0
%952 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %951, i64 9, 1
%953 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %952, i64 9, 2
%954 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %953)
store ptr %954, ptr @"main.struct$fcvaNpt6kbBgWOAYzHzrrsaKXunEtzMD4RdymMNJqTs", align 8
%955 = load ptr, ptr @"main.struct$fcvaNpt6kbBgWOAYzHzrrsaKXunEtzMD4RdymMNJqTs", align 8
%954 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 120, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %953)
store ptr %954, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$cKxX1dk_4FUaJkVYGogwwhApUh157NiM4dYa4KgJkeI", align 8
%955 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$cKxX1dk_4FUaJkVYGogwwhApUh157NiM4dYa4KgJkeI", align 8
br i1 %844, label %_llgo_101, label %_llgo_102
_llgo_101: ; preds = %_llgo_100
@@ -2162,7 +2154,7 @@ _llgo_112: ; preds = %_llgo_111, %_llgo_1
%1170 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1164, 0
%1171 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1170, i64 5, 1
%1172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1171, i64 5, 2
%1173 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 56, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1172)
%1173 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 56, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1172)
store ptr %1173, ptr @"_llgo_struct$kJjSbRGD6vW5GBpnW3h2bqoH3rm-w30ibwmCd552LPU", align 8
%1174 = load ptr, ptr @"_llgo_struct$kJjSbRGD6vW5GBpnW3h2bqoH3rm-w30ibwmCd552LPU", align 8
br i1 %1151, label %_llgo_113, label %_llgo_114
@@ -2218,7 +2210,7 @@ _llgo_116: ; preds = %_llgo_115, %_llgo_1
%1206 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1202, 0
%1207 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1206, i64 3, 1
%1208 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1207, i64 3, 2
%1209 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1208)
%1209 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 112, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1208)
store ptr %1209, ptr @"_llgo_struct$a40Ph0zKu8cPeYh4GJjFLIY8XDqrC7uc-XzprrJaUh0", align 8
%1210 = load ptr, ptr @"_llgo_struct$a40Ph0zKu8cPeYh4GJjFLIY8XDqrC7uc-XzprrJaUh0", align 8
br i1 %1148, label %_llgo_117, label %_llgo_118
@@ -2455,7 +2447,7 @@ _llgo_124: ; preds = %_llgo_123, %_llgo_1
%1381 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1376, 0
%1382 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1381, i64 4, 1
%1383 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1382, i64 4, 2
%1384 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1383)
%1384 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1383)
store ptr %1384, ptr @"_llgo_struct$OKIlItfBJsawrEMnVSc2VQ7pxNxCHIgSoitcM9n4FVI", align 8
%1385 = load ptr, ptr @"_llgo_struct$OKIlItfBJsawrEMnVSc2VQ7pxNxCHIgSoitcM9n4FVI", align 8
br i1 %1367, label %_llgo_125, label %_llgo_126
@@ -2729,14 +2721,14 @@ _llgo_132: ; preds = %_llgo_131, %_llgo_6
_llgo_133: ; preds = %_llgo_32
%1571 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %168)
store ptr %1571, ptr @"[]_llgo_main.T", align 8
store ptr %1571, ptr @"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
br label %_llgo_134
_llgo_134: ; preds = %_llgo_133, %_llgo_32
%1572 = load ptr, ptr @"[]_llgo_main.T", align 8
%1573 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%1572 = load ptr, ptr @"[]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/abinamed.T", align 8
%1573 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%1574 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 34 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 80, i64 0, i64 23)
%1575 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%1575 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%1576 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %1573)
%1577 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @78, i64 1 }, ptr %1576, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%1578 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %1574)
@@ -2757,9 +2749,9 @@ _llgo_134: ; preds = %_llgo_133, %_llgo_3
%1589 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1584, 0
%1590 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1589, i64 4, 1
%1591 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1590, i64 4, 2
%1592 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1591)
store ptr %1592, ptr @"main.struct$0I14CsQEZ9iadCku0_1cAZfCJoBbFdmFH4XChi4XRoo", align 8
%1593 = load ptr, ptr @"main.struct$0I14CsQEZ9iadCku0_1cAZfCJoBbFdmFH4XChi4XRoo", align 8
%1592 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 51 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1591)
store ptr %1592, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$ZLmusojvth_AeIAGC574HWDNbqH0qIBjDCc2msmnDYs", align 8
%1593 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/abinamed.struct$ZLmusojvth_AeIAGC574HWDNbqH0qIBjDCc2msmnDYs", align 8
br i1 %2, label %_llgo_135, label %_llgo_136
_llgo_135: ; preds = %_llgo_134

View File

@@ -1,39 +1,31 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/alloca'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/alloca"
@"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/alloca.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [4 x i8] c"Hi\0A\00", align 1
@1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/alloca.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/alloca.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/_testrt/alloca.init$guard", align 1
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/alloca.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 = alloca i8, i64 4, align 1
%3 = call ptr @memcpy(ptr %2, ptr @0, i64 4)
%4 = call i32 (ptr, ...) @printf(ptr @1, ptr %2)
ret i32 0
%0 = alloca i8, i64 4, align 1
%1 = call ptr @memcpy(ptr %0, ptr @0, i64 4)
%2 = call i32 (ptr, ...) @printf(ptr @1, ptr %0)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @memcpy(ptr, ptr, i64)
declare i32 @printf(ptr, ...)

View File

@@ -1,48 +1,40 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/allocstr'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/allocstr"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [12 x i8] c"Hello world\0A", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.hello() {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.hello"() {
_llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 12 }
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.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/_testrt/allocstr.init$guard", align 1
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/allocstr.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 %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.hello()
%3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %2, 1
%4 = add i64 %3, 1
%5 = alloca i8, i64 %4, align 1
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.CStrCopy"(ptr %5, %"github.com/goplus/llgo/runtime/internal/runtime.String" %2)
%7 = call i32 (ptr, ...) @printf(ptr %6)
ret i32 0
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/allocstr.hello"()
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, 1
%2 = add i64 %1, 1
%3 = alloca i8, i64 %2, align 1
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.CStrCopy"(ptr %3, %"github.com/goplus/llgo/runtime/internal/runtime.String" %0)
%5 = call i32 (ptr, ...) @printf(ptr %4)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.CStrCopy"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String")
declare i32 @printf(ptr, ...)

View File

@@ -1,21 +1,19 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/any'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/any"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/any.init$guard" = global i1 false, align 1
@_llgo_int8 = linkonce global ptr null, align 8
@"*_llgo_int8" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@_llgo_string = linkonce global ptr null, align 8
@_llgo_int = linkonce global ptr null, align 8
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@1 = private unnamed_addr constant [7 x i8] c"%s %d\0A\00", align 1
@2 = private unnamed_addr constant [6 x i8] c"Hello\00", align 1
define ptr @main.hi(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.hi"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0
%2 = load ptr, ptr @_llgo_int8, align 8
@@ -37,7 +35,7 @@ _llgo_2: ; preds = %_llgo_0
unreachable
}
define i64 @main.incVal(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/any.incVal"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0
%2 = load ptr, ptr @_llgo_int, align 8
@@ -60,39 +58,35 @@ _llgo_2: ; preds = %_llgo_0
unreachable
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/any.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.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/any.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/any.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/any.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_int8", align 8
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, ptr @2, 1
%5 = call ptr @main.hi(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %4)
%6 = load ptr, ptr @_llgo_int, align 8
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr inttoptr (i64 100 to ptr), 1
%9 = call i64 @main.incVal(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8)
%10 = call i32 (ptr, ...) @printf(ptr @1, ptr %5, i64 %9)
ret i32 0
%0 = load ptr, ptr @"*_llgo_int8", align 8
%1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %1, ptr @2, 1
%3 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/any.hi"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2)
%4 = load ptr, ptr @_llgo_int, align 8
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr inttoptr (i64 100 to ptr), 1
%7 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/any.incVal"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6)
%8 = call i32 (ptr, ...) @printf(ptr @1, ptr %3, i64 %7)
ret void
}
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/any.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int8, align 8
%1 = icmp eq ptr %0, null
@@ -149,6 +143,4 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)

View File

@@ -1,16 +1,14 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/builtin'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/builtin"
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@main.a = global i64 0, align 8
@main.b = global i64 0, align 8
@"main.init$guard" = global i1 false, align 1
@main.n = global i64 0, align 8
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.a" = global i64 0, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.b" = global i64 0, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/builtin.n" = global i64 0, align 8
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
@1 = private unnamed_addr constant [3 x i8] c"def", align 1
@_llgo_int = linkonce global ptr null, align 8
@@ -20,7 +18,7 @@ source_filename = "main"
@5 = private unnamed_addr constant [3 x i8] c"abd", align 1
@6 = private unnamed_addr constant [2 x i8] c"fn", align 1
define double @main.Float64frombits(i64 %0) {
define double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Float64frombits"(i64 %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store i64 %0, ptr %1, align 4
@@ -28,7 +26,7 @@ _llgo_0:
ret double %2
}
define double @main.Inf(i64 %0) {
define double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Inf"(i64 %0) {
_llgo_0:
%1 = icmp sge i64 %0, 0
br i1 %1, label %_llgo_1, label %_llgo_3
@@ -38,92 +36,88 @@ _llgo_1: ; preds = %_llgo_0
_llgo_2: ; preds = %_llgo_3, %_llgo_1
%2 = phi i64 [ 9218868437227405312, %_llgo_1 ], [ -4503599627370496, %_llgo_3 ]
%3 = call double @main.Float64frombits(i64 %2)
%3 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Float64frombits"(i64 %2)
ret double %3
_llgo_3: ; preds = %_llgo_0
br label %_llgo_2
}
define i1 @main.IsNaN(double %0) {
define i1 @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.IsNaN"(double %0) {
_llgo_0:
%1 = fcmp une double %0, %0
ret i1 %1
}
define double @main.NaN() {
define double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.NaN"() {
_llgo_0:
%0 = call double @main.Float64frombits(i64 9221120237041090561)
%0 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Float64frombits"(i64 9221120237041090561)
ret double %0
}
define void @main.demo() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.demo"() {
_llgo_0:
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.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 i64 9223372036854775807, ptr @main.a, align 4
store i64 -9223372036854775808, ptr @main.b, align 4
store i64 -1, ptr @main.n, align 4
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$after"()
store i64 9223372036854775807, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.a", align 4
store i64 -9223372036854775808, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.b", align 4
store i64 -1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.n", align 4
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/builtin.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%3 = getelementptr inbounds i64, ptr %2, i64 0
store i64 1, ptr %3, align 4
%4 = getelementptr inbounds i64, ptr %2, i64 1
store i64 2, ptr %4, align 4
%5 = getelementptr inbounds i64, ptr %2, i64 2
store i64 3, ptr %5, align 4
%6 = getelementptr inbounds i64, ptr %2, i64 3
store i64 4, ptr %6, align 4
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 4, 1
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 4, 2
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%11 = getelementptr inbounds i64, ptr %10, i64 0
%12 = getelementptr inbounds i64, ptr %10, i64 1
%13 = getelementptr inbounds i64, ptr %10, i64 2
%14 = getelementptr inbounds i64, ptr %10, i64 3
store i64 1, ptr %11, align 4
store i64 2, ptr %12, align 4
store i64 3, ptr %13, align 4
store i64 4, ptr %14, align 4
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 10)
%16 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %15, i64 1, i64 10, i64 0, i64 4, i64 10)
%17 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%1 = getelementptr inbounds i64, ptr %0, i64 0
store i64 1, ptr %1, align 4
%2 = getelementptr inbounds i64, ptr %0, i64 1
store i64 2, ptr %2, align 4
%3 = getelementptr inbounds i64, ptr %0, i64 2
store i64 3, ptr %3, align 4
%4 = getelementptr inbounds i64, ptr %0, i64 3
store i64 4, ptr %4, align 4
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 4, 1
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 4, 2
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%9 = getelementptr inbounds i64, ptr %8, i64 0
%10 = getelementptr inbounds i64, ptr %8, i64 1
%11 = getelementptr inbounds i64, ptr %8, i64 2
%12 = getelementptr inbounds i64, ptr %8, i64 3
store i64 1, ptr %9, align 4
store i64 2, ptr %10, align 4
store i64 3, ptr %11, align 4
store i64 4, ptr %12, align 4
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 10)
%14 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %13, i64 1, i64 10, i64 0, i64 4, i64 10)
%15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 1
%16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %16)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%17 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %14, 1
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %14, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %14)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %18)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%19 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, 1
%20 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %20)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 4)
@@ -132,73 +126,75 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%22 = getelementptr inbounds i64, ptr %21, i64 0
store i64 1, ptr %22, align 4
%23 = getelementptr inbounds i64, ptr %21, i64 1
store i64 2, ptr %23, align 4
%24 = getelementptr inbounds i64, ptr %21, i64 2
store i64 3, ptr %24, align 4
%25 = getelementptr inbounds i64, ptr %21, i64 3
store i64 4, ptr %25, align 4
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 4, 1
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 4, 2
%29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %29)
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%20 = getelementptr inbounds i64, ptr %19, i64 0
store i64 1, ptr %20, align 4
%21 = getelementptr inbounds i64, ptr %19, i64 1
store i64 2, ptr %21, align 4
%22 = getelementptr inbounds i64, ptr %19, i64 2
store i64 3, ptr %22, align 4
%23 = getelementptr inbounds i64, ptr %19, i64 3
store i64 4, ptr %23, align 4
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %19, 0
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i64 4, 1
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25, i64 4, 2
%27 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %27)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%30 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
%31 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1
%32 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%33 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %32, i64 8, i64 %30, i64 1, i64 %31, i64 %30)
%34 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, 1
%35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
%36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1
%37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%38 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %37, i64 8, i64 %35, i64 1, i64 %36, i64 %35)
%39 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, 2
%40 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%42 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %41, i64 8, i64 %40, i64 1, i64 2, i64 %40)
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42, 1
%44 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
%45 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%46 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %45, i64 8, i64 %44, i64 1, i64 2, i64 %44)
%47 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46, 2
%48 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
%49 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%50 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %49, i64 8, i64 %48, i64 1, i64 2, i64 2)
%51 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50, 1
%52 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 2
%53 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%54 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %53, i64 8, i64 %52, i64 1, i64 2, i64 2)
%55 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %34)
%28 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
%29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 1
%30 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%31 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %30, i64 8, i64 %28, i64 1, i64 %29, i64 %28)
%32 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31, 1
%33 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
%34 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 1
%35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%36 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %35, i64 8, i64 %33, i64 1, i64 %34, i64 %33)
%37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, 2
%38 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
%39 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%40 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %39, i64 8, i64 %38, i64 1, i64 2, i64 %38)
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, 1
%42 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%44 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %43, i64 8, i64 %42, i64 1, i64 2, i64 %42)
%45 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, 2
%46 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
%47 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%48 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %47, i64 8, i64 %46, i64 1, i64 2, i64 2)
%49 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, 1
%50 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 2
%51 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%52 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %51, i64 8, i64 %50, i64 1, i64 2, i64 2)
%53 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %39)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %37)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %43)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %41)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %47)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %45)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %51)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %49)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %53)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%54 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %8, i64 8, i64 4, i64 1, i64 4, i64 4)
%55 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, 1
%56 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %8, i64 8, i64 4, i64 1, i64 4, i64 4)
%57 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, 2
%58 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %8, i64 8, i64 4, i64 1, i64 2, i64 4)
%59 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 1
%60 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %8, i64 8, i64 4, i64 1, i64 2, i64 4)
%61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 2
%62 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %8, i64 8, i64 4, i64 1, i64 2, i64 2)
%63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, 1
%64 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %8, i64 8, i64 4, i64 1, i64 2, i64 2)
%65 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %55)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%56 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 4, i64 4)
%57 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, 1
%58 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 4, i64 4)
%59 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 2
%60 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 4)
%61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 1
%62 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 4)
%63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, 2
%64 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 2)
%65 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %64, 1
%66 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 2)
%67 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %57)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %59)
@@ -208,58 +204,56 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %63)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %65)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %67)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%68 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, i64 1, i64 5)
%69 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, i64 1, i64 2)
%70 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, i64 5, i64 5)
%71 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %70, 1
%66 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, i64 1, i64 5)
%67 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, i64 1, i64 2)
%68 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, i64 5, i64 5)
%69 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %68, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %68)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %66)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %69)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %67)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %71)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %69)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%73 = getelementptr inbounds i64, ptr %72, i64 0
store i64 5, ptr %73, align 4
%74 = getelementptr inbounds i64, ptr %72, i64 1
store i64 6, ptr %74, align 4
%75 = getelementptr inbounds i64, ptr %72, i64 2
store i64 7, ptr %75, align 4
%76 = getelementptr inbounds i64, ptr %72, i64 3
store i64 8, ptr %76, align 4
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %72, 0
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, i64 4, 1
%79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78, i64 4, 2
%80 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, 0
%81 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, 1
%82 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, ptr %80, i64 %81, i64 8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %82)
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%71 = getelementptr inbounds i64, ptr %70, i64 0
store i64 5, ptr %71, align 4
%72 = getelementptr inbounds i64, ptr %70, i64 1
store i64 6, ptr %72, align 4
%73 = getelementptr inbounds i64, ptr %70, i64 2
store i64 7, ptr %73, align 4
%74 = getelementptr inbounds i64, ptr %70, i64 3
store i64 8, ptr %74, align 4
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %70, 0
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 4, 1
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 4, 2
%78 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, 0
%79 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, 1
%80 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, ptr %78, i64 %79, i64 8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 3)
%84 = getelementptr inbounds i8, ptr %83, i64 0
store i8 97, ptr %84, align 1
%85 = getelementptr inbounds i8, ptr %83, i64 1
store i8 98, ptr %85, align 1
%86 = getelementptr inbounds i8, ptr %83, i64 2
store i8 99, ptr %86, align 1
%87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %83, 0
%88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87, i64 3, 1
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, i64 3, 2
%90 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %89, ptr @1, i64 3, i64 1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90)
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 3)
%82 = getelementptr inbounds i8, ptr %81, i64 0
store i8 97, ptr %82, align 1
%83 = getelementptr inbounds i8, ptr %81, i64 1
store i8 98, ptr %83, align 1
%84 = getelementptr inbounds i8, ptr %81, i64 2
store i8 99, ptr %84, align 1
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %81, 0
%86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, i64 3, 1
%87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 3, 2
%88 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87, ptr @1, i64 3, i64 1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%92 = load ptr, ptr @_llgo_int, align 8
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %92, 0
%94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %93, ptr inttoptr (i64 100 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %94, ptr %91, align 8
%95 = load %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %91, align 8
%96 = ptrtoint ptr %91 to i64
%89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%90 = load ptr, ptr @_llgo_int, align 8
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %90, 0
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %91, ptr inttoptr (i64 100 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %92, ptr %89, align 8
%93 = load %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %89, align 8
%94 = ptrtoint ptr %89 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 true)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 0)
@@ -276,174 +270,174 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double 1.005000e+02)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %95)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintEface"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %93)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %91)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %89)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %96)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %94)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%97 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 3)
%98 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %97, 0
%100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %99, i64 3, 1
%101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %100, i64 3, 2
%102 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, 0
%103 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, 1
%104 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101, ptr %102, i64 %103, i64 1)
store i64 %104, ptr %98, align 4
%105 = load i64, ptr %98, align 4
%106 = getelementptr inbounds i8, ptr %97, i64 0
%95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 3)
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%97 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %95, 0
%98 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %97, i64 3, 1
%99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %98, i64 3, 2
%100 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, 0
%101 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %88, 1
%102 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %99, ptr %100, i64 %101, i64 1)
store i64 %102, ptr %96, align 4
%103 = load i64, ptr %96, align 4
%104 = getelementptr inbounds i8, ptr %95, i64 0
%105 = load i8, ptr %104, align 1
%106 = getelementptr inbounds i8, ptr %95, i64 1
%107 = load i8, ptr %106, align 1
%108 = getelementptr inbounds i8, ptr %97, i64 1
%108 = getelementptr inbounds i8, ptr %95, i64 2
%109 = load i8, ptr %108, align 1
%110 = getelementptr inbounds i8, ptr %97, i64 2
%111 = load i8, ptr %110, align 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %105)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %103)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%112 = zext i8 %107 to i64
%110 = zext i8 %105 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %110)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%111 = zext i8 %107 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %111)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%112 = zext i8 %109 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %112)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%113 = zext i8 %109 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %113)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%114 = zext i8 %111 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %114)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%115 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %97, i64 1, i64 3, i64 1, i64 3, i64 3)
%116 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %115, ptr @2, i64 4, i64 1)
store i64 %116, ptr %98, align 4
%117 = load i64, ptr %98, align 4
%118 = getelementptr inbounds i8, ptr %97, i64 0
%113 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %95, i64 1, i64 3, i64 1, i64 3, i64 3)
%114 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113, ptr @2, i64 4, i64 1)
store i64 %114, ptr %96, align 4
%115 = load i64, ptr %96, align 4
%116 = getelementptr inbounds i8, ptr %95, i64 0
%117 = load i8, ptr %116, align 1
%118 = getelementptr inbounds i8, ptr %95, i64 1
%119 = load i8, ptr %118, align 1
%120 = getelementptr inbounds i8, ptr %97, i64 1
%120 = getelementptr inbounds i8, ptr %95, i64 2
%121 = load i8, ptr %120, align 1
%122 = getelementptr inbounds i8, ptr %97, i64 2
%123 = load i8, ptr %122, align 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %117)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %115)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%124 = zext i8 %119 to i64
%122 = zext i8 %117 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %122)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%123 = zext i8 %119 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %123)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%124 = zext i8 %121 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %124)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%125 = zext i8 %121 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %125)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%126 = zext i8 %123 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %126)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%128 = getelementptr inbounds { ptr }, ptr %127, i32 0, i32 0
store ptr %98, ptr %128, align 8
%129 = insertvalue { ptr, ptr } { ptr @"main.main$2", ptr undef }, ptr %127, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @main.demo)
%125 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%126 = getelementptr inbounds { ptr }, ptr %125, i32 0, i32 0
store ptr %96, ptr %126, align 8
%127 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$2", ptr undef }, ptr %125, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.demo")
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @main.demo)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.demo")
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"main.main$1")
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$1")
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%130 = extractvalue { ptr, ptr } %129, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %130)
%128 = extractvalue { ptr, ptr } %127, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %128)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%131 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewStringIter"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 })
%129 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewStringIter"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 })
br label %_llgo_1
_llgo_1: ; preds = %_llgo_2, %_llgo_0
%132 = call { i1, i64, i32 } @"github.com/goplus/llgo/runtime/internal/runtime.StringIterNext"(ptr %131)
%133 = extractvalue { i1, i64, i32 } %132, 0
br i1 %133, label %_llgo_2, label %_llgo_3
%130 = call { i1, i64, i32 } @"github.com/goplus/llgo/runtime/internal/runtime.StringIterNext"(ptr %129)
%131 = extractvalue { i1, i64, i32 } %130, 0
br i1 %131, label %_llgo_2, label %_llgo_3
_llgo_2: ; preds = %_llgo_1
%134 = extractvalue { i1, i64, i32 } %132, 1
%135 = extractvalue { i1, i64, i32 } %132, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %134)
%132 = extractvalue { i1, i64, i32 } %130, 1
%133 = extractvalue { i1, i64, i32 } %130, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %132)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%136 = sext i32 %135 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %136)
%134 = sext i32 %133 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %134)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br label %_llgo_1
_llgo_3: ; preds = %_llgo_1
%137 = call double @main.Inf(i64 1)
%138 = call double @main.Inf(i64 -1)
%139 = call double @main.NaN()
%140 = call double @main.NaN()
%141 = call i1 @main.IsNaN(double %140)
%142 = call i1 @main.IsNaN(double 1.000000e+00)
%135 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Inf"(i64 1)
%136 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.Inf"(i64 -1)
%137 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.NaN"()
%138 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.NaN"()
%139 = call i1 @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.IsNaN"(double %138)
%140 = call i1 @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.IsNaN"(double 1.000000e+00)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %135)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %136)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %137)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %138)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %139)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %139)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %141)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %142)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %140)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%143 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 })
%144 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToRunes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143)
%141 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 })
%142 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToRunes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 7 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %141)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %142)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%145 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143)
%146 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRunes"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144)
%147 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, 0
%148 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, 1
%149 = icmp sge i64 3, %148
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %149)
%150 = getelementptr inbounds i8, ptr %147, i64 3
%151 = load i8, ptr %150, align 1
%152 = sext i8 %151 to i32
%153 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %152)
%154 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144, 0
%155 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144, 1
%156 = icmp sge i64 0, %155
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %156)
%157 = getelementptr inbounds i32, ptr %154, i64 0
%158 = load i32, ptr %157, align 4
%159 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %158)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %145)
%143 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %141)
%144 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRunes"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %142)
%145 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %141, 0
%146 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %141, 1
%147 = icmp sge i64 3, %146
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %147)
%148 = getelementptr inbounds i8, ptr %145, i64 3
%149 = load i8, ptr %148, align 1
%150 = sext i8 %149 to i32
%151 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %150)
%152 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %142, 0
%153 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %142, 1
%154 = icmp sge i64 0, %153
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %154)
%155 = getelementptr inbounds i32, ptr %152, i64 0
%156 = load i32, ptr %155, align 4
%157 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %156)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %143)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %146)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %144)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %153)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %151)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %159)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %157)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%160 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 })
%161 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%162 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%163 = xor i1 %162, true
%164 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%158 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 })
%159 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%160 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%161 = xor i1 %160, true
%162 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%163 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 })
%164 = xor i1 %163, true
%165 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 })
%166 = xor i1 %165, true
%167 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 })
%168 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%169 = xor i1 %168, true
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %160)
%166 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringLess"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 3 })
%167 = xor i1 %166, true
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %158)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %159)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %161)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %163)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %162)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %164)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %166)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %165)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %167)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %169)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
define void @"main.main$1"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$1"() {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret void
}
define void @"main.main$2"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.main$2"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -455,8 +449,6 @@ _llgo_0:
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr, i64, i64, i64, i64, i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice")
@@ -471,7 +463,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"gi
declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr, i64, i64)
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/builtin.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null

View File

@@ -1,13 +1,11 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/callback'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/callback"
@"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/callback.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1
@1 = private unnamed_addr constant [10 x i8] c"callback\0A\00", align 1
define void @main.callback(ptr %0, { ptr, ptr } %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.callback"(ptr %0, { ptr, ptr } %1) {
_llgo_0:
%2 = extractvalue { ptr, ptr } %1, 1
%3 = extractvalue { ptr, ptr } %1, 0
@@ -15,41 +13,35 @@ _llgo_0:
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/callback.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/_testrt/callback.init$guard", align 1
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/callback.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()
call void @main.callback(ptr @0, { ptr, ptr } { ptr @__llgo_stub.main.print, ptr null })
call void @main.callback(ptr @1, { ptr, ptr } { ptr @__llgo_stub.main.print, ptr null })
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.callback"(ptr @0, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/callback.print", ptr null })
call void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.callback"(ptr @1, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/callback.print", ptr null })
ret void
}
define void @main.print(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.print"(ptr %0) {
_llgo_0:
%1 = call i32 (ptr, ...) @printf(ptr %0)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define linkonce void @__llgo_stub.main.print(ptr %0, ptr %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/callback.print"(ptr %0, ptr %1) {
_llgo_0:
tail call void @main.print(ptr %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/callback.print"(ptr %1)
ret void
}

View File

@@ -1,16 +1,14 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/cast'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/cast"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"error", align 1
@_llgo_string = linkonce global ptr null, align 8
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
define void @main.cvt32Fto32(float %0, i32 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float %0, i32 %1) {
_llgo_0:
%2 = fptosi float %0 to i32
%3 = icmp ne i32 %2, %1
@@ -29,7 +27,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt32Fto32U(float %0, i32 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float %0, i32 %1) {
_llgo_0:
%2 = fptoui float %0 to i32
%3 = icmp ne i32 %2, %1
@@ -48,7 +46,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt32Fto64F(float %0, double %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float %0, double %1) {
_llgo_0:
%2 = fpext float %0 to double
%3 = fcmp une double %2, %1
@@ -67,7 +65,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt32Fto8(float %0, i8 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float %0, i8 %1) {
_llgo_0:
%2 = fptosi float %0 to i8
%3 = icmp ne i8 %2, %1
@@ -86,7 +84,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt32Fto8U(float %0, i8 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float %0, i8 %1) {
_llgo_0:
%2 = fptoui float %0 to i8
%3 = icmp ne i8 %2, %1
@@ -105,7 +103,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt32to64(i32 %0, i64 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32to64"(i32 %0, i64 %1) {
_llgo_0:
%2 = sext i32 %0 to i64
%3 = icmp ne i64 %2, %1
@@ -124,7 +122,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt64Fto32F(double %0, float %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double %0, float %1) {
_llgo_0:
%2 = fptrunc double %0 to float
%3 = fcmp une float %2, %1
@@ -143,7 +141,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt64Uto64F(i64 %0, double %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 %0, double %1) {
_llgo_0:
%2 = uitofp i64 %0 to double
%3 = fcmp une double %2, %1
@@ -162,7 +160,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt64to64F(i64 %0, double %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 %0, double %1) {
_llgo_0:
%2 = sitofp i64 %0 to double
%3 = fcmp une double %2, %1
@@ -181,7 +179,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt64to8(i64 %0, i8 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 %0, i8 %1) {
_llgo_0:
%2 = trunc i64 %0 to i8
%3 = icmp ne i8 %2, %1
@@ -200,7 +198,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvt64to8U(i64 %0, i8 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 %0, i8 %1) {
_llgo_0:
%2 = trunc i64 %0 to i8
%3 = icmp ne i8 %2, %1
@@ -219,7 +217,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.cvtUinptr(i32 %0, i64 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvtUinptr"(i32 %0, i64 %1) {
_llgo_0:
%2 = zext i32 %0 to i64
%3 = icmp ne i64 %2, %1
@@ -252,82 +250,78 @@ _llgo_4: ; preds = %_llgo_2
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cast.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/cast.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.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/cast.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()
call void @main.cvt64to8(i64 0, i8 0)
call void @main.cvt64to8(i64 127, i8 127)
call void @main.cvt64to8(i64 128, i8 -128)
call void @main.cvt64to8(i64 -128, i8 -128)
call void @main.cvt64to8(i64 -129, i8 127)
call void @main.cvt64to8(i64 256, i8 0)
call void @main.cvt64to8U(i64 0, i8 0)
call void @main.cvt64to8U(i64 255, i8 -1)
call void @main.cvt64to8U(i64 256, i8 0)
call void @main.cvt64to8U(i64 257, i8 1)
call void @main.cvt64to8U(i64 -1, i8 -1)
call void @main.cvt32Fto8(float 0x3FB99999A0000000, i8 0)
call void @main.cvt32Fto8(float 0x405FC66660000000, i8 127)
call void @main.cvt32Fto8(float 0x4060033340000000, i8 -128)
call void @main.cvt32Fto8(float 0xC060033340000000, i8 -128)
call void @main.cvt32Fto8(float 0xC060233340000000, i8 127)
call void @main.cvt32Fto8(float 0x40700199A0000000, i8 0)
call void @main.cvt32Fto8U(float 0.000000e+00, i8 0)
call void @main.cvt32Fto8U(float 2.550000e+02, i8 -1)
call void @main.cvt32Fto8U(float 2.560000e+02, i8 0)
call void @main.cvt32Fto8U(float 2.570000e+02, i8 1)
call void @main.cvt32Fto8U(float -1.000000e+00, i8 -1)
call void @main.cvt32Fto32(float 0.000000e+00, i32 0)
call void @main.cvt32Fto32(float 1.500000e+00, i32 1)
call void @main.cvt32Fto32(float 0x41D1194D80000000, i32 1147483648)
call void @main.cvt32Fto32(float 0xC1E0000000000000, i32 -2147483648)
call void @main.cvt32Fto32U(float 0.000000e+00, i32 0)
call void @main.cvt32Fto32U(float 1.500000e+00, i32 1)
call void @main.cvt32Fto32U(float 0x41F0000000000000, i32 0)
call void @main.cvt32Fto32U(float 0x41F3B9ACA0000000, i32 1000000000)
call void @main.cvt32Fto32U(float 0xC1F0000000000000, i32 0)
call void @main.cvt32Fto32U(float 0xC1D34BE880000000, i32 -1294967296)
call void @main.cvt32Fto32U(float 0xBFF19999A0000000, i32 -1)
call void @main.cvt32Fto64F(float 0.000000e+00, double 0.000000e+00)
call void @main.cvt32Fto64F(float 1.500000e+00, double 1.500000e+00)
call void @main.cvt32Fto64F(float 1.000000e+10, double 1.000000e+10)
call void @main.cvt32Fto64F(float -1.000000e+10, double -1.000000e+10)
call void @main.cvt64Fto32F(double 0.000000e+00, float 0.000000e+00)
call void @main.cvt64Fto32F(double 1.500000e+00, float 1.500000e+00)
call void @main.cvt64Fto32F(double 1.000000e+10, float 1.000000e+10)
call void @main.cvt64Fto32F(double -1.000000e+10, float -1.000000e+10)
call void @main.cvt64to64F(i64 0, double 0.000000e+00)
call void @main.cvt64to64F(i64 10000000000, double 1.000000e+10)
call void @main.cvt64to64F(i64 9223372036854775807, double 0x43E0000000000000)
call void @main.cvt64to64F(i64 -9223372036854775807, double 0xC3E0000000000000)
call void @main.cvt64Uto64F(i64 0, double 0.000000e+00)
call void @main.cvt64Uto64F(i64 10000000000, double 1.000000e+10)
call void @main.cvt64Uto64F(i64 9223372036854775807, double 0x43E0000000000000)
call void @main.cvt64Uto64F(i64 -1, double 0x43F0000000000000)
call void @main.cvt32to64(i32 0, i64 0)
call void @main.cvt32to64(i32 2147483647, i64 2147483647)
call void @main.cvtUinptr(i32 1024, i64 1024)
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 0, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 127, i8 127)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 128, i8 -128)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 -128, i8 -128)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 -129, i8 127)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8"(i64 256, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 0, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 255, i8 -1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 256, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 257, i8 1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to8U"(i64 -1, i8 -1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x3FB99999A0000000, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x405FC66660000000, i8 127)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x4060033340000000, i8 -128)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0xC060033340000000, i8 -128)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0xC060233340000000, i8 127)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8"(float 0x40700199A0000000, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 0.000000e+00, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 2.550000e+02, i8 -1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 2.560000e+02, i8 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float 2.570000e+02, i8 1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto8U"(float -1.000000e+00, i8 -1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 0.000000e+00, i32 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 1.500000e+00, i32 1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 0x41D1194D80000000, i32 1147483648)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32"(float 0xC1E0000000000000, i32 -2147483648)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0.000000e+00, i32 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 1.500000e+00, i32 1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0x41F0000000000000, i32 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0x41F3B9ACA0000000, i32 1000000000)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0xC1F0000000000000, i32 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0xC1D34BE880000000, i32 -1294967296)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto32U"(float 0xBFF19999A0000000, i32 -1)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float 0.000000e+00, double 0.000000e+00)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float 1.500000e+00, double 1.500000e+00)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float 1.000000e+10, double 1.000000e+10)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32Fto64F"(float -1.000000e+10, double -1.000000e+10)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double 0.000000e+00, float 0.000000e+00)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double 1.500000e+00, float 1.500000e+00)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double 1.000000e+10, float 1.000000e+10)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Fto32F"(double -1.000000e+10, float -1.000000e+10)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 0, double 0.000000e+00)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 10000000000, double 1.000000e+10)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 9223372036854775807, double 0x43E0000000000000)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64to64F"(i64 -9223372036854775807, double 0xC3E0000000000000)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 0, double 0.000000e+00)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 10000000000, double 1.000000e+10)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 9223372036854775807, double 0x43E0000000000000)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt64Uto64F"(i64 -1, double 0x43F0000000000000)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32to64"(i32 0, i64 0)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvt32to64"(i32 2147483647, i64 2147483647)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.cvtUinptr"(i32 1024, i64 1024)
ret void
}
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cast.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_string, align 8
%1 = icmp eq ptr %0, null
@@ -347,5 +341,3 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,57 +1,51 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/closure'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/closure"
@"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/closure.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
@1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closure.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/_testrt/closure.init$guard", align 1
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/closure.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()
call void @"main.main$1"(i64 100, i64 200)
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store { ptr, ptr } { ptr @"__llgo_stub.main.main$2", ptr null }, ptr %2, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0
store ptr %2, ptr %4, align 8
%5 = insertvalue { ptr, ptr } { ptr @"main.main$3", ptr undef }, ptr %3, 1
%6 = extractvalue { ptr, ptr } %5, 1
%7 = extractvalue { ptr, ptr } %5, 0
call void %7(ptr %6)
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$1"(i64 100, i64 200)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2", ptr null }, ptr %0, align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0
store ptr %0, ptr %2, align 8
%3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$3", ptr undef }, ptr %1, 1
%4 = extractvalue { ptr, ptr } %3, 1
%5 = extractvalue { ptr, ptr } %3, 0
call void %5(ptr %4)
ret void
}
define void @"main.main$1"(i64 %0, i64 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = call i32 (ptr, ...) @printf(ptr @0, i64 %0, i64 %1)
ret void
}
define void @"main.main$2"(i64 %0, i64 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2"(i64 %0, i64 %1) {
_llgo_0:
%2 = call i32 (ptr, ...) @printf(ptr @1, i64 %0, i64 %1)
ret void
}
define void @"main.main$3"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$3"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -62,13 +56,11 @@ _llgo_0:
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
define linkonce void @"__llgo_stub.main.main$2"(ptr %0, i64 %1, i64 %2) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
tail call void @"main.main$2"(i64 %1, i64 %2)
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/closure.main$2"(i64 %1, i64 %2)
ret void
}

View File

@@ -1,91 +1,89 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/closureconv'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/closureconv"
%main.Call = type { %main.Func, i64 }
%main.Func = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call" = type { %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", i64 }
%"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" = type { ptr, ptr }
@"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/closureconv.init$guard" = global i1 false, align 1
define i64 @"main.(*Call).add"(ptr %0, i64 %1, i64 %2) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.(*Call).add"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = add i64 %1, %2
%4 = getelementptr inbounds %main.Call, ptr %0, i32 0, i32 1
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %0, i32 0, i32 1
%5 = load i64, ptr %4, align 4
%6 = add i64 %3, %5
ret i64 %6
}
define i64 @main.add(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define %main.Func @main.demo1(i64 %0) {
define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo1"(i64 %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%2 = getelementptr inbounds %main.Call, ptr %1, i32 0, i32 1
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 1
store i64 %0, ptr %2, align 4
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0
store ptr %1, ptr %4, align 8
%5 = insertvalue { ptr, ptr } { ptr @"main.add$bound", ptr undef }, ptr %3, 1
%6 = getelementptr inbounds %main.Call, ptr %1, i32 0, i32 0
%7 = alloca %main.Func, align 8
%5 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add$bound", ptr undef }, ptr %3, 1
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 0
%7 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", align 8
store { ptr, ptr } %5, ptr %7, align 8
%8 = load %main.Func, ptr %7, align 8
store %main.Func %8, ptr %6, align 8
%9 = getelementptr inbounds %main.Call, ptr %1, i32 0, i32 0
%10 = load %main.Func, ptr %9, align 8
ret %main.Func %10
%8 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %7, align 8
store %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %8, ptr %6, align 8
%9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Call", ptr %1, i32 0, i32 0
%10 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %9, align 8
ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %10
}
define %main.Func @main.demo2() {
define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo2"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0
store ptr %0, ptr %2, align 8
%3 = insertvalue { ptr, ptr } { ptr @"main.add$bound", ptr undef }, ptr %1, 1
%4 = alloca %main.Func, align 8
%3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add$bound", ptr undef }, ptr %1, 1
%4 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", align 8
store { ptr, ptr } %3, ptr %4, align 8
%5 = load %main.Func, ptr %4, align 8
ret %main.Func %5
%5 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %4, align 8
ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %5
}
define %main.Func @main.demo3() {
define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo3"() {
_llgo_0:
ret %main.Func { ptr @__llgo_stub.main.add, ptr null }
ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add", ptr null }
}
define %main.Func @main.demo4() {
define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4"() {
_llgo_0:
ret %main.Func { ptr @"__llgo_stub.main.demo4$1", ptr null }
ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1", ptr null }
}
define i64 @"main.demo4$1"(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define %main.Func @main.demo5(i64 %0) {
define %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store i64 %0, ptr %1, align 4
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%3 = getelementptr inbounds { ptr }, ptr %2, i32 0, i32 0
store ptr %1, ptr %3, align 8
%4 = insertvalue { ptr, ptr } { ptr @"main.demo5$1", ptr undef }, ptr %2, 1
%5 = alloca %main.Func, align 8
%4 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5$1", ptr undef }, ptr %2, 1
%5 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", align 8
store { ptr, ptr } %4, ptr %5, align 8
%6 = load %main.Func, ptr %5, align 8
ret %main.Func %6
%6 = load %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func", ptr %5, align 8
ret %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %6
}
define i64 @"main.demo5$1"(ptr %0, i64 %1, i64 %2) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5$1"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = add i64 %1, %2
%4 = load { ptr }, ptr %0, align 8
@@ -95,99 +93,93 @@ _llgo_0:
ret i64 %7
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.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/_testrt/closureconv.init$guard", align 1
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/closureconv.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 %main.Func @main.demo1(i64 1)
%3 = extractvalue %main.Func %2, 1
%4 = extractvalue %main.Func %2, 0
%5 = call i64 %4(ptr %3, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %5)
%0 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo1"(i64 1)
%1 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %0, 1
%2 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %0, 0
%3 = call i64 %2(ptr %1, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%6 = call %main.Func @main.demo2()
%7 = extractvalue %main.Func %6, 1
%8 = extractvalue %main.Func %6, 0
%9 = call i64 %8(ptr %7, i64 100, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %9)
%4 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo2"()
%5 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %4, 1
%6 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %4, 0
%7 = call i64 %6(ptr %5, i64 100, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%10 = call %main.Func @main.demo3()
%11 = extractvalue %main.Func %10, 1
%12 = extractvalue %main.Func %10, 0
%13 = call i64 %12(ptr %11, i64 100, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %13)
%8 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo3"()
%9 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %8, 1
%10 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %8, 0
%11 = call i64 %10(ptr %9, i64 100, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%14 = call %main.Func @main.demo4()
%15 = extractvalue %main.Func %14, 1
%16 = extractvalue %main.Func %14, 0
%17 = call i64 %16(ptr %15, i64 100, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17)
%12 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4"()
%13 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %12, 1
%14 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %12, 0
%15 = call i64 %14(ptr %13, i64 100, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%18 = call %main.Func @main.demo5(i64 1)
%19 = extractvalue %main.Func %18, 1
%20 = extractvalue %main.Func %18, 0
%21 = call i64 %20(ptr %19, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %21)
%16 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 1)
%17 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %16, 1
%18 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %16, 0
%19 = call i64 %18(ptr %17, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%22 = call %main.Func @main.demo5(i64 1)
%23 = alloca { ptr, ptr }, align 8
store %main.Func %22, ptr %23, align 8
%24 = load { ptr, ptr }, ptr %23, align 8
%25 = extractvalue { ptr, ptr } %24, 1
%26 = extractvalue { ptr, ptr } %24, 0
%27 = call i64 %26(ptr %25, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %27)
%20 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 1)
%21 = alloca { ptr, ptr }, align 8
store %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %20, ptr %21, align 8
%22 = load { ptr, ptr }, ptr %21, align 8
%23 = extractvalue { ptr, ptr } %22, 1
%24 = extractvalue { ptr, ptr } %22, 0
%25 = call i64 %24(ptr %23, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %25)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%28 = call %main.Func @main.demo5(i64 1)
%29 = extractvalue %main.Func %28, 1
%30 = extractvalue %main.Func %28, 0
%31 = call i64 %30(ptr %29, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %31)
%26 = call %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo5"(i64 1)
%27 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %26, 1
%28 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.Func" %26, 0
%29 = call i64 %28(ptr %27, i64 99, i64 200)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %29)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
define i64 @"main.add$bound"(ptr %0, i64 %1, i64 %2) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add$bound"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = load { ptr }, ptr %0, align 8
%4 = extractvalue { ptr } %3, 0
%5 = call i64 @"main.(*Call).add"(ptr %4, i64 %1, i64 %2)
%5 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.(*Call).add"(ptr %4, i64 %1, i64 %2)
ret i64 %5
}
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
define linkonce i64 @__llgo_stub.main.add(ptr %0, i64 %1, i64 %2) {
define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = tail call i64 @main.add(i64 %1, i64 %2)
%3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.add"(i64 %1, i64 %2)
ret i64 %3
}
define linkonce i64 @"__llgo_stub.main.demo4$1"(ptr %0, i64 %1, i64 %2) {
define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = tail call i64 @"main.demo4$1"(i64 %1, i64 %2)
%3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureconv.demo4$1"(i64 %1, i64 %2)
ret i64 %3
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,98 +1,92 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/closureiface'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/closureiface"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"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 }
@"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/closureiface.init$guard" = global i1 false, align 1
@_llgo_int = linkonce global ptr null, align 8
@"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU" = linkonce global ptr null, align 8
@_llgo_Pointer = linkonce global ptr null, align 8
@"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [2 x i8] c"$f", align 1
@1 = private unnamed_addr constant [5 x i8] c"$data", align 1
@2 = private unnamed_addr constant [4 x i8] c"main", align 1
@2 = private unnamed_addr constant [55 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/closureiface", align 1
@3 = private unnamed_addr constant [5 x i8] c"error", align 1
@_llgo_string = linkonce global ptr null, align 8
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.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/closureiface.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.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/closureiface.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store i64 200, ptr %2, align 4
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0
store ptr %2, ptr %4, align 8
%5 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %3, 1
%6 = load ptr, ptr @_llgo_int, align 8
%7 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
%8 = load ptr, ptr @_llgo_Pointer, align 8
%9 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } %5, ptr %10, align 8
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, ptr %10, 1
%13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %12, 0
%14 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%15 = icmp eq ptr %13, %14
br i1 %15, label %_llgo_3, label %_llgo_4
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store i64 200, ptr %0, align 4
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0
store ptr %0, ptr %2, align 8
%3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.main$1", ptr undef }, ptr %1, 1
%4 = load ptr, ptr @_llgo_int, align 8
%5 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
%6 = load ptr, ptr @_llgo_Pointer, align 8
%7 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } %3, ptr %8, align 8
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr %8, 1
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, 0
%12 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%13 = icmp eq ptr %11, %12
br i1 %13, label %_llgo_3, label %_llgo_4
_llgo_1: ; preds = %_llgo_5
%16 = load ptr, ptr @_llgo_string, align 8
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr %17, align 8
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %16, 0
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr %17, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19)
%14 = load ptr, ptr @_llgo_string, align 8
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr %15, align 8
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %15, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17)
unreachable
_llgo_2: ; preds = %_llgo_5
%20 = extractvalue { ptr, ptr } %28, 1
%21 = extractvalue { ptr, ptr } %28, 0
%22 = call i64 %21(ptr %20, i64 100)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %22)
%18 = extractvalue { ptr, ptr } %26, 1
%19 = extractvalue { ptr, ptr } %26, 0
%20 = call i64 %19(ptr %18, i64 100)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %20)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
_llgo_3: ; preds = %_llgo_0
%23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %12, 1
%24 = load { ptr, ptr }, ptr %23, align 8
%25 = insertvalue { { ptr, ptr }, i1 } undef, { ptr, ptr } %24, 0
%26 = insertvalue { { ptr, ptr }, i1 } %25, i1 true, 1
%21 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, 1
%22 = load { ptr, ptr }, ptr %21, align 8
%23 = insertvalue { { ptr, ptr }, i1 } undef, { ptr, ptr } %22, 0
%24 = insertvalue { { ptr, ptr }, i1 } %23, i1 true, 1
br label %_llgo_5
_llgo_4: ; preds = %_llgo_0
br label %_llgo_5
_llgo_5: ; preds = %_llgo_4, %_llgo_3
%27 = phi { { ptr, ptr }, i1 } [ %26, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%28 = extractvalue { { ptr, ptr }, i1 } %27, 0
%29 = extractvalue { { ptr, ptr }, i1 } %27, 1
br i1 %29, label %_llgo_2, label %_llgo_1
%25 = phi { { ptr, ptr }, i1 } [ %24, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%26 = extractvalue { { ptr, ptr }, i1 } %25, 0
%27 = extractvalue { { ptr, ptr }, i1 } %25, 1
br i1 %27, label %_llgo_2, label %_llgo_1
}
define i64 @"main.main$1"(ptr %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.main$1"(ptr %0, i64 %1) {
_llgo_0:
%2 = load { ptr }, ptr %0, align 8
%3 = extractvalue { ptr } %2, 0
@@ -101,13 +95,11 @@ _llgo_0:
ret i64 %5
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null
@@ -181,8 +173,8 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %37, 0
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 2, 1
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 2, 2
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42)
store ptr %43, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 55 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42)
store ptr %43, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/closureiface.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%44 = load ptr, ptr @_llgo_string, align 8
%45 = icmp eq ptr %44, null
br i1 %45, label %_llgo_7, label %_llgo_8

View File

@@ -1,29 +1,23 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/complex'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/complex"
@"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/complex.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/complex.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/complex.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/_testrt/complex.init$guard", align 1
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/complex.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()
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double 1.000000e+00)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double 2.000000e+00)
@@ -52,11 +46,9 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 true)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,18 +1,16 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/concat'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/concat"
%"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
@"github.com/goplus/llgo/compiler/cl/_testrt/concat.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [3 x i8] c"...", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@1 = private unnamed_addr constant [5 x i8] c"Hello", align 1
@2 = private unnamed_addr constant [1 x i8] c" ", align 1
@3 = private unnamed_addr constant [5 x i8] c"World", align 1
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.concat(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/concat.concat"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
br label %_llgo_1
@@ -40,54 +38,48 @@ _llgo_3: ; preds = %_llgo_1
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2
}
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.info(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/concat.info"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
_llgo_0:
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" %0)
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/concat.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/concat.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/_testrt/concat.init$guard", align 1
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/concat.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48)
%3 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, i64 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %3, align 8
%4 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, i64 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %4, align 8
%5 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, i64 2
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr %5, align 8
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 3, 1
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 3, 2
%9 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.concat(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %9)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48)
%1 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %0, i64 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %0, i64 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %2, align 8
%3 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %0, i64 2
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr %3, align 8
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4, i64 3, 1
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 3, 2
%7 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/concat.concat"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %7)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1)
declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")

View File

@@ -1,36 +1,28 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/constuptr'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/constuptr"
@"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/constuptr.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/constuptr.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/_testrt/constuptr.init$guard", align 1
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/constuptr.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()
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr inttoptr (i64 100 to ptr))
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,34 +1,26 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/cstr'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/cstr"
@"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/cstr.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [14 x i8] c"Hello, world\0A\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cstr.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cstr.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/_testrt/cstr.init$guard", align 1
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/cstr.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()
call void (ptr, ...) @printf(ptr @0)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @printf(ptr, ...)

View File

@@ -1,34 +1,26 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/cvar'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/cvar"
@_bar_x = external global { [16 x i8], [2 x ptr] }, align 8
@_bar_y = external global { [16 x i8] }, align 1
@"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/cvar.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/cvar.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/cvar.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/_testrt/cvar.init$guard", align 1
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/cvar.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 { [16 x i8], [2 x ptr] }, ptr @_bar_x, align 8
%3 = load { [16 x i8] }, ptr @_bar_y, align 1
ret i32 0
%0 = load { [16 x i8], [2 x ptr] }, ptr @_bar_x, align 8
%1 = load { [16 x i8] }, ptr @_bar_y, align 1
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,21 +1,19 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/eface'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/eface"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%main.eface = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testrt/eface.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr }
%"github.com/goplus/llgo/runtime/abi.UncommonType" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i16, i16, i32 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"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/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr }
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [6 x i8] c"invoke", align 1
@1 = private unnamed_addr constant [7 x i8] c"\09elem: ", align 1
@2 = private unnamed_addr constant [9 x i8] c"\09uncomm: ", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@_llgo_bool = linkonce global ptr null, align 8
@_llgo_int = linkonce global ptr null, align 8
@_llgo_int8 = linkonce global ptr null, align 8
@@ -33,40 +31,40 @@ source_filename = "main"
@"[10]_llgo_int" = linkonce global ptr null, align 8
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
@_llgo_Pointer = linkonce global ptr null, align 8
@"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [2 x i8] c"$f", align 1
@4 = private unnamed_addr constant [5 x i8] c"$data", align 1
@5 = private unnamed_addr constant [4 x i8] c"main", align 1
@5 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/eface", align 1
@"*_llgo_int" = linkonce global ptr null, align 8
@"[]_llgo_int" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [5 x i8] c"hello", align 1
@_llgo_string = linkonce global ptr null, align 8
@"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [1 x i8] c"x", align 1
@8 = private unnamed_addr constant [1 x i8] c"y", align 1
@9 = private unnamed_addr constant [1 x i8] c"z", align 1
@_llgo_main.T = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T" = linkonce global ptr null, align 8
@10 = private unnamed_addr constant [1 x i8] c"T", align 1
@11 = private unnamed_addr constant [6 x i8] c"Invoke", align 1
define void @"main.(*T).Invoke"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.(*T).Invoke"(ptr %0) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret void
}
define void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, ptr %1, align 8
%2 = getelementptr inbounds %main.eface, ptr %1, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/eface.eface", ptr %1, i32 0, i32 0
%3 = load ptr, ptr %2, align 8
call void @main.dumpTyp(ptr %3, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpTyp"(ptr %3, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer)
ret void
}
define void @main.dumpTyp(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpTyp"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1)
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/abi.(*Type).String"(ptr %0)
@@ -112,7 +110,7 @@ _llgo_0:
_llgo_1: ; preds = %_llgo_0
%22 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Elem"(ptr %0)
%23 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 })
call void @main.dumpTyp(ptr %22, %"github.com/goplus/llgo/runtime/internal/runtime.String" %23)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpTyp"(ptr %22, %"github.com/goplus/llgo/runtime/internal/runtime.String" %23)
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -123,7 +121,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
_llgo_3: ; preds = %_llgo_2
%26 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Uncommon"(ptr %0)
%27 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 9 })
call void @main.dumpUncommon(ptr %26, %"github.com/goplus/llgo/runtime/internal/runtime.String" %27)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpUncommon"(ptr %26, %"github.com/goplus/llgo/runtime/internal/runtime.String" %27)
%28 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %0, i32 0, i32 10
%29 = load ptr, ptr %28, align 8
%30 = icmp ne ptr %29, null
@@ -137,11 +135,11 @@ _llgo_5: ; preds = %_llgo_3
%32 = load ptr, ptr %31, align 8
%33 = call ptr @"github.com/goplus/llgo/runtime/abi.(*Type).Uncommon"(ptr %32)
%34 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringCat"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 9 })
call void @main.dumpUncommon(ptr %33, %"github.com/goplus/llgo/runtime/internal/runtime.String" %34)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpUncommon"(ptr %33, %"github.com/goplus/llgo/runtime/internal/runtime.String" %34)
br label %_llgo_4
}
define void @main.dumpUncommon(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dumpUncommon"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1)
%2 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.UncommonType", ptr %0, i32 0, i32 0
@@ -161,133 +159,129 @@ _llgo_0:
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.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/_testrt/eface.init$guard", align 1
call void @"github.com/goplus/llgo/runtime/abi.init"()
call void @"main.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.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/eface.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_bool, align 8
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, ptr inttoptr (i64 -1 to ptr), 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %4)
%5 = load ptr, ptr @_llgo_int, align 8
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %7)
%8 = load ptr, ptr @_llgo_int8, align 8
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %8, 0
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %10)
%11 = load ptr, ptr @_llgo_int16, align 8
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %11, 0
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %12, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %13)
%14 = load ptr, ptr @_llgo_int32, align 8
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %16)
%17 = load ptr, ptr @_llgo_int64, align 8
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %17, 0
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19)
%20 = load ptr, ptr @_llgo_uint, align 8
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %21, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %22)
%23 = load ptr, ptr @_llgo_uint8, align 8
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %23, 0
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %24, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %25)
%26 = load ptr, ptr @_llgo_uint16, align 8
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %26, 0
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %27, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %28)
%29 = load ptr, ptr @_llgo_uint32, align 8
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %29, 0
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %31)
%32 = load ptr, ptr @_llgo_uint64, align 8
%33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %32, 0
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %33, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %34)
%35 = load ptr, ptr @_llgo_uintptr, align 8
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %35, 0
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %36, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %37)
%38 = load ptr, ptr @_llgo_float32, align 8
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %40)
%41 = load ptr, ptr @_llgo_float64, align 8
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %41, 0
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %43)
%44 = load ptr, ptr @"[10]_llgo_int", align 8
%45 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
store [10 x i64] zeroinitializer, ptr %45, align 4
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %44, 0
%47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %46, ptr %45, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %47)
%48 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%49 = load ptr, ptr @_llgo_Pointer, align 8
%50 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null }, ptr %51, align 8
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %50, 0
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %52, ptr %51, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %53)
%54 = load ptr, ptr @"*_llgo_int", align 8
%55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %54, 0
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %55, ptr null, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %56)
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %57, 0
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, i64 0, 1
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 0, 2
%61 = load ptr, ptr @"[]_llgo_int", align 8
%62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, ptr %62, align 8
%63 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %61, 0
%64 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %63, ptr %62, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %64)
%65 = load ptr, ptr @_llgo_string, align 8
%66 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %66, align 8
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %65, 0
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %67, ptr %66, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %68)
%69 = load ptr, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store { i8, i64, i64 } zeroinitializer, ptr %70, align 4
%71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %71, ptr %70, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %72)
%73 = load ptr, ptr @_llgo_main.T, align 8
%74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, ptr %74, align 8
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %73, 0
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %75, ptr %74, 1
call void @main.dump(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %76)
ret i32 0
%0 = load ptr, ptr @_llgo_bool, align 8
%1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %1, ptr inttoptr (i64 -1 to ptr), 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2)
%3 = load ptr, ptr @_llgo_int, align 8
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5)
%6 = load ptr, ptr @_llgo_int8, align 8
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8)
%9 = load ptr, ptr @_llgo_int16, align 8
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11)
%12 = load ptr, ptr @_llgo_int32, align 8
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14)
%15 = load ptr, ptr @_llgo_int64, align 8
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %15, 0
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17)
%18 = load ptr, ptr @_llgo_uint, align 8
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %18, 0
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %19, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %20)
%21 = load ptr, ptr @_llgo_uint8, align 8
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %21, 0
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %22, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23)
%24 = load ptr, ptr @_llgo_uint16, align 8
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %24, 0
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %25, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %26)
%27 = load ptr, ptr @_llgo_uint32, align 8
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %27, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29)
%30 = load ptr, ptr @_llgo_uint64, align 8
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %30, 0
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %32)
%33 = load ptr, ptr @_llgo_uintptr, align 8
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %33, 0
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %34, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %35)
%36 = load ptr, ptr @_llgo_float32, align 8
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %36, 0
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %37, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %38)
%39 = load ptr, ptr @_llgo_float64, align 8
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %39, 0
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41)
%42 = load ptr, ptr @"[10]_llgo_int", align 8
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
store [10 x i64] zeroinitializer, ptr %43, align 4
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45)
%46 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%47 = load ptr, ptr @_llgo_Pointer, align 8
%48 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1", ptr null }, ptr %49, align 8
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %48, 0
%51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %50, ptr %49, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %51)
%52 = load ptr, ptr @"*_llgo_int", align 8
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %52, 0
%54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, ptr null, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %54)
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0
%57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 0, 1
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, i64 0, 2
%59 = load ptr, ptr @"[]_llgo_int", align 8
%60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, ptr %60, align 8
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %59, 0
%62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %61, ptr %60, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %62)
%63 = load ptr, ptr @_llgo_string, align 8
%64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %64, align 8
%65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %63, 0
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %65, ptr %64, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %66)
%67 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
%68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store { i8, i64, i64 } zeroinitializer, ptr %68, align 4
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %67, 0
%70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %69, ptr %68, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %70)
%71 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T", align 8
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, ptr %72, align 8
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %71, 0
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %73, ptr %72, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.dump"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %74)
ret void
}
define void @"main.main$1"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1"() {
_llgo_0:
ret void
}
@@ -314,9 +308,7 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/g
declare void @"github.com/goplus/llgo/runtime/abi.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_bool, align 8
%1 = icmp eq ptr %0, null
@@ -519,8 +511,8 @@ _llgo_34: ; preds = %_llgo_33, %_llgo_32
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %72, 0
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 1
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 2
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77)
store ptr %78, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 48 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77)
store ptr %78, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%79 = load ptr, ptr @"*_llgo_int", align 8
%80 = icmp eq ptr %79, null
br i1 %80, label %_llgo_35, label %_llgo_36
@@ -570,15 +562,15 @@ _llgo_40: ; preds = %_llgo_39, %_llgo_38
%100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %96, 0
%101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %100, i64 3, 1
%102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101, i64 3, 2
%103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %102)
store ptr %103, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
%104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 1 }, i64 24, i64 16, i64 0, i64 1)
%105 = load ptr, ptr @_llgo_main.T, align 8
%103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 48 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %102)
store ptr %103, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
%104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 1 }, i64 24, i64 16, i64 0, i64 1)
%105 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T", align 8
%106 = icmp eq ptr %105, null
br i1 %106, label %_llgo_41, label %_llgo_42
_llgo_41: ; preds = %_llgo_40
store ptr %104, ptr @_llgo_main.T, align 8
store ptr %104, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/eface.T", align 8
br label %_llgo_42
_llgo_42: ; preds = %_llgo_41, %_llgo_40
@@ -588,8 +580,8 @@ _llgo_42: ; preds = %_llgo_41, %_llgo_40
_llgo_43: ; preds = %_llgo_42
%108 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%109 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %108, 1
%110 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %109, ptr @"main.(*T).Invoke", 2
%111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %110, ptr @"main.(*T).Invoke", 3
%110 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %109, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.(*T).Invoke", 2
%111 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %110, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/eface.(*T).Invoke", 3
%112 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%113 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %112, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %111, ptr %113, align 8
@@ -609,9 +601,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64, ptr)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
define linkonce void @"__llgo_stub.main.main$1"(ptr %0) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1"(ptr %0) {
_llgo_0:
tail call void @"main.main$1"()
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/eface.main$1"()
ret void
}

View File

@@ -1,20 +1,18 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/float2any'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/float2any"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$guard" = global i1 false, align 1
@_llgo_float32 = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@_llgo_string = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [9 x i8] c"error f32", align 1
@_llgo_float64 = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [9 x i8] c"error f64", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
define void @main.check32(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check32"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0
%2 = load ptr, ptr @_llgo_float32, align 8
@@ -51,7 +49,7 @@ _llgo_4: ; preds = %_llgo_0
unreachable
}
define void @main.check64(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check64"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0
%2 = load ptr, ptr @_llgo_float64, align 8
@@ -87,54 +85,50 @@ _llgo_4: ; preds = %_llgo_0
unreachable
}
define float @main.f32() {
define float @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f32"() {
_llgo_0:
ret float 0x400921FB60000000
}
define double @main.f64() {
define double @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f64"() {
_llgo_0:
ret double 0x400921FB53C8D4F1
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.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/float2any.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.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/float2any.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 float @main.f32()
%3 = load ptr, ptr @_llgo_float32, align 8
%4 = bitcast float %2 to i32
%5 = inttoptr i32 %4 to ptr
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1
call void @main.check32(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %7)
%8 = call double @main.f64()
%9 = load ptr, ptr @_llgo_float64, align 8
%10 = bitcast double %8 to i64
%11 = inttoptr i64 %10 to ptr
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %12, ptr %11, 1
call void @main.check64(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %13)
ret i32 0
%0 = call float @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f32"()
%1 = load ptr, ptr @_llgo_float32, align 8
%2 = bitcast float %0 to i32
%3 = inttoptr i32 %2 to ptr
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %1, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr %3, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check32"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5)
%6 = call double @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.f64"()
%7 = load ptr, ptr @_llgo_float64, align 8
%8 = bitcast double %6 to i64
%9 = inttoptr i64 %8 to ptr
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %9, 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.check64"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11)
ret void
}
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/float2any.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_float32, align 8
%1 = icmp eq ptr %0, null
@@ -174,5 +168,3 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,36 +1,28 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/fprintf'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/fprintf"
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.init$guard" = global i1 false, align 1
@__stderrp = external global ptr, align 8
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@0 = 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/fprintf.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/fprintf.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/_testrt/fprintf.init$guard", align 1
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/fprintf.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 @__stderrp, align 8
call void (ptr, ptr, ...) @fprintf(ptr %2, ptr @0, i64 100)
ret i32 0
%0 = load ptr, ptr @__stderrp, align 8
call void (ptr, ptr, ...) @fprintf(ptr %0, ptr @0, i64 100)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @fprintf(ptr, ptr, ...)

View File

@@ -1,51 +1,45 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/freevars'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/freevars"
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@"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/freevars.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.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/_testrt/freevars.init$guard", align 1
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/freevars.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()
call void @"main.main$1"({ ptr, ptr } { ptr @"__llgo_stub.main.main$2", ptr null })
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2", ptr null })
ret void
}
define void @"main.main$1"({ ptr, ptr } %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1"({ ptr, ptr } %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store { ptr, ptr } %0, ptr %1, align 8
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%3 = getelementptr inbounds { ptr }, ptr %2, i32 0, i32 0
store ptr %1, ptr %3, align 8
%4 = insertvalue { ptr, ptr } { ptr @"main.main$1$1", ptr undef }, ptr %2, 1
%4 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1$1", ptr undef }, ptr %2, 1
%5 = extractvalue { ptr, ptr } %4, 1
%6 = extractvalue { ptr, ptr } %4, 0
call void %6(ptr %5, %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
ret void
}
define void @"main.main$1$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$1$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) {
_llgo_0:
%2 = load { ptr }, ptr %0, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1)
@@ -76,16 +70,14 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @"main.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) {
_llgo_0:
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define linkonce void @"__llgo_stub.main.main$2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1) {
_llgo_0:
tail call void @"main.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/freevars.main$2"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1)
ret void
}

View File

@@ -1,64 +1,56 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/funcaddr'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/funcaddr"
@"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/funcaddr.init$guard" = global i1 false, align 1
define i64 @main.add(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.add"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.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/_testrt/funcaddr.init$guard", align 1
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/funcaddr.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store ptr @main.add, ptr %2, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store ptr @"main.main$1", ptr %3, align 8
%4 = load ptr, ptr %2, align 8
%5 = icmp eq ptr @main.add, %4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %5)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.add", ptr %0, align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.main$1", ptr %1, align 8
%2 = load ptr, ptr %0, align 8
%3 = icmp eq ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.add", %2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%6 = load ptr, ptr %2, align 8
%7 = load ptr, ptr %2, align 8
%8 = icmp eq ptr %6, %7
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %8)
%4 = load ptr, ptr %0, align 8
%5 = load ptr, ptr %0, align 8
%6 = icmp eq ptr %4, %5
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%9 = load ptr, ptr %3, align 8
%10 = load ptr, ptr %3, align 8
%11 = icmp eq ptr %9, %10
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %11)
%7 = load ptr, ptr %1, align 8
%8 = load ptr, ptr %1, align 8
%9 = icmp eq ptr %7, %8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %9)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
define i64 @"main.main$1"(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/funcaddr.main$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1)

View File

@@ -1,42 +1,40 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/funcdecl'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/funcdecl"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.rtype = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.rtype" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"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 }
@"main.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$guard" = global i1 false, align 1
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
@_llgo_Pointer = linkonce global ptr null, align 8
@"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [2 x i8] c"$f", align 1
@1 = private unnamed_addr constant [5 x i8] c"$data", align 1
@2 = private unnamed_addr constant [4 x i8] c"main", align 1
@2 = private unnamed_addr constant [51 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl", align 1
@3 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@_llgo_string = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [4 x i8] c"demo", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@5 = private unnamed_addr constant [5 x i8] c"hello", align 1
define void @main.check({ ptr, ptr } %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.check"({ ptr, ptr } %0) {
_llgo_0:
%1 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%2 = load ptr, ptr @_llgo_Pointer, align 8
%3 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } { ptr @__llgo_stub.main.demo, ptr null }, ptr %4, align 8
store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo", ptr null }, ptr %4, align 8
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %3, 0
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr %4, 1
%7 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%7 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } %0, ptr %8, align 8
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr %8, 1
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 0
%12 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%12 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%13 = icmp eq ptr %11, %12
br i1 %13, label %_llgo_1, label %_llgo_2
@@ -44,7 +42,7 @@ _llgo_1: ; preds = %_llgo_0
%14 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 1
%15 = load { ptr, ptr }, ptr %14, align 8
%16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, 0
%17 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%17 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%18 = icmp eq ptr %16, %17
br i1 %18, label %_llgo_3, label %_llgo_4
@@ -73,10 +71,10 @@ _llgo_3: ; preds = %_llgo_1
%27 = extractvalue { ptr, ptr } %24, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %27)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @main.demo)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo")
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%28 = call ptr @main.closurePtr(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6)
%29 = call ptr @main.closurePtr(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %10)
%28 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6)
%29 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %10)
%30 = icmp eq ptr %28, %29
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %30)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
@@ -92,57 +90,53 @@ _llgo_4: ; preds = %_llgo_1
unreachable
}
define ptr @main.closurePtr(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.closurePtr"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, ptr %1, align 8
%2 = getelementptr inbounds %main.rtype, ptr %1, i32 0, i32 1
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.rtype", ptr %1, i32 0, i32 1
%3 = load ptr, ptr %2, align 8
%4 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0
%5 = load ptr, ptr %4, align 8
ret ptr %5
}
define void @main.demo() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo"() {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.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/funcdecl.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.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/funcdecl.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()
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
call void @main.check({ ptr, ptr } { ptr @__llgo_stub.main.demo, ptr null })
ret i32 0
}
define linkonce void @__llgo_stub.main.demo(ptr %0) {
_llgo_0:
tail call void @main.demo()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.check"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo", ptr null })
ret void
}
define void @"main.init$after"() {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo"(ptr %0) {
_llgo_0:
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.demo"()
ret void
}
define void @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.init$after"() {
_llgo_0:
%0 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%1 = icmp eq ptr %0, null
@@ -194,8 +188,8 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %26, 0
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 2, 1
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 2, 2
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31)
store ptr %32, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31)
store ptr %32, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/funcdecl.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
%33 = load ptr, ptr @_llgo_string, align 8
%34 = icmp eq ptr %33, null
br i1 %34, label %_llgo_5, label %_llgo_6
@@ -234,5 +228,3 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,32 +1,30 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/gblarray'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/gblarray"
%"github.com/goplus/llgo/runtime/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@main.basicTypes = global [25 x ptr] zeroinitializer, align 8
@"main.init$guard" = global i1 false, align 1
@main.sizeBasicTypes = global [25 x i64] zeroinitializer, align 8
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicTypes" = global [25 x ptr] zeroinitializer, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.init$guard" = global i1 false, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.sizeBasicTypes" = global [25 x i64] zeroinitializer, align 8
@0 = private unnamed_addr constant [20 x i8] c"Kind: %d, Size: %d\0A\00", align 1
define ptr @main.Basic(i64 %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.Basic"(i64 %0) {
_llgo_0:
%1 = icmp sge i64 %0, 25
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %1)
%2 = getelementptr inbounds ptr, ptr @main.basicTypes, i64 %0
%2 = getelementptr inbounds ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicTypes", i64 %0
%3 = load ptr, ptr %2, align 8
ret ptr %3
}
define ptr @main.basicType(i64 %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicType"(i64 %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 72)
%2 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %1, i32 0, i32 0
%3 = icmp sge i64 %0, 25
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %3)
%4 = getelementptr inbounds i64, ptr @main.sizeBasicTypes, i64 %0
%4 = getelementptr inbounds i64, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.sizeBasicTypes", i64 %0
%5 = load i64, ptr %4, align 4
%6 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %1, i32 0, i32 2
%7 = trunc i64 %0 to i32
@@ -38,37 +36,33 @@ _llgo_0:
ret ptr %1
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.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/_testrt/gblarray.init$guard", align 1
call void @"github.com/goplus/llgo/runtime/abi.init"()
store i64 16, ptr getelementptr inbounds (i64, ptr @main.sizeBasicTypes, i64 24), align 4
%1 = call ptr @main.basicType(i64 24)
store ptr %1, ptr getelementptr inbounds (ptr, ptr @main.basicTypes, i64 24), align 8
store i64 16, ptr getelementptr inbounds (i64, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.sizeBasicTypes", i64 24), align 4
%1 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicType"(i64 24)
store ptr %1, ptr getelementptr inbounds (ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.basicTypes", i64 24), align 8
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/gblarray.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 ptr @main.Basic(i64 24)
%3 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %2, i32 0, i32 6
%4 = load i8, ptr %3, align 1
%5 = sext i8 %4 to i64
%6 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %2, i32 0, i32 0
%7 = load i64, ptr %6, align 4
%8 = call i32 (ptr, ...) @printf(ptr @0, i64 %5, i64 %7)
ret i32 0
%0 = call ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gblarray.Basic"(i64 24)
%1 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %0, i32 0, i32 6
%2 = load i8, ptr %1, align 1
%3 = sext i8 %2 to i64
%4 = getelementptr inbounds %"github.com/goplus/llgo/runtime/abi.Type", ptr %0, i32 0, i32 0
%5 = load i64, ptr %4, align 4
%6 = call i32 (ptr, ...) @printf(ptr @0, i64 %3, i64 %5)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1)
@@ -77,6 +71,4 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/abi.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)

View File

@@ -1,38 +1,30 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/gotypes'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/gotypes"
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
@"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/gotypes.init$guard" = global i1 false, align 1
define void @main.foo(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.foo"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0) {
_llgo_0:
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.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/_testrt/gotypes.init$guard", align 1
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/gotypes.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()
call void @main.foo(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/gotypes.foo"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,47 +1,39 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/hello'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/hello"
@main.format = global [10 x i8] zeroinitializer, align 1
@"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/hello.format" = global [10 x i8] zeroinitializer, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/hello.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/hello.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.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 i8 72, ptr @main.format, align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @main.format, i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @main.format, i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @main.format, i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @main.format, i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @main.format, i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @main.format, i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @main.format, i64 9), align 1
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.init$guard", align 1
store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i64 9), align 1
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/hello.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 i32 @strlen(ptr @main.format)
call void (ptr, ...) @printf(ptr @main.format, i32 %2)
ret i32 0
%0 = call i32 @strlen(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format")
call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/hello.format", i32 %0)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @strlen(ptr)
declare void @printf(ptr, ...)

View File

@@ -1,154 +1,146 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/index'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/index"
%main.point = type { i64, i64 }
%"github.com/goplus/llgo/compiler/cl/_testrt/index.point" = type { i64, i64 }
%"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/index.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [6 x i8] c"123456", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/index.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/index.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/_testrt/index.init$guard", align 1
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/index.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 = alloca %main.point, align 8
call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false)
%3 = alloca [3 x %main.point], align 8
call void @llvm.memset(ptr %3, i8 0, i64 48, i1 false)
%4 = getelementptr inbounds %main.point, ptr %3, i64 0
%5 = getelementptr inbounds %main.point, ptr %4, i32 0, i32 0
%6 = getelementptr inbounds %main.point, ptr %4, i32 0, i32 1
%7 = getelementptr inbounds %main.point, ptr %3, i64 1
%8 = getelementptr inbounds %main.point, ptr %7, i32 0, i32 0
%9 = getelementptr inbounds %main.point, ptr %7, i32 0, i32 1
%10 = getelementptr inbounds %main.point, ptr %3, i64 2
%11 = getelementptr inbounds %main.point, ptr %10, i32 0, i32 0
%12 = getelementptr inbounds %main.point, ptr %10, i32 0, i32 1
store i64 1, ptr %5, align 4
store i64 2, ptr %6, align 4
store i64 3, ptr %8, align 4
store i64 4, ptr %9, align 4
store i64 5, ptr %11, align 4
store i64 6, ptr %12, align 4
%13 = load [3 x %main.point], ptr %3, align 4
%14 = getelementptr inbounds %main.point, ptr %3, i64 2
%15 = load %main.point, ptr %14, align 4
store %main.point %15, ptr %2, align 4
%16 = getelementptr inbounds %main.point, ptr %2, i32 0, i32 0
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", align 8
call void @llvm.memset(ptr %0, i8 0, i64 16, i1 false)
%1 = alloca [3 x %"github.com/goplus/llgo/compiler/cl/_testrt/index.point"], align 8
call void @llvm.memset(ptr %1, i8 0, i64 48, i1 false)
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 0
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %2, i32 0, i32 0
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %2, i32 0, i32 1
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 1
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %5, i32 0, i32 0
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %5, i32 0, i32 1
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 2
%9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %8, i32 0, i32 0
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %8, i32 0, i32 1
store i64 1, ptr %3, align 4
store i64 2, ptr %4, align 4
store i64 3, ptr %6, align 4
store i64 4, ptr %7, align 4
store i64 5, ptr %9, align 4
store i64 6, ptr %10, align 4
%11 = load [3 x %"github.com/goplus/llgo/compiler/cl/_testrt/index.point"], ptr %1, align 4
%12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %1, i64 2
%13 = load %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %12, align 4
store %"github.com/goplus/llgo/compiler/cl/_testrt/index.point" %13, ptr %0, align 4
%14 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %0, i32 0, i32 0
%15 = load i64, ptr %14, align 4
%16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/index.point", ptr %0, i32 0, i32 1
%17 = load i64, ptr %16, align 4
%18 = getelementptr inbounds %main.point, ptr %2, i32 0, i32 1
%19 = load i64, ptr %18, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%20 = alloca [2 x i64], align 8
call void @llvm.memset(ptr %20, i8 0, i64 16, i1 false)
%21 = alloca [2 x [2 x i64]], align 8
call void @llvm.memset(ptr %21, i8 0, i64 32, i1 false)
%22 = getelementptr inbounds [2 x i64], ptr %21, i64 0
%23 = getelementptr inbounds i64, ptr %22, i64 0
%24 = getelementptr inbounds i64, ptr %22, i64 1
%25 = getelementptr inbounds [2 x i64], ptr %21, i64 1
%26 = getelementptr inbounds i64, ptr %25, i64 0
%27 = getelementptr inbounds i64, ptr %25, i64 1
store i64 1, ptr %23, align 4
store i64 2, ptr %24, align 4
store i64 3, ptr %26, align 4
store i64 4, ptr %27, align 4
%28 = load [2 x [2 x i64]], ptr %21, align 4
%29 = getelementptr inbounds [2 x i64], ptr %21, i64 1
%30 = load [2 x i64], ptr %29, align 4
store [2 x i64] %30, ptr %20, align 4
%31 = getelementptr inbounds i64, ptr %20, i64 0
%18 = alloca [2 x i64], align 8
call void @llvm.memset(ptr %18, i8 0, i64 16, i1 false)
%19 = alloca [2 x [2 x i64]], align 8
call void @llvm.memset(ptr %19, i8 0, i64 32, i1 false)
%20 = getelementptr inbounds [2 x i64], ptr %19, i64 0
%21 = getelementptr inbounds i64, ptr %20, i64 0
%22 = getelementptr inbounds i64, ptr %20, i64 1
%23 = getelementptr inbounds [2 x i64], ptr %19, i64 1
%24 = getelementptr inbounds i64, ptr %23, i64 0
%25 = getelementptr inbounds i64, ptr %23, i64 1
store i64 1, ptr %21, align 4
store i64 2, ptr %22, align 4
store i64 3, ptr %24, align 4
store i64 4, ptr %25, align 4
%26 = load [2 x [2 x i64]], ptr %19, align 4
%27 = getelementptr inbounds [2 x i64], ptr %19, i64 1
%28 = load [2 x i64], ptr %27, align 4
store [2 x i64] %28, ptr %18, align 4
%29 = getelementptr inbounds i64, ptr %18, i64 0
%30 = load i64, ptr %29, align 4
%31 = getelementptr inbounds i64, ptr %18, i64 1
%32 = load i64, ptr %31, align 4
%33 = getelementptr inbounds i64, ptr %20, i64 1
%34 = load i64, ptr %33, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %30)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %34)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%35 = alloca [5 x i64], align 8
call void @llvm.memset(ptr %35, i8 0, i64 40, i1 false)
%36 = getelementptr inbounds i64, ptr %35, i64 0
%37 = getelementptr inbounds i64, ptr %35, i64 1
%38 = getelementptr inbounds i64, ptr %35, i64 2
%39 = getelementptr inbounds i64, ptr %35, i64 3
%40 = getelementptr inbounds i64, ptr %35, i64 4
store i64 1, ptr %36, align 4
store i64 2, ptr %37, align 4
store i64 3, ptr %38, align 4
store i64 4, ptr %39, align 4
store i64 5, ptr %40, align 4
%41 = load [5 x i64], ptr %35, align 4
%42 = getelementptr inbounds i64, ptr %35, i64 2
%43 = load i64, ptr %42, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %43)
%33 = alloca [5 x i64], align 8
call void @llvm.memset(ptr %33, i8 0, i64 40, i1 false)
%34 = getelementptr inbounds i64, ptr %33, i64 0
%35 = getelementptr inbounds i64, ptr %33, i64 1
%36 = getelementptr inbounds i64, ptr %33, i64 2
%37 = getelementptr inbounds i64, ptr %33, i64 3
%38 = getelementptr inbounds i64, ptr %33, i64 4
store i64 1, ptr %34, align 4
store i64 2, ptr %35, align 4
store i64 3, ptr %36, align 4
store i64 4, ptr %37, align 4
store i64 5, ptr %38, align 4
%39 = load [5 x i64], ptr %33, align 4
%40 = getelementptr inbounds i64, ptr %33, i64 2
%41 = load i64, ptr %40, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %41)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%44 = load i8, ptr getelementptr inbounds (i8, ptr @0, i64 2), align 1
%45 = sext i8 %44 to i32
%46 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %45)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %46)
%42 = load i8, ptr getelementptr inbounds (i8, ptr @0, i64 2), align 1
%43 = sext i8 %42 to i32
%44 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %43)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %44)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%47 = load i8, ptr getelementptr inbounds (i8, ptr @0, i64 1), align 1
%48 = sext i8 %47 to i32
%49 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %48)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %49)
%45 = load i8, ptr getelementptr inbounds (i8, ptr @0, i64 1), align 1
%46 = sext i8 %45 to i32
%47 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.StringFromRune"(i32 %46)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %47)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%50 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%51 = getelementptr inbounds i64, ptr %50, i64 0
%52 = getelementptr inbounds i64, ptr %50, i64 1
store i64 1, ptr %51, align 4
store i64 2, ptr %52, align 4
%53 = getelementptr inbounds i64, ptr %50, i64 1
%54 = load i64, ptr %53, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %54)
%48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%49 = getelementptr inbounds i64, ptr %48, i64 0
%50 = getelementptr inbounds i64, ptr %48, i64 1
store i64 1, ptr %49, align 4
store i64 2, ptr %50, align 4
%51 = getelementptr inbounds i64, ptr %48, i64 1
%52 = load i64, ptr %51, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %52)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%56 = getelementptr inbounds i64, ptr %55, i64 0
store i64 1, ptr %56, align 4
%57 = getelementptr inbounds i64, ptr %55, i64 1
store i64 2, ptr %57, align 4
%58 = getelementptr inbounds i64, ptr %55, i64 2
store i64 3, ptr %58, align 4
%59 = getelementptr inbounds i64, ptr %55, i64 3
store i64 4, ptr %59, align 4
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 4, 1
%62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, i64 4, 2
%63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, 0
%64 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62, 1
%65 = icmp sge i64 1, %64
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %65)
%66 = getelementptr inbounds i64, ptr %63, i64 1
%67 = load i64, ptr %66, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %67)
%53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%54 = getelementptr inbounds i64, ptr %53, i64 0
store i64 1, ptr %54, align 4
%55 = getelementptr inbounds i64, ptr %53, i64 1
store i64 2, ptr %55, align 4
%56 = getelementptr inbounds i64, ptr %53, i64 2
store i64 3, ptr %56, align 4
%57 = getelementptr inbounds i64, ptr %53, i64 3
store i64 4, ptr %57, align 4
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %53, 0
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, i64 4, 1
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 4, 2
%61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 0
%62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 1
%63 = icmp sge i64 1, %62
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %63)
%64 = getelementptr inbounds i64, ptr %61, i64 1
%65 = load i64, ptr %64, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %65)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 0)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0

View File

@@ -1,17 +1,15 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/intgen'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/intgen"
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%main.generator = type { i32 }
%"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator" = type { i32 }
@"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/intgen.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 %0, { ptr, ptr } %1) {
define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 %0, { ptr, ptr } %1) {
_llgo_0:
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.MakeSlice"(i64 %0, i64 %0, i64 4)
%3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1
@@ -41,123 +39,119 @@ _llgo_3: ; preds = %_llgo_1
ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2
}
define i32 @"main.(*generator).next"(ptr %0) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.(*generator).next"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %main.generator, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0
%2 = load i32, ptr %1, align 4
%3 = add i32 %2, 1
%4 = getelementptr inbounds %main.generator, ptr %0, i32 0, i32 0
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0
store i32 %3, ptr %4, align 4
%5 = getelementptr inbounds %main.generator, ptr %0, i32 0, i32 0
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0
%6 = load i32, ptr %5, align 4
ret i32 %6
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.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/_testrt/intgen.init$guard", align 1
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/intgen.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 %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 5, { ptr, ptr } { ptr @__llgo_stub.rand, ptr null })
%3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } { ptr @__llgo_stub.rand, ptr null })
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
br label %_llgo_1
_llgo_1: ; preds = %_llgo_2, %_llgo_0
%4 = phi i64 [ -1, %_llgo_0 ], [ %5, %_llgo_2 ]
%5 = add i64 %4, 1
%6 = icmp slt i64 %5, %3
br i1 %6, label %_llgo_2, label %_llgo_3
%2 = phi i64 [ -1, %_llgo_0 ], [ %3, %_llgo_2 ]
%3 = add i64 %2, 1
%4 = icmp slt i64 %3, %1
br i1 %4, label %_llgo_2, label %_llgo_3
_llgo_2: ; preds = %_llgo_1
%7 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 0
%8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1
%9 = icmp slt i64 %5, 0
%10 = icmp sge i64 %5, %8
%11 = or i1 %10, %9
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %11)
%12 = getelementptr inbounds i32, ptr %7, i64 %5
%13 = load i32, ptr %12, align 4
%14 = call i32 (ptr, ...) @printf(ptr @0, i32 %13)
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 0
%6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
%7 = icmp slt i64 %3, 0
%8 = icmp sge i64 %3, %6
%9 = or i1 %8, %7
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %9)
%10 = getelementptr inbounds i32, ptr %5, i64 %3
%11 = load i32, ptr %10, align 4
%12 = call i32 (ptr, ...) @printf(ptr @0, i32 %11)
br label %_llgo_1
_llgo_3: ; preds = %_llgo_1
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
store i32 1, ptr %15, align 4
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%17 = getelementptr inbounds { ptr }, ptr %16, i32 0, i32 0
store ptr %15, ptr %17, align 8
%18 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %16, 1
%19 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 5, { ptr, ptr } %18)
%20 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 1
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
store i32 1, ptr %13, align 4
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%15 = getelementptr inbounds { ptr }, ptr %14, i32 0, i32 0
store ptr %13, ptr %15, align 8
%16 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main$1", ptr undef }, ptr %14, 1
%17 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %16)
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 1
br label %_llgo_4
_llgo_4: ; preds = %_llgo_5, %_llgo_3
%21 = phi i64 [ -1, %_llgo_3 ], [ %22, %_llgo_5 ]
%22 = add i64 %21, 1
%23 = icmp slt i64 %22, %20
br i1 %23, label %_llgo_5, label %_llgo_6
%19 = phi i64 [ -1, %_llgo_3 ], [ %20, %_llgo_5 ]
%20 = add i64 %19, 1
%21 = icmp slt i64 %20, %18
br i1 %21, label %_llgo_5, label %_llgo_6
_llgo_5: ; preds = %_llgo_4
%24 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 0
%25 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 1
%26 = icmp slt i64 %22, 0
%27 = icmp sge i64 %22, %25
%28 = or i1 %27, %26
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %28)
%29 = getelementptr inbounds i32, ptr %24, i64 %22
%30 = load i32, ptr %29, align 4
%31 = call i32 (ptr, ...) @printf(ptr @1, i32 %30)
%22 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 0
%23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 1
%24 = icmp slt i64 %20, 0
%25 = icmp sge i64 %20, %23
%26 = or i1 %25, %24
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %26)
%27 = getelementptr inbounds i32, ptr %22, i64 %20
%28 = load i32, ptr %27, align 4
%29 = call i32 (ptr, ...) @printf(ptr @1, i32 %28)
br label %_llgo_4
_llgo_6: ; preds = %_llgo_4
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%33 = getelementptr inbounds %main.generator, ptr %32, i32 0, i32 0
store i32 1, ptr %33, align 4
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%35 = getelementptr inbounds { ptr }, ptr %34, i32 0, i32 0
store ptr %32, ptr %35, align 8
%36 = insertvalue { ptr, ptr } { ptr @"main.next$bound", ptr undef }, ptr %34, 1
%37 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 5, { ptr, ptr } %36)
%38 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, 1
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %30, i32 0, i32 0
store i32 1, ptr %31, align 4
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%33 = getelementptr inbounds { ptr }, ptr %32, i32 0, i32 0
store ptr %30, ptr %33, align 8
%34 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.next$bound", ptr undef }, ptr %32, 1
%35 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %34)
%36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 1
br label %_llgo_7
_llgo_7: ; preds = %_llgo_8, %_llgo_6
%39 = phi i64 [ -1, %_llgo_6 ], [ %40, %_llgo_8 ]
%40 = add i64 %39, 1
%41 = icmp slt i64 %40, %38
br i1 %41, label %_llgo_8, label %_llgo_9
%37 = phi i64 [ -1, %_llgo_6 ], [ %38, %_llgo_8 ]
%38 = add i64 %37, 1
%39 = icmp slt i64 %38, %36
br i1 %39, label %_llgo_8, label %_llgo_9
_llgo_8: ; preds = %_llgo_7
%42 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, 0
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, 1
%44 = icmp slt i64 %40, 0
%45 = icmp sge i64 %40, %43
%46 = or i1 %45, %44
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %46)
%47 = getelementptr inbounds i32, ptr %42, i64 %40
%48 = load i32, ptr %47, align 4
%49 = call i32 (ptr, ...) @printf(ptr @2, i32 %48)
%40 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 0
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 1
%42 = icmp slt i64 %38, 0
%43 = icmp sge i64 %38, %41
%44 = or i1 %43, %42
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %44)
%45 = getelementptr inbounds i32, ptr %40, i64 %38
%46 = load i32, ptr %45, align 4
%47 = call i32 (ptr, ...) @printf(ptr @2, i32 %46)
br label %_llgo_7
_llgo_9: ; preds = %_llgo_7
ret i32 0
ret void
}
define i32 @"main.main$1"(ptr %0) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main$1"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -174,8 +168,6 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/go
declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @rand()
define linkonce i32 @__llgo_stub.rand(ptr %0) {
@@ -190,10 +182,10 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
define i32 @"main.next$bound"(ptr %0) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.next$bound"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
%3 = call i32 @"main.(*generator).next"(ptr %2)
%3 = call i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.(*generator).next"(ptr %2)
ret i32 %3
}

View File

@@ -1,14 +1,12 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/len'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/len"
%main.data = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/compiler/cl/_testrt/len.data" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"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 }
@"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/len.init$guard" = global i1 false, align 1
@_llgo_int = linkonce global ptr null, align 8
@_llgo_string = linkonce global ptr null, align 8
@"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8
@@ -16,124 +14,118 @@ source_filename = "main"
@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/len", align 1
@5 = private unnamed_addr constant [5 x i8] c"hello", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/len.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/len.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/len.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/len.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/len.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 56)
%3 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 0
%4 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %3, align 8
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %4, 1
%6 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 1
%7 = load ptr, ptr %6, align 8
%8 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr %7)
%9 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 2
%10 = load ptr, ptr %9, align 8
%11 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.MapLen"(ptr %10)
%12 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 3
%13 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %12, align 8
%14 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13, 1
%15 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 1
%16 = load ptr, ptr %15, align 8
%17 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanCap"(ptr %16)
%18 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 3
%19 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %18, align 8
%20 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %5)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 56)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 0
%2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8
%3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %2, 1
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 1
%5 = load ptr, ptr %4, align 8
%6 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr %5)
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 2
%8 = load ptr, ptr %7, align 8
%9 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.MapLen"(ptr %8)
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 3
%11 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %10, align 8
%12 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11, 1
%13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 1
%14 = load ptr, ptr %13, align 8
%15 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanCap"(ptr %14)
%16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %0, i32 0, i32 3
%17 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %16, align 8
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %9)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %14)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %12)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %20)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %18)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 56)
%22 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 0
%23 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 1
%24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 2)
%25 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 2
%26 = load ptr, ptr @_llgo_int, align 8
%27 = load ptr, ptr @_llgo_string, align 8
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 56)
%20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 0
%21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 1
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 2)
%23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 2
%24 = load ptr, ptr @_llgo_int, align 8
%25 = load ptr, ptr @_llgo_string, align 8
%26 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
%27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %26, i64 1)
%28 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %28, i64 1)
%30 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 1, ptr %31, align 4
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %30, ptr %29, ptr %31)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %32, align 8
%33 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 3
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%35 = getelementptr inbounds i64, ptr %34, i64 0
store i64 1, ptr %35, align 4
%36 = getelementptr inbounds i64, ptr %34, i64 1
store i64 2, ptr %36, align 4
%37 = getelementptr inbounds i64, ptr %34, i64 2
store i64 3, ptr %37, align 4
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %34, 0
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, i64 3, 1
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 3, 2
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %22, align 8
store ptr %24, ptr %23, align 8
store ptr %29, ptr %25, align 8
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, ptr %33, align 8
%41 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 0
%42 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %41, align 8
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %42, 1
%44 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 1
%45 = load ptr, ptr %44, align 8
%46 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr %45)
%47 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 2
%48 = load ptr, ptr %47, align 8
%49 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.MapLen"(ptr %48)
%50 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 3
%51 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %50, align 8
%52 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %51, 1
%53 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 1
%54 = load ptr, ptr %53, align 8
%55 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanCap"(ptr %54)
%56 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 3
%57 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %56, align 8
%58 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %43)
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 1, ptr %29, align 4
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %28, ptr %27, ptr %29)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %30, align 8
%31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 3
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%33 = getelementptr inbounds i64, ptr %32, i64 0
store i64 1, ptr %33, align 4
%34 = getelementptr inbounds i64, ptr %32, i64 1
store i64 2, ptr %34, align 4
%35 = getelementptr inbounds i64, ptr %32, i64 2
store i64 3, ptr %35, align 4
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %32, 0
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 3, 1
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, i64 3, 2
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %20, align 8
store ptr %22, ptr %21, align 8
store ptr %27, ptr %23, align 8
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, ptr %31, align 8
%39 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 0
%40 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %39, align 8
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %40, 1
%42 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 1
%43 = load ptr, ptr %42, align 8
%44 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr %43)
%45 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 2
%46 = load ptr, ptr %45, align 8
%47 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.MapLen"(ptr %46)
%48 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 3
%49 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %48, align 8
%50 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, 1
%51 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 1
%52 = load ptr, ptr %51, align 8
%53 = call i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanCap"(ptr %52)
%54 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/len.data", ptr %19, i32 0, i32 3
%55 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %54, align 8
%56 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %41)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %46)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %44)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %49)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %47)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %52)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %50)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %55)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %53)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %58)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %56)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare i64 @"github.com/goplus/llgo/runtime/internal/runtime.ChanLen"(ptr)
@@ -148,7 +140,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64, i64)
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/len.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null
@@ -200,7 +192,7 @@ _llgo_5: ; preds = %_llgo_4
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 4, 1
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 4, 2
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28)
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 46 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28)
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %8, ptr %9, ptr %29, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %30)
store ptr %30, ptr @"map[_llgo_int]_llgo_string", align 8

View File

@@ -1,12 +1,10 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/linkname'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/linkname"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.m = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" }
%"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" }
@"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/linkname.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [2 x i8] c"a\00", align 1
@1 = private unnamed_addr constant [2 x i8] c"b\00", align 1
@2 = private unnamed_addr constant [2 x i8] c"c\00", align 1
@@ -17,15 +15,15 @@ source_filename = "main"
@7 = private unnamed_addr constant [2 x i8] c"4\00", align 1
@8 = private unnamed_addr constant [5 x i8] c"hello", align 1
declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info"(%main.m)
declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info"(%"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m")
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/linkname.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/_testrt/linkname.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.init"()
br label %_llgo_2
@@ -33,21 +31,17 @@ _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/linkname.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()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F"(ptr @0, ptr @1, ptr @2, ptr @3)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F"(ptr @4, ptr @5, ptr @6, ptr @7)
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.(*m).setInfo"(ptr %2, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 })
%3 = load %main.m, ptr %2, align 8
%4 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info"(%main.m %3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %4)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
call void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.(*m).setInfo"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 })
%1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m", ptr %0, align 8
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.m.info"(%"github.com/goplus/llgo/compiler/cl/_testrt/linkname.m" %1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %2)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.F"(ptr, ptr, ptr, ptr)
@@ -56,8 +50,6 @@ declare void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.(*
declare void @"github.com/goplus/llgo/compiler/cl/_testrt/linkname/linktarget.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")

View File

@@ -1,15 +1,13 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/makemap'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/makemap"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%main.N = type { i8, i8 }
%"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = type { i8, i8 }
%"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.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/makemap.init$guard" = global i1 false, align 1
@_llgo_int = linkonce global ptr null, align 8
@_llgo_string = linkonce global ptr null, align 8
@"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8
@@ -17,7 +15,7 @@ source_filename = "main"
@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 [50 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/makemap", align 1
@5 = private unnamed_addr constant [5 x i8] c"hello", align 1
@6 = private unnamed_addr constant [5 x i8] c"world", align 1
@7 = private unnamed_addr constant [4 x i8] c"llgo", align 1
@@ -28,61 +26,57 @@ source_filename = "main"
@11 = private unnamed_addr constant [7 x i8] c"bad len", align 1
@_llgo_any = linkonce global ptr null, align 8
@"map[_llgo_any]_llgo_int" = linkonce global ptr null, align 8
@_llgo_main.N1 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1" = linkonce global ptr null, align 8
@12 = private unnamed_addr constant [2 x i8] c"N1", align 1
@"[1]_llgo_int" = linkonce global ptr null, align 8
@13 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@_llgo_main.K = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K" = linkonce global ptr null, align 8
@14 = private unnamed_addr constant [1 x i8] c"K", align 1
@_llgo_main.N = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8
@15 = private unnamed_addr constant [1 x i8] c"N", align 1
@_llgo_int8 = linkonce global ptr null, align 8
@"main.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A" = linkonce global ptr null, align 8
@16 = private unnamed_addr constant [2 x i8] c"n1", align 1
@17 = private unnamed_addr constant [2 x i8] c"n2", align 1
@"[1]_llgo_main.N" = linkonce global ptr null, align 8
@_llgo_main.K2 = linkonce global ptr null, align 8
@"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2" = linkonce global ptr null, align 8
@18 = private unnamed_addr constant [2 x i8] c"K2", align 1
@"*_llgo_main.N" = linkonce global ptr null, align 8
@"[1]*_llgo_main.N" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8
@"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" = linkonce global ptr null, align 8
@"chan _llgo_int" = linkonce global ptr null, align 8
@19 = private unnamed_addr constant [4 x i8] c"chan", align 1
@"map[chan _llgo_int]_llgo_int" = linkonce global ptr null, align 8
@_llgo_main.M = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M" = linkonce global ptr null, align 8
@20 = private unnamed_addr constant [1 x i8] c"M", align 1
@"map[_llgo_main.N]_llgo_string" = linkonce global ptr null, align 8
@"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string" = linkonce global ptr null, align 8
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.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/makemap.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.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/makemap.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()
call void @main.make1()
call void @main.make2()
call void @main.make3()
call void @main.make4()
call void @main.make5()
call void @main.make6()
call void @main.make7()
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make1"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make2"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make3"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make4"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make5"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make6"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make7"()
ret void
}
define void @main.make1() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make1"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = load ptr, ptr @_llgo_string, align 8
@@ -278,7 +272,7 @@ _llgo_16: ; preds = %_llgo_15, %_llgo_14
br i1 %97, label %_llgo_5, label %_llgo_6
}
define void @main.make2() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make2"() {
_llgo_0:
%0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %0, i64 0)
@@ -310,7 +304,7 @@ _llgo_0:
%10 = getelementptr inbounds i64, ptr %9, i64 0
store i64 1, ptr %10, align 4
%11 = load [1 x i64], ptr %9, align 4
%12 = load ptr, ptr @_llgo_main.N1, align 8
%12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
%13 = extractvalue [1 x i64] %11, 0
%14 = inttoptr i64 %13 to ptr
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0
@@ -325,7 +319,7 @@ _llgo_0:
%21 = getelementptr inbounds i64, ptr %20, i64 0
store i64 2, ptr %21, align 4
%22 = load [1 x i64], ptr %20, align 4
%23 = load ptr, ptr @_llgo_main.N1, align 8
%23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
%24 = extractvalue [1 x i64] %22, 0
%25 = inttoptr i64 %24 to ptr
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %23, 0
@@ -340,7 +334,7 @@ _llgo_0:
%32 = getelementptr inbounds i64, ptr %31, i64 0
store i64 3, ptr %32, align 4
%33 = load [1 x i64], ptr %31, align 4
%34 = load ptr, ptr @_llgo_main.N1, align 8
%34 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
%35 = extractvalue [1 x i64] %33, 0
%36 = inttoptr i64 %35 to ptr
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %34, 0
@@ -355,7 +349,7 @@ _llgo_0:
%43 = getelementptr inbounds i64, ptr %42, i64 0
store i64 2, ptr %43, align 4
%44 = load [1 x i64], ptr %42, align 4
%45 = load ptr, ptr @_llgo_main.N1, align 8
%45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
%46 = extractvalue [1 x i64] %44, 0
%47 = inttoptr i64 %46 to ptr
%48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %45, 0
@@ -378,7 +372,7 @@ _llgo_2: ; preds = %_llgo_6
%57 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %68, 1
%58 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %68, 2
%59 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %57, 0
%60 = load ptr, ptr @_llgo_main.N1, align 8
%60 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
%61 = icmp eq ptr %59, %60
br i1 %61, label %_llgo_7, label %_llgo_8
@@ -421,32 +415,32 @@ _llgo_8: ; preds = %_llgo_2
unreachable
}
define void @main.make3() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make3"() {
_llgo_0:
%0 = alloca [1 x %main.N], align 8
%0 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8
call void @llvm.memset(ptr %0, i8 0, i64 2, i1 false)
%1 = getelementptr inbounds %main.N, ptr %0, i64 0
%2 = getelementptr inbounds %main.N, ptr %1, i32 0, i32 0
%3 = getelementptr inbounds %main.N, ptr %1, i32 0, i32 1
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %0, i64 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %1, i32 0, i32 0
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %1, i32 0, i32 1
store i8 1, ptr %2, align 1
store i8 2, ptr %3, align 1
%4 = load [1 x %main.N], ptr %0, align 1
%5 = load ptr, ptr @_llgo_main.K, align 8
%4 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %0, align 1
%5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2)
store [1 x %main.N] %4, ptr %6, align 1
store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %4, ptr %6, align 1
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %6, 1
%9 = alloca [1 x %main.N], align 8
%9 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8
call void @llvm.memset(ptr %9, i8 0, i64 2, i1 false)
%10 = getelementptr inbounds %main.N, ptr %9, i64 0
%11 = getelementptr inbounds %main.N, ptr %10, i32 0, i32 0
%12 = getelementptr inbounds %main.N, ptr %10, i32 0, i32 1
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %9, i64 0
%11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %10, i32 0, i32 0
%12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %10, i32 0, i32 1
store i8 1, ptr %11, align 1
store i8 2, ptr %12, align 1
%13 = load [1 x %main.N], ptr %9, align 1
%14 = load ptr, ptr @_llgo_main.K, align 8
%13 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %9, align 1
%14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2)
store [1 x %main.N] %13, ptr %15, align 1
store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %13, ptr %15, align 1
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %15, 1
%18 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %17)
@@ -454,17 +448,17 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%19 = load ptr, ptr @"map[_llgo_any]_llgo_int", align 8
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %19, i64 0)
%21 = alloca [1 x %main.N], align 8
%21 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8
call void @llvm.memset(ptr %21, i8 0, i64 2, i1 false)
%22 = getelementptr inbounds %main.N, ptr %21, i64 0
%23 = getelementptr inbounds %main.N, ptr %22, i32 0, i32 0
%24 = getelementptr inbounds %main.N, ptr %22, i32 0, i32 1
%22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %21, i64 0
%23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %22, i32 0, i32 0
%24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %22, i32 0, i32 1
store i8 1, ptr %23, align 1
store i8 2, ptr %24, align 1
%25 = load [1 x %main.N], ptr %21, align 1
%26 = load ptr, ptr @_llgo_main.K, align 8
%25 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %21, align 1
%26 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
%27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2)
store [1 x %main.N] %25, ptr %27, align 1
store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %25, ptr %27, align 1
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %26, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr %27, 1
%30 = load ptr, ptr @"map[_llgo_any]_llgo_int", align 8
@@ -472,17 +466,17 @@ _llgo_0:
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr %31, align 8
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %30, ptr %20, ptr %31)
store i64 100, ptr %32, align 4
%33 = alloca [1 x %main.N], align 8
%33 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8
call void @llvm.memset(ptr %33, i8 0, i64 2, i1 false)
%34 = getelementptr inbounds %main.N, ptr %33, i64 0
%35 = getelementptr inbounds %main.N, ptr %34, i32 0, i32 0
%36 = getelementptr inbounds %main.N, ptr %34, i32 0, i32 1
%34 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %33, i64 0
%35 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %34, i32 0, i32 0
%36 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %34, i32 0, i32 1
store i8 3, ptr %35, align 1
store i8 4, ptr %36, align 1
%37 = load [1 x %main.N], ptr %33, align 1
%38 = load ptr, ptr @_llgo_main.K, align 8
%37 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %33, align 1
%38 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 2)
store [1 x %main.N] %37, ptr %39, align 1
store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %37, ptr %39, align 1
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1
%42 = load ptr, ptr @"map[_llgo_any]_llgo_int", align 8
@@ -503,7 +497,7 @@ _llgo_2: ; preds = %_llgo_6
%49 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %60, 1
%50 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %60, 2
%51 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, 0
%52 = load ptr, ptr @_llgo_main.K, align 8
%52 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
%53 = icmp eq ptr %51, %52
br i1 %53, label %_llgo_7, label %_llgo_8
@@ -529,13 +523,13 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
_llgo_7: ; preds = %_llgo_2
%62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, 1
%63 = load [1 x %main.N], ptr %62, align 1
%64 = alloca [1 x %main.N], align 8
%63 = load [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], ptr %62, align 1
%64 = alloca [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"], align 8
call void @llvm.memset(ptr %64, i8 0, i64 2, i1 false)
store [1 x %main.N] %63, ptr %64, align 1
%65 = getelementptr inbounds %main.N, ptr %64, i64 0
%66 = load %main.N, ptr %65, align 1
%67 = extractvalue %main.N %66, 0
store [1 x %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N"] %63, ptr %64, align 1
%65 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %64, i64 0
%66 = load %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %65, align 1
%67 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N" %66, 0
%68 = sext i8 %67 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %68)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
@@ -553,19 +547,19 @@ _llgo_8: ; preds = %_llgo_2
unreachable
}
define void @main.make4() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make4"() {
_llgo_0:
%0 = alloca [1 x ptr], align 8
call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false)
%1 = getelementptr inbounds ptr, ptr %0, i64 0
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2)
%3 = getelementptr inbounds %main.N, ptr %2, i32 0, i32 0
%4 = getelementptr inbounds %main.N, ptr %2, i32 0, i32 1
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %2, i32 0, i32 0
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %2, i32 0, i32 1
store i8 1, ptr %3, align 1
store i8 2, ptr %4, align 1
store ptr %2, ptr %1, align 8
%5 = load [1 x ptr], ptr %0, align 8
%6 = load ptr, ptr @_llgo_main.K2, align 8
%6 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
%7 = extractvalue [1 x ptr] %5, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, ptr %7, 1
@@ -573,13 +567,13 @@ _llgo_0:
call void @llvm.memset(ptr %10, i8 0, i64 8, i1 false)
%11 = getelementptr inbounds ptr, ptr %10, i64 0
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2)
%13 = getelementptr inbounds %main.N, ptr %12, i32 0, i32 0
%14 = getelementptr inbounds %main.N, ptr %12, i32 0, i32 1
%13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %12, i32 0, i32 0
%14 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %12, i32 0, i32 1
store i8 1, ptr %13, align 1
store i8 2, ptr %14, align 1
store ptr %12, ptr %11, align 8
%15 = load [1 x ptr], ptr %10, align 8
%16 = load ptr, ptr @_llgo_main.K2, align 8
%16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
%17 = extractvalue [1 x ptr] %15, 0
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %16, 0
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr %17, 1
@@ -592,13 +586,13 @@ _llgo_0:
call void @llvm.memset(ptr %23, i8 0, i64 8, i1 false)
%24 = getelementptr inbounds ptr, ptr %23, i64 0
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2)
%26 = getelementptr inbounds %main.N, ptr %25, i32 0, i32 0
%27 = getelementptr inbounds %main.N, ptr %25, i32 0, i32 1
%26 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %25, i32 0, i32 0
%27 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %25, i32 0, i32 1
store i8 1, ptr %26, align 1
store i8 2, ptr %27, align 1
store ptr %25, ptr %24, align 8
%28 = load [1 x ptr], ptr %23, align 8
%29 = load ptr, ptr @_llgo_main.K2, align 8
%29 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
%30 = extractvalue [1 x ptr] %28, 0
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %29, 0
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr %30, 1
@@ -611,13 +605,13 @@ _llgo_0:
call void @llvm.memset(ptr %36, i8 0, i64 8, i1 false)
%37 = getelementptr inbounds ptr, ptr %36, i64 0
%38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 2)
%39 = getelementptr inbounds %main.N, ptr %38, i32 0, i32 0
%40 = getelementptr inbounds %main.N, ptr %38, i32 0, i32 1
%39 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %38, i32 0, i32 0
%40 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %38, i32 0, i32 1
store i8 3, ptr %39, align 1
store i8 4, ptr %40, align 1
store ptr %38, ptr %37, align 8
%41 = load [1 x ptr], ptr %36, align 8
%42 = load ptr, ptr @_llgo_main.K2, align 8
%42 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
%43 = extractvalue [1 x ptr] %41, 0
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1
@@ -639,7 +633,7 @@ _llgo_2: ; preds = %_llgo_6
%53 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %64, 1
%54 = extractvalue { i1, %"github.com/goplus/llgo/runtime/internal/runtime.eface", i64 } %64, 2
%55 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, 0
%56 = load ptr, ptr @_llgo_main.K2, align 8
%56 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
%57 = icmp eq ptr %55, %56
br i1 %57, label %_llgo_7, label %_llgo_8
@@ -665,7 +659,7 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
_llgo_7: ; preds = %_llgo_2
%66 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, 1
%67 = getelementptr inbounds %main.N, ptr %66, i32 0, i32 0
%67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", ptr %66, i32 0, i32 0
%68 = load i8, ptr %67, align 1
%69 = sext i8 %68 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %69)
@@ -684,7 +678,7 @@ _llgo_8: ; preds = %_llgo_2
unreachable
}
define void @main.make5() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make5"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 0)
%1 = load ptr, ptr @"chan _llgo_int", align 8
@@ -748,16 +742,16 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
br i1 %30, label %_llgo_2, label %_llgo_3
}
define void @main.make6() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make6"() {
_llgo_0:
%0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %0, i64 0)
%2 = load ptr, ptr @_llgo_main.M, align 8
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 1, ptr %3, align 4
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %2, ptr %1, ptr %3)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %4, align 8
%5 = load ptr, ptr @_llgo_main.M, align 8
%5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewMapIter"(ptr %5, ptr %1)
br label %_llgo_1
@@ -796,22 +790,22 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
br i1 %18, label %_llgo_2, label %_llgo_3
}
define void @main.make7() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.make7"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_main.N, align 8
%1 = load ptr, ptr @"map[_llgo_main.N]_llgo_string", align 8
%0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%1 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %1, i64 2)
%3 = load ptr, ptr @"map[_llgo_main.N]_llgo_string", align 8
%3 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 1, ptr %4, align 4
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %3, ptr %2, ptr %4)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 5 }, ptr %5, align 8
%6 = load ptr, ptr @"map[_llgo_main.N]_llgo_string", align 8
%6 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 2, ptr %7, align 4
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %6, ptr %2, ptr %7)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 5 }, ptr %8, align 8
%9 = load ptr, ptr @"map[_llgo_main.N]_llgo_string", align 8
%9 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewMapIter"(ptr %9, ptr %2)
br label %_llgo_1
@@ -830,7 +824,7 @@ _llgo_2: ; preds = %_llgo_6
br label %_llgo_1
_llgo_3: ; preds = %_llgo_6
%15 = load ptr, ptr @"map[_llgo_main.N]_llgo_string", align 8
%15 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
store i64 1, ptr %16, align 4
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess1"(ptr %15, ptr %2, ptr %16)
@@ -857,9 +851,7 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
br i1 %26, label %_llgo_2, label %_llgo_3
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null
@@ -911,7 +903,7 @@ _llgo_5: ; preds = %_llgo_4
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 4, 1
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 4, 2
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28)
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28)
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %8, ptr %9, ptr %29, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %30)
store ptr %30, ptr @"map[_llgo_int]_llgo_string", align 8
@@ -948,7 +940,7 @@ _llgo_7: ; preds = %_llgo_6
%51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %51, i64 4, 1
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, i64 4, 2
%54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53)
%54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53)
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %33, ptr %34, ptr %54, i64 12)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %55)
store ptr %55, ptr @"map[_llgo_string]_llgo_int", align 8
@@ -964,7 +956,7 @@ _llgo_9: ; preds = %_llgo_8
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %58, 0
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 0, 1
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 0, 2
%62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61)
%62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61)
store ptr %62, ptr @_llgo_any, align 8
br label %_llgo_10
@@ -978,7 +970,7 @@ _llgo_11: ; preds = %_llgo_10
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %65, 0
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 0, 1
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 0, 2
%69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68)
%69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68)
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %71)
@@ -987,7 +979,7 @@ _llgo_11: ; preds = %_llgo_10
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %74, 0
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 0, 1
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 0, 2
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77)
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77)
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %78)
%80 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, ptr %79, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
@@ -1007,20 +999,20 @@ _llgo_11: ; preds = %_llgo_10
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %86, 0
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i64 4, 1
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 4, 2
%94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93)
%94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93)
%95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %69, ptr %70, ptr %94, i64 24)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %95)
store ptr %95, ptr @"map[_llgo_any]_llgo_int", align 8
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_10
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 2 }, i64 17, i64 8, i64 0, i64 0)
%97 = load ptr, ptr @_llgo_main.N1, align 8
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 2 }, i64 17, i64 8, i64 0, i64 0)
%97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
%98 = icmp eq ptr %97, null
br i1 %98, label %_llgo_13, label %_llgo_14
_llgo_13: ; preds = %_llgo_12
store ptr %96, ptr @_llgo_main.N1, align 8
store ptr %96, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N1", align 8
br label %_llgo_14
_llgo_14: ; preds = %_llgo_13, %_llgo_12
@@ -1043,23 +1035,23 @@ _llgo_17: ; preds = %_llgo_16
br label %_llgo_18
_llgo_18: ; preds = %_llgo_17, %_llgo_16
%104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 1 }, i64 17, i64 2, i64 0, i64 0)
%105 = load ptr, ptr @_llgo_main.K, align 8
%104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 1 }, i64 17, i64 2, i64 0, i64 0)
%105 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
%106 = icmp eq ptr %105, null
br i1 %106, label %_llgo_19, label %_llgo_20
_llgo_19: ; preds = %_llgo_18
store ptr %104, ptr @_llgo_main.K, align 8
store ptr %104, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K", align 8
br label %_llgo_20
_llgo_20: ; preds = %_llgo_19, %_llgo_18
%107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%108 = load ptr, ptr @_llgo_main.N, align 8
%107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%108 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%109 = icmp eq ptr %108, null
br i1 %109, label %_llgo_21, label %_llgo_22
_llgo_21: ; preds = %_llgo_20
store ptr %107, ptr @_llgo_main.N, align 8
store ptr %107, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
br label %_llgo_22
_llgo_22: ; preds = %_llgo_21, %_llgo_20
@@ -1086,9 +1078,9 @@ _llgo_24: ; preds = %_llgo_23, %_llgo_22
%121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %118, 0
%122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %121, i64 2, 1
%123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, i64 2, 2
%124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 2, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123)
store ptr %124, ptr @"main.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8
%125 = load ptr, ptr @"main.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8
%124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 2, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123)
store ptr %124, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8
%125 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/makemap.struct$e65EDK9vxC36Nz3YTgO1ulssLlNH03Bva_WWaCjH-4A", align 8
br i1 %109, label %_llgo_25, label %_llgo_26
_llgo_25: ; preds = %_llgo_24
@@ -1096,19 +1088,19 @@ _llgo_25: ; preds = %_llgo_24
br label %_llgo_26
_llgo_26: ; preds = %_llgo_25, %_llgo_24
%126 = load ptr, ptr @_llgo_main.N, align 8
%127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%128 = load ptr, ptr @"[1]_llgo_main.N", align 8
%126 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%128 = load ptr, ptr @"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%129 = icmp eq ptr %128, null
br i1 %129, label %_llgo_27, label %_llgo_28
_llgo_27: ; preds = %_llgo_26
%130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 1, ptr %127)
store ptr %130, ptr @"[1]_llgo_main.N", align 8
store ptr %130, ptr @"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
br label %_llgo_28
_llgo_28: ; preds = %_llgo_27, %_llgo_26
%131 = load ptr, ptr @"[1]_llgo_main.N", align 8
%131 = load ptr, ptr @"[1]_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
br i1 %106, label %_llgo_29, label %_llgo_30
_llgo_29: ; preds = %_llgo_28
@@ -1116,32 +1108,32 @@ _llgo_29: ; preds = %_llgo_28
br label %_llgo_30
_llgo_30: ; preds = %_llgo_29, %_llgo_28
%132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 2 }, i64 17, i64 8, i64 0, i64 0)
%133 = load ptr, ptr @_llgo_main.K2, align 8
%132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 2 }, i64 17, i64 8, i64 0, i64 0)
%133 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
%134 = icmp eq ptr %133, null
br i1 %134, label %_llgo_31, label %_llgo_32
_llgo_31: ; preds = %_llgo_30
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %132)
store ptr %132, ptr @_llgo_main.K2, align 8
store ptr %132, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.K2", align 8
br label %_llgo_32
_llgo_32: ; preds = %_llgo_31, %_llgo_30
%135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%136 = load ptr, ptr @"*_llgo_main.N", align 8
%135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%136 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%137 = icmp eq ptr %136, null
br i1 %137, label %_llgo_33, label %_llgo_34
_llgo_33: ; preds = %_llgo_32
%138 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %135)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %138)
store ptr %138, ptr @"*_llgo_main.N", align 8
store ptr %138, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
br label %_llgo_34
_llgo_34: ; preds = %_llgo_33, %_llgo_32
%139 = load ptr, ptr @"*_llgo_main.N", align 8
%140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%141 = load ptr, ptr @"[1]*_llgo_main.N", align 8
%139 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%140 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 25, i64 2, i64 0, i64 0)
%141 = load ptr, ptr @"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
%142 = icmp eq ptr %141, null
br i1 %142, label %_llgo_35, label %_llgo_36
@@ -1149,11 +1141,11 @@ _llgo_35: ; preds = %_llgo_34
%143 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %140)
%144 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 1, ptr %143)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %144)
store ptr %144, ptr @"[1]*_llgo_main.N", align 8
store ptr %144, ptr @"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
br label %_llgo_36
_llgo_36: ; preds = %_llgo_35, %_llgo_34
%145 = load ptr, ptr @"[1]*_llgo_main.N", align 8
%145 = load ptr, ptr @"[1]*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N", align 8
br i1 %134, label %_llgo_37, label %_llgo_38
_llgo_37: ; preds = %_llgo_36
@@ -1205,21 +1197,21 @@ _llgo_41: ; preds = %_llgo_40
%172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %167, 0
%173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 4, 1
%174 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173, i64 4, 2
%175 = 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" %174)
%175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 144, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174)
%176 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %153, ptr %154, ptr %175, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %176)
store ptr %176, ptr @"map[chan _llgo_int]_llgo_int", align 8
br label %_llgo_42
_llgo_42: ; preds = %_llgo_41, %_llgo_40
%177 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 1 }, i64 21, i64 8, i64 0, i64 0)
%178 = load ptr, ptr @_llgo_main.M, align 8
%177 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 1 }, i64 21, i64 8, i64 0, i64 0)
%178 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8
%179 = icmp eq ptr %178, null
br i1 %179, label %_llgo_43, label %_llgo_44
_llgo_43: ; preds = %_llgo_42
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %177)
store ptr %177, ptr @_llgo_main.M, align 8
store ptr %177, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.M", align 8
br label %_llgo_44
_llgo_44: ; preds = %_llgo_43, %_llgo_42
@@ -1231,9 +1223,9 @@ _llgo_45: ; preds = %_llgo_44
br label %_llgo_46
_llgo_46: ; preds = %_llgo_45, %_llgo_44
%181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0)
%182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0)
%183 = load ptr, ptr @"map[_llgo_main.N]_llgo_string", align 8
%181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0)
%182 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 1 }, i64 2, i64 8, i64 0, i64 0)
%183 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
%184 = icmp eq ptr %183, null
br i1 %184, label %_llgo_47, label %_llgo_48
@@ -1261,10 +1253,10 @@ _llgo_47: ; preds = %_llgo_46
%201 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %196, 0
%202 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %201, i64 4, 1
%203 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %202, i64 4, 2
%204 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %203)
%204 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %203)
%205 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %181, ptr %185, ptr %204, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %205)
store ptr %205, ptr @"map[_llgo_main.N]_llgo_string", align 8
store ptr %205, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/makemap.N]_llgo_string", align 8
br label %_llgo_48
_llgo_48: ; preds = %_llgo_47, %_llgo_46

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

View File

@@ -1,71 +1,65 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/mask'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/mask"
@"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/mask.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/mask.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/mask.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/_testrt/mask.init$guard", align 1
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/mask.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 i32 @main.mask(i8 1)
%3 = sext i32 %2 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
%0 = call i32 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask"(i8 1)
%1 = sext i32 %0 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%4 = call i64 @main.mask_shl(i64 127, i64 5)
%2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl"(i64 127, i64 5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %2)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%3 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 127, i64 5)
%4 = sext i8 %3 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%5 = call i8 @main.mask_shl8(i8 127, i64 5)
%6 = sext i8 %5 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %6)
%5 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 127, i64 5)
%6 = zext i8 %5 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%7 = call i8 @main.mask_shl8u(i8 127, i64 5)
%8 = zext i8 %7 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %8)
%7 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 127, i64 16)
%8 = sext i8 %7 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%9 = call i8 @main.mask_shl8(i8 127, i64 16)
%10 = sext i8 %9 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %10)
%9 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 127, i64 16)
%10 = zext i8 %9 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%11 = call i8 @main.mask_shl8u(i8 127, i64 16)
%12 = zext i8 %11 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %12)
%11 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr"(i64 127, i64 5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%13 = call i64 @main.mask_shr(i64 127, i64 5)
%12 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 127, i64 5)
%13 = sext i8 %12 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %13)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%14 = call i8 @main.mask_shr8(i8 127, i64 5)
%15 = sext i8 %14 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
%14 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8u"(i8 127, i64 5)
%15 = zext i8 %14 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%16 = call i8 @main.mask_shr8u(i8 127, i64 5)
%17 = zext i8 %16 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %17)
%16 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 127, i64 16)
%17 = sext i8 %16 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%18 = call i8 @main.mask_shr8(i8 127, i64 16)
%19 = sext i8 %18 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
define i32 @main.mask(i8 %0) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask"(i8 %0) {
_llgo_0:
%1 = sext i8 %0 to i32
%2 = shl i32 %1, 31
@@ -74,7 +68,7 @@ _llgo_0:
ret i32 %4
}
define i64 @main.mask_shl(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl"(i64 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -84,7 +78,7 @@ _llgo_0:
ret i64 %5
}
define i8 @main.mask_shl8(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -95,7 +89,7 @@ _llgo_0:
ret i8 %6
}
define i8 @main.mask_shl8u(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -106,7 +100,7 @@ _llgo_0:
ret i8 %6
}
define i64 @main.mask_shr(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr"(i64 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -116,7 +110,7 @@ _llgo_0:
ret i64 %5
}
define i8 @main.mask_shr8(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -127,7 +121,7 @@ _llgo_0:
ret i8 %6
}
define i8 @main.mask_shr8u(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8u"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -138,8 +132,6 @@ _llgo_0:
ret i8 %6
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,136 +1,128 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/named'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/named"
%main.mspan = type { ptr, ptr, ptr, %main.minfo, i64, { ptr, ptr } }
%main.minfo = type { ptr, i64 }
%main.mSpanList = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan" = type { ptr, ptr, ptr, %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", i64, { ptr, ptr } }
%"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo" = type { ptr, i64 }
%"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList" = type { ptr, ptr }
@"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/named.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [19 x i8] c"%d %d %d %d %d %d\0A\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/named.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/named.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/_testrt/named.init$guard", align 1
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/named.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64)
store ptr %3, ptr %2, align 8
%4 = load ptr, ptr %2, align 8
%5 = getelementptr inbounds %main.mspan, ptr %4, i32 0, i32 4
store i64 100, ptr %5, align 4
%6 = load ptr, ptr %2, align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64)
%8 = getelementptr inbounds %main.mspan, ptr %6, i32 0, i32 0
store ptr %7, ptr %8, align 8
%9 = load ptr, ptr %2, align 8
%10 = getelementptr inbounds %main.mspan, ptr %9, i32 0, i32 0
%11 = load ptr, ptr %10, align 8
%12 = getelementptr inbounds %main.mspan, ptr %11, i32 0, i32 4
store i64 200, ptr %12, align 4
%13 = load ptr, ptr %2, align 8
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%15 = getelementptr inbounds %main.mspan, ptr %13, i32 0, i32 2
store ptr %14, ptr %15, align 8
%16 = load ptr, ptr %2, align 8
%17 = getelementptr inbounds %main.mspan, ptr %16, i32 0, i32 2
%18 = load ptr, ptr %17, align 8
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64)
%20 = getelementptr inbounds %main.mSpanList, ptr %18, i32 0, i32 1
store ptr %19, ptr %20, align 8
%21 = load ptr, ptr %2, align 8
%22 = getelementptr inbounds %main.mspan, ptr %21, i32 0, i32 2
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64)
store ptr %1, ptr %0, align 8
%2 = load ptr, ptr %0, align 8
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %2, i32 0, i32 4
store i64 100, ptr %3, align 4
%4 = load ptr, ptr %0, align 8
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64)
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %4, i32 0, i32 0
store ptr %5, ptr %6, align 8
%7 = load ptr, ptr %0, align 8
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %7, i32 0, i32 0
%9 = load ptr, ptr %8, align 8
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %9, i32 0, i32 4
store i64 200, ptr %10, align 4
%11 = load ptr, ptr %0, align 8
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %11, i32 0, i32 2
store ptr %12, ptr %13, align 8
%14 = load ptr, ptr %0, align 8
%15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %14, i32 0, i32 2
%16 = load ptr, ptr %15, align 8
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 64)
%18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList", ptr %16, i32 0, i32 1
store ptr %17, ptr %18, align 8
%19 = load ptr, ptr %0, align 8
%20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %19, i32 0, i32 2
%21 = load ptr, ptr %20, align 8
%22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList", ptr %21, i32 0, i32 1
%23 = load ptr, ptr %22, align 8
%24 = getelementptr inbounds %main.mSpanList, ptr %23, i32 0, i32 1
%25 = load ptr, ptr %24, align 8
%26 = getelementptr inbounds %main.mspan, ptr %25, i32 0, i32 4
store i64 300, ptr %26, align 4
%27 = load ptr, ptr %2, align 8
%28 = getelementptr inbounds %main.mspan, ptr %27, i32 0, i32 3
%29 = getelementptr inbounds %main.minfo, ptr %28, i32 0, i32 1
store i64 10, ptr %29, align 4
%30 = load ptr, ptr %2, align 8
%31 = getelementptr inbounds %main.mspan, ptr %30, i32 0, i32 3
%32 = load ptr, ptr %2, align 8
%33 = getelementptr inbounds %main.minfo, ptr %31, i32 0, i32 0
store ptr %32, ptr %33, align 8
%34 = load ptr, ptr %2, align 8
%35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%36 = getelementptr inbounds { ptr }, ptr %35, i32 0, i32 0
store ptr %2, ptr %36, align 8
%37 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %35, 1
%38 = getelementptr inbounds %main.mspan, ptr %34, i32 0, i32 5
store { ptr, ptr } %37, ptr %38, align 8
%39 = load ptr, ptr %2, align 8
%40 = getelementptr inbounds %main.mspan, ptr %39, i32 0, i32 0
%41 = load ptr, ptr %40, align 8
%42 = getelementptr inbounds %main.mspan, ptr %41, i32 0, i32 4
%43 = load i64, ptr %42, align 4
%44 = load ptr, ptr %2, align 8
%45 = getelementptr inbounds %main.mspan, ptr %44, i32 0, i32 2
%24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %23, i32 0, i32 4
store i64 300, ptr %24, align 4
%25 = load ptr, ptr %0, align 8
%26 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %25, i32 0, i32 3
%27 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %26, i32 0, i32 1
store i64 10, ptr %27, align 4
%28 = load ptr, ptr %0, align 8
%29 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %28, i32 0, i32 3
%30 = load ptr, ptr %0, align 8
%31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %29, i32 0, i32 0
store ptr %30, ptr %31, align 8
%32 = load ptr, ptr %0, align 8
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%34 = getelementptr inbounds { ptr }, ptr %33, i32 0, i32 0
store ptr %0, ptr %34, align 8
%35 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/named.main$1", ptr undef }, ptr %33, 1
%36 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %32, i32 0, i32 5
store { ptr, ptr } %35, ptr %36, align 8
%37 = load ptr, ptr %0, align 8
%38 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %37, i32 0, i32 0
%39 = load ptr, ptr %38, align 8
%40 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %39, i32 0, i32 4
%41 = load i64, ptr %40, align 4
%42 = load ptr, ptr %0, align 8
%43 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %42, i32 0, i32 2
%44 = load ptr, ptr %43, align 8
%45 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mSpanList", ptr %44, i32 0, i32 1
%46 = load ptr, ptr %45, align 8
%47 = getelementptr inbounds %main.mSpanList, ptr %46, i32 0, i32 1
%48 = load ptr, ptr %47, align 8
%49 = getelementptr inbounds %main.mspan, ptr %48, i32 0, i32 4
%50 = load i64, ptr %49, align 4
%51 = load ptr, ptr %2, align 8
%52 = getelementptr inbounds %main.mspan, ptr %51, i32 0, i32 3
%53 = getelementptr inbounds %main.minfo, ptr %52, i32 0, i32 1
%54 = load i64, ptr %53, align 4
%55 = load ptr, ptr %2, align 8
%56 = getelementptr inbounds %main.mspan, ptr %55, i32 0, i32 3
%57 = getelementptr inbounds %main.minfo, ptr %56, i32 0, i32 0
%58 = load ptr, ptr %57, align 8
%59 = getelementptr inbounds %main.mspan, ptr %58, i32 0, i32 4
%60 = load i64, ptr %59, align 4
%61 = load ptr, ptr %2, align 8
%62 = getelementptr inbounds %main.mspan, ptr %61, i32 0, i32 5
%63 = load { ptr, ptr }, ptr %62, align 8
%64 = extractvalue { ptr, ptr } %63, 1
%65 = extractvalue { ptr, ptr } %63, 0
%66 = call i64 %65(ptr %64, i64 -2)
%67 = load ptr, ptr %2, align 8
%68 = getelementptr inbounds %main.mspan, ptr %67, i32 0, i32 3
%69 = getelementptr inbounds %main.minfo, ptr %68, i32 0, i32 0
%70 = load ptr, ptr %69, align 8
%71 = getelementptr inbounds %main.mspan, ptr %70, i32 0, i32 5
%72 = load { ptr, ptr }, ptr %71, align 8
%73 = extractvalue { ptr, ptr } %72, 1
%74 = extractvalue { ptr, ptr } %72, 0
%75 = call i64 %74(ptr %73, i64 -3)
%76 = call i32 (ptr, ...) @printf(ptr @0, i64 %43, i64 %50, i64 %54, i64 %60, i64 %66, i64 %75)
ret i32 0
%47 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %46, i32 0, i32 4
%48 = load i64, ptr %47, align 4
%49 = load ptr, ptr %0, align 8
%50 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %49, i32 0, i32 3
%51 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %50, i32 0, i32 1
%52 = load i64, ptr %51, align 4
%53 = load ptr, ptr %0, align 8
%54 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %53, i32 0, i32 3
%55 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %54, i32 0, i32 0
%56 = load ptr, ptr %55, align 8
%57 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %56, i32 0, i32 4
%58 = load i64, ptr %57, align 4
%59 = load ptr, ptr %0, align 8
%60 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %59, i32 0, i32 5
%61 = load { ptr, ptr }, ptr %60, align 8
%62 = extractvalue { ptr, ptr } %61, 1
%63 = extractvalue { ptr, ptr } %61, 0
%64 = call i64 %63(ptr %62, i64 -2)
%65 = load ptr, ptr %0, align 8
%66 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %65, i32 0, i32 3
%67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.minfo", ptr %66, i32 0, i32 0
%68 = load ptr, ptr %67, align 8
%69 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %68, i32 0, i32 5
%70 = load { ptr, ptr }, ptr %69, align 8
%71 = extractvalue { ptr, ptr } %70, 1
%72 = extractvalue { ptr, ptr } %70, 0
%73 = call i64 %72(ptr %71, i64 -3)
%74 = call i32 (ptr, ...) @printf(ptr @0, i64 %41, i64 %48, i64 %52, i64 %58, i64 %64, i64 %73)
ret void
}
define i64 @"main.main$1"(ptr %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/named.main$1"(ptr %0, i64 %1) {
_llgo_0:
%2 = load { ptr }, ptr %0, align 8
%3 = extractvalue { ptr } %2, 0
%4 = load ptr, ptr %3, align 8
%5 = getelementptr inbounds %main.mspan, ptr %4, i32 0, i32 4
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/named.mspan", ptr %4, i32 0, i32 4
%6 = load i64, ptr %5, align 4
%7 = mul i64 %6, %1
ret i64 %7
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)

View File

@@ -1,97 +1,89 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/namedslice'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/namedslice"
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@"main.init$guard" = global i1 false, align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@_llgo_main.MyBytes = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [53 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/namedslice", align 1
@1 = private unnamed_addr constant [7 x i8] c"MyBytes", align 1
@_llgo_byte = linkonce global ptr null, align 8
@"[]_llgo_byte" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [9 x i8] c"bad slice", align 1
@_llgo_string = linkonce global ptr null, align 8
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.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/namedslice.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.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/namedslice.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, i64 0, 1
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4, i64 0, 2
%6 = load ptr, ptr @_llgo_main.MyBytes, align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, ptr %7, align 8
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, ptr %7, 1
%10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, 0
%11 = load ptr, ptr @_llgo_main.MyBytes, align 8
%12 = icmp eq ptr %10, %11
br i1 %12, label %_llgo_3, label %_llgo_4
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
%1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, i64 0, 1
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, i64 0, 2
%4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, ptr %5, align 8
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1
%8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 0
%9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8
%10 = icmp eq ptr %8, %9
br i1 %10, label %_llgo_3, label %_llgo_4
_llgo_1: ; preds = %_llgo_5
%13 = load ptr, ptr @_llgo_string, align 8
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 9 }, ptr %14, align 8
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %13, 0
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, ptr %14, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %16)
%11 = load ptr, ptr @_llgo_string, align 8
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 9 }, ptr %12, align 8
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %11, 0
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, ptr %12, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14)
unreachable
_llgo_2: ; preds = %_llgo_5
ret i32 0
ret void
_llgo_3: ; preds = %_llgo_0
%17 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, 1
%18 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %17, align 8
%19 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, 0
%20 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } %19, i1 true, 1
%15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 1
%16 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %15, align 8
%17 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, 0
%18 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } %17, i1 true, 1
br label %_llgo_5
_llgo_4: ; preds = %_llgo_0
br label %_llgo_5
_llgo_5: ; preds = %_llgo_4, %_llgo_3
%21 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } [ %20, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%22 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } %21, 0
%23 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } %21, 1
br i1 %23, label %_llgo_2, label %_llgo_1
%19 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } [ %18, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%20 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } %19, 0
%21 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.Slice", i1 } %19, 1
br i1 %21, label %_llgo_2, label %_llgo_1
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/namedslice.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 }, i64 23, i64 24, i64 0, i64 0)
%1 = load ptr, ptr @_llgo_main.MyBytes, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 53 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 7 }, i64 23, i64 24, i64 0, i64 0)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
store ptr %0, ptr @_llgo_main.MyBytes, align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/namedslice.MyBytes", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0

View File

@@ -1,47 +1,39 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/panic'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/panic"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@"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/panic.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [13 x i8] c"panic message", align 1
@_llgo_string = linkonce global ptr null, align 8
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/panic.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/panic.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.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/panic.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_string, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 13 }, ptr %3, align 8
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr %3, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5)
%0 = load ptr, ptr @_llgo_string, align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 13 }, ptr %1, align 8
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3)
unreachable
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/panic.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_string, align 8
%1 = icmp eq ptr %0, null

View File

@@ -1,67 +1,61 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/qsort'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/qsort"
@"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/qsort.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.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/_testrt/qsort.init$guard", align 1
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/qsort.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
%3 = getelementptr inbounds i64, ptr %2, i64 0
%4 = getelementptr inbounds i64, ptr %2, i64 1
%5 = getelementptr inbounds i64, ptr %2, i64 2
%6 = getelementptr inbounds i64, ptr %2, i64 3
%7 = getelementptr inbounds i64, ptr %2, i64 4
store i64 100, ptr %3, align 4
store i64 8, ptr %4, align 4
store i64 23, ptr %5, align 4
store i64 2, ptr %6, align 4
store i64 7, ptr %7, align 4
%8 = getelementptr inbounds i64, ptr %2, i64 0
call void @qsort(ptr %8, i64 5, i64 8, ptr @"main.main$1")
%9 = load [5 x i64], ptr %2, align 4
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
%1 = getelementptr inbounds i64, ptr %0, i64 0
%2 = getelementptr inbounds i64, ptr %0, i64 1
%3 = getelementptr inbounds i64, ptr %0, i64 2
%4 = getelementptr inbounds i64, ptr %0, i64 3
%5 = getelementptr inbounds i64, ptr %0, i64 4
store i64 100, ptr %1, align 4
store i64 8, ptr %2, align 4
store i64 23, ptr %3, align 4
store i64 2, ptr %4, align 4
store i64 7, ptr %5, align 4
%6 = getelementptr inbounds i64, ptr %0, i64 0
call void @qsort(ptr %6, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.main$1")
%7 = load [5 x i64], ptr %0, align 4
br label %_llgo_1
_llgo_1: ; preds = %_llgo_2, %_llgo_0
%10 = phi i64 [ -1, %_llgo_0 ], [ %11, %_llgo_2 ]
%11 = add i64 %10, 1
%12 = icmp slt i64 %11, 5
br i1 %12, label %_llgo_2, label %_llgo_3
%8 = phi i64 [ -1, %_llgo_0 ], [ %9, %_llgo_2 ]
%9 = add i64 %8, 1
%10 = icmp slt i64 %9, 5
br i1 %10, label %_llgo_2, label %_llgo_3
_llgo_2: ; preds = %_llgo_1
%13 = icmp slt i64 %11, 0
%14 = icmp sge i64 %11, 5
%15 = or i1 %14, %13
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %15)
%16 = getelementptr inbounds i64, ptr %2, i64 %11
%17 = load i64, ptr %16, align 4
%18 = call i32 (ptr, ...) @printf(ptr @0, i64 %17)
%11 = icmp slt i64 %9, 0
%12 = icmp sge i64 %9, 5
%13 = or i1 %12, %11
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %13)
%14 = getelementptr inbounds i64, ptr %0, i64 %9
%15 = load i64, ptr %14, align 4
%16 = call i32 (ptr, ...) @printf(ptr @0, i64 %15)
br label %_llgo_1
_llgo_3: ; preds = %_llgo_1
ret i32 0
ret void
}
define i32 @"main.main$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsort.main$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -70,8 +64,6 @@ _llgo_0:
ret i32 %5
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @qsort(ptr, i64, i64, ptr)

View File

@@ -1,9 +1,7 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/qsortfn'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/qsortfn"
@"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/qsortfn.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [14 x i8] c"Comp => Comp\0A\00", align 1
@1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@2 = private unnamed_addr constant [12 x i8] c"fn => Comp\0A\00", align 1
@@ -25,39 +23,35 @@ source_filename = "main"
@18 = private unnamed_addr constant [22 x i8] c"Comp => qsort.Comp()\0A\00", align 1
@19 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.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/_testrt/qsortfn.init$guard", align 1
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/qsortfn.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()
call void @main.sort1a()
call void @main.sort1b()
call void @main.sort2a()
call void @main.sort2b()
call void @main.sort3a()
call void @main.sort3b()
call void @main.sort4a()
call void @main.sort4b()
call void @main.sort5a()
call void @main.sort5b()
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a"()
call void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b"()
ret void
}
define void @main.sort1a() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @0)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -72,7 +66,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort1a$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -96,7 +90,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort1a$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1a$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -105,7 +99,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort1b() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @2)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -120,7 +114,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort1b$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -144,7 +138,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort1b$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort1b$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -153,7 +147,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort2a() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @4)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -168,7 +162,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort2a$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -192,7 +186,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort2a$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2a$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -201,7 +195,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort2b() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @6)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -216,7 +210,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort2b$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -240,7 +234,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort2b$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort2b$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -249,7 +243,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort3a() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @8)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -264,7 +258,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort3a$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -288,7 +282,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort3a$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3a$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -297,7 +291,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort3b() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @10)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -312,7 +306,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort3b$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -336,7 +330,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort3b$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort3b$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -345,7 +339,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort4a() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @12)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -360,7 +354,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort4a$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -384,7 +378,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort4a$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4a$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -393,7 +387,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort4b() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @14)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -408,7 +402,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort4b$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -432,7 +426,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort4b$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort4b$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -441,7 +435,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort5a() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @16)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -456,7 +450,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort5a$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -480,7 +474,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort5a$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5a$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -489,7 +483,7 @@ _llgo_0:
ret i32 %5
}
define void @main.sort5b() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b"() {
_llgo_0:
%0 = call i32 (ptr, ...) @printf(ptr @18)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
@@ -504,7 +498,7 @@ _llgo_0:
store i64 2, ptr %5, align 4
store i64 7, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %1, i64 0
call void @qsort(ptr %7, i64 5, i64 8, ptr @"main.sort5b$1")
call void @qsort(ptr %7, i64 5, i64 8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b$1")
%8 = load [5 x i64], ptr %1, align 4
br label %_llgo_1
@@ -528,7 +522,7 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define i32 @"main.sort5b$1"(ptr %0, ptr %1) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/qsortfn.sort5b$1"(ptr %0, ptr %1) {
_llgo_0:
%2 = load i64, ptr %0, align 4
%3 = load i64, ptr %1, align 4
@@ -537,8 +531,6 @@ _llgo_0:
ret i32 %5
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)

View File

@@ -1,104 +1,96 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/result'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/result"
@"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/result.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
define { ptr, ptr } @main.add() {
define { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add"() {
_llgo_0:
ret { ptr, ptr } { ptr @"__llgo_stub.main.add$1", ptr null }
ret { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add$1", ptr null }
}
define i64 @"main.add$1"(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define { { ptr, ptr }, i64 } @main.add2() {
define { { ptr, ptr }, i64 } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2"() {
_llgo_0:
ret { { ptr, ptr }, i64 } { { ptr, ptr } { ptr @"__llgo_stub.main.add2$1", ptr null }, i64 1 }
ret { { ptr, ptr }, i64 } { { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1", ptr null }, i64 1 }
}
define i64 @"main.add2$1"(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/result.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/result.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/_testrt/result.init$guard", align 1
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/result.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 { ptr, ptr } @"main.main$1"()
%3 = extractvalue { ptr, ptr } %2, 1
%4 = extractvalue { ptr, ptr } %2, 0
%5 = call i64 %4(ptr %3, i64 100, i64 200)
%6 = call i32 (ptr, ...) @printf(ptr @0, i64 %5)
%7 = call { ptr, ptr } @main.add()
%8 = extractvalue { ptr, ptr } %7, 1
%9 = extractvalue { ptr, ptr } %7, 0
%10 = call i64 %9(ptr %8, i64 100, i64 200)
%11 = call i32 (ptr, ...) @printf(ptr @1, i64 %10)
%12 = call { { ptr, ptr }, i64 } @main.add2()
%13 = extractvalue { { ptr, ptr }, i64 } %12, 0
%14 = extractvalue { { ptr, ptr }, i64 } %12, 1
%15 = call { ptr, ptr } @main.add()
%16 = extractvalue { ptr, ptr } %15, 1
%17 = extractvalue { ptr, ptr } %15, 0
%18 = call i64 %17(ptr %16, i64 100, i64 200)
%19 = call i32 (ptr, ...) @printf(ptr @2, i64 %18, i64 %14)
ret i32 0
%0 = call { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1"()
%1 = extractvalue { ptr, ptr } %0, 1
%2 = extractvalue { ptr, ptr } %0, 0
%3 = call i64 %2(ptr %1, i64 100, i64 200)
%4 = call i32 (ptr, ...) @printf(ptr @0, i64 %3)
%5 = call { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add"()
%6 = extractvalue { ptr, ptr } %5, 1
%7 = extractvalue { ptr, ptr } %5, 0
%8 = call i64 %7(ptr %6, i64 100, i64 200)
%9 = call i32 (ptr, ...) @printf(ptr @1, i64 %8)
%10 = call { { ptr, ptr }, i64 } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2"()
%11 = extractvalue { { ptr, ptr }, i64 } %10, 0
%12 = extractvalue { { ptr, ptr }, i64 } %10, 1
%13 = call { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.add"()
%14 = extractvalue { ptr, ptr } %13, 1
%15 = extractvalue { ptr, ptr } %13, 0
%16 = call i64 %15(ptr %14, i64 100, i64 200)
%17 = call i32 (ptr, ...) @printf(ptr @2, i64 %16, i64 %12)
ret void
}
define { ptr, ptr } @"main.main$1"() {
define { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1"() {
_llgo_0:
ret { ptr, ptr } { ptr @"__llgo_stub.main.main$1$1", ptr null }
ret { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1", ptr null }
}
define i64 @"main.main$1$1"(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define linkonce i64 @"__llgo_stub.main.add$1"(ptr %0, i64 %1, i64 %2) {
define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add$1"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = tail call i64 @"main.add$1"(i64 %1, i64 %2)
%3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add$1"(i64 %1, i64 %2)
ret i64 %3
}
define linkonce i64 @"__llgo_stub.main.add2$1"(ptr %0, i64 %1, i64 %2) {
define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = tail call i64 @"main.add2$1"(i64 %1, i64 %2)
%3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.add2$1"(i64 %1, i64 %2)
ret i64 %3
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)
define linkonce i64 @"__llgo_stub.main.main$1$1"(ptr %0, i64 %1, i64 %2) {
define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1"(ptr %0, i64 %1, i64 %2) {
_llgo_0:
%3 = tail call i64 @"main.main$1$1"(i64 %1, i64 %2)
%3 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/result.main$1$1"(i64 %1, i64 %2)
ret i64 %3
}

View File

@@ -1,111 +1,103 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/slice2array'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/slice2array"
%"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/slice2array.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/slice2array.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/_testrt/slice2array.init$guard", align 1
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/slice2array.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%3 = getelementptr inbounds i8, ptr %2, i64 0
%4 = getelementptr inbounds i8, ptr %2, i64 1
%5 = getelementptr inbounds i8, ptr %2, i64 2
%6 = getelementptr inbounds i8, ptr %2, i64 3
store i8 1, ptr %3, align 1
store i8 2, ptr %4, align 1
store i8 3, ptr %5, align 1
store i8 4, ptr %6, align 1
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 4, 1
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 4, 2
%10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1
%11 = icmp slt i64 %10, 4
br i1 %11, label %_llgo_1, label %_llgo_2
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%1 = getelementptr inbounds i8, ptr %0, i64 0
%2 = getelementptr inbounds i8, ptr %0, i64 1
%3 = getelementptr inbounds i8, ptr %0, i64 2
%4 = getelementptr inbounds i8, ptr %0, i64 3
store i8 1, ptr %1, align 1
store i8 2, ptr %2, align 1
store i8 3, ptr %3, align 1
store i8 4, ptr %4, align 1
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 4, 1
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 4, 2
%8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 1
%9 = icmp slt i64 %8, 4
br i1 %9, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%12 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PanicSliceConvert"(i64 %12, i64 4)
%10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PanicSliceConvert"(i64 %10, i64 4)
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
%13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 0
%14 = load [4 x i8], ptr %2, align 1
%15 = load [4 x i8], ptr %13, align 1
%16 = extractvalue [4 x i8] %14, 0
%17 = extractvalue [4 x i8] %15, 0
%18 = icmp eq i8 %16, %17
%19 = and i1 true, %18
%20 = extractvalue [4 x i8] %14, 1
%21 = extractvalue [4 x i8] %15, 1
%22 = icmp eq i8 %20, %21
%23 = and i1 %19, %22
%24 = extractvalue [4 x i8] %14, 2
%25 = extractvalue [4 x i8] %15, 2
%26 = icmp eq i8 %24, %25
%27 = and i1 %23, %26
%28 = extractvalue [4 x i8] %14, 3
%29 = extractvalue [4 x i8] %15, 3
%30 = icmp eq i8 %28, %29
%31 = and i1 %27, %30
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %31)
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, 0
%12 = load [4 x i8], ptr %0, align 1
%13 = load [4 x i8], ptr %11, align 1
%14 = extractvalue [4 x i8] %12, 0
%15 = extractvalue [4 x i8] %13, 0
%16 = icmp eq i8 %14, %15
%17 = and i1 true, %16
%18 = extractvalue [4 x i8] %12, 1
%19 = extractvalue [4 x i8] %13, 1
%20 = icmp eq i8 %18, %19
%21 = and i1 %17, %20
%22 = extractvalue [4 x i8] %12, 2
%23 = extractvalue [4 x i8] %13, 2
%24 = icmp eq i8 %22, %23
%25 = and i1 %21, %24
%26 = extractvalue [4 x i8] %12, 3
%27 = extractvalue [4 x i8] %13, 3
%28 = icmp eq i8 %26, %27
%29 = and i1 %25, %28
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %29)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, i64 4, 1
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 4, 2
%35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, 1
%36 = icmp slt i64 %35, 2
br i1 %36, label %_llgo_3, label %_llgo_4
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 4, 1
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31, i64 4, 2
%33 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, 1
%34 = icmp slt i64 %33, 2
br i1 %34, label %_llgo_3, label %_llgo_4
_llgo_3: ; preds = %_llgo_2
%37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PanicSliceConvert"(i64 %37, i64 2)
%35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PanicSliceConvert"(i64 %35, i64 2)
br label %_llgo_4
_llgo_4: ; preds = %_llgo_3, %_llgo_2
%38 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, 0
%39 = load [2 x i8], ptr %38, align 1
%40 = alloca [2 x i8], align 1
call void @llvm.memset(ptr %40, i8 0, i64 2, i1 false)
%41 = getelementptr inbounds i8, ptr %40, i64 0
%42 = getelementptr inbounds i8, ptr %40, i64 1
store i8 1, ptr %41, align 1
store i8 2, ptr %42, align 1
%43 = load [2 x i8], ptr %40, align 1
%44 = extractvalue [2 x i8] %39, 0
%45 = extractvalue [2 x i8] %43, 0
%46 = icmp eq i8 %44, %45
%47 = and i1 true, %46
%48 = extractvalue [2 x i8] %39, 1
%49 = extractvalue [2 x i8] %43, 1
%50 = icmp eq i8 %48, %49
%51 = and i1 %47, %50
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %51)
%36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32, 0
%37 = load [2 x i8], ptr %36, align 1
%38 = alloca [2 x i8], align 1
call void @llvm.memset(ptr %38, i8 0, i64 2, i1 false)
%39 = getelementptr inbounds i8, ptr %38, i64 0
%40 = getelementptr inbounds i8, ptr %38, i64 1
store i8 1, ptr %39, align 1
store i8 2, ptr %40, align 1
%41 = load [2 x i8], ptr %38, align 1
%42 = extractvalue [2 x i8] %37, 0
%43 = extractvalue [2 x i8] %41, 0
%44 = icmp eq i8 %42, %43
%45 = and i1 true, %44
%46 = extractvalue [2 x i8] %37, 1
%47 = extractvalue [2 x i8] %41, 1
%48 = icmp eq i8 %46, %47
%49 = and i1 %45, %48
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %49)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PanicSliceConvert"(i64, i64)

View File

@@ -1,32 +1,26 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/slicelen'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/slicelen"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, 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/slicelen.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [7 x i8] c"len > 0", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/slicelen.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/_testrt/slicelen.init$guard", align 1
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/slicelen.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()
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 0)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br i1 false, label %_llgo_1, label %_llgo_2
@@ -37,11 +31,9 @@ _llgo_1: ; preds = %_llgo_0
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
ret i32 0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,62 +1,54 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/strlen'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/strlen"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1
@main.format = global [10 x i8] zeroinitializer, align 1
@"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/strlen.format" = global [10 x i8] zeroinitializer, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/strlen.init$guard" = global i1 false, align 1
define ptr @main._Cgo_ptr(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen._Cgo_ptr"(ptr %0) {
_llgo_0:
ret ptr %0
}
declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @main._cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @"github.com/goplus/llgo/compiler/cl/_testrt/strlen._cgoCheckResult"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.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/_testrt/strlen.init$guard", align 1
call void @syscall.init()
store i8 72, ptr @main.format, align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @main.format, i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @main.format, i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @main.format, i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @main.format, i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @main.format, i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @main.format, i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @main.format, i64 9), align 1
store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i64 9), align 1
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/strlen.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 i32 @strlen(ptr @main.format)
call void (ptr, ...) @printf(ptr @main.format, i32 %2)
ret i32 0
%0 = call i32 @strlen(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format")
call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/strlen.format", i32 %0)
ret void
}
declare void @syscall.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @strlen(ptr)
declare void @printf(ptr, ...)

View File

@@ -1,89 +1,83 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/struct'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/struct"
%main.Foo = type { i32, i1 }
%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" = type { i32, i1 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1
@main.format = global [10 x i8] zeroinitializer, align 1
@"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/struct.format" = global [10 x i8] zeroinitializer, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/struct.init$guard" = global i1 false, align 1
define void @main.Foo.Print(%main.Foo %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %0) {
_llgo_0:
%1 = alloca %main.Foo, align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", align 8
call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false)
store %main.Foo %0, ptr %1, align 4
%2 = getelementptr inbounds %main.Foo, ptr %1, i32 0, i32 1
store %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %0, ptr %1, align 4
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %1, i32 0, i32 1
%3 = load i1, ptr %2, align 1
br i1 %3, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%4 = getelementptr inbounds %main.Foo, ptr %1, i32 0, i32 0
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %1, i32 0, i32 0
%5 = load i32, ptr %4, align 4
call void (ptr, ...) @printf(ptr @main.format, i32 %5)
call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i32 %5)
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
define void @"main.(*Foo).Print"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.(*Foo).Print"(ptr %0) {
_llgo_0:
%1 = load %main.Foo, ptr %0, align 4
call void @main.Foo.Print(%main.Foo %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, align 4
call void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %1)
ret void
}
define ptr @main._Cgo_ptr(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct._Cgo_ptr"(ptr %0) {
_llgo_0:
ret ptr %0
}
declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @main._cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @"github.com/goplus/llgo/compiler/cl/_testrt/struct._cgoCheckResult"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.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/_testrt/struct.init$guard", align 1
call void @syscall.init()
store i8 72, ptr @main.format, align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @main.format, i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @main.format, i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @main.format, i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @main.format, i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @main.format, i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @main.format, i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @main.format, i64 9), align 1
store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/struct.format", i64 9), align 1
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/struct.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 = alloca %main.Foo, align 8
call void @llvm.memset(ptr %2, i8 0, i64 8, i1 false)
%3 = getelementptr inbounds %main.Foo, ptr %2, i32 0, i32 0
%4 = getelementptr inbounds %main.Foo, ptr %2, i32 0, i32 1
store i32 100, ptr %3, align 4
store i1 true, ptr %4, align 1
%5 = load %main.Foo, ptr %2, align 4
call void @main.Foo.Print(%main.Foo %5)
ret i32 0
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", align 8
call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, i32 0, i32 1
store i32 100, ptr %1, align 4
store i1 true, ptr %2, align 1
%3 = load %"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo", ptr %0, align 4
call void @"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo.Print"(%"github.com/goplus/llgo/compiler/cl/_testrt/struct.Foo" %3)
ret void
}
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
@@ -93,6 +87,4 @@ declare void @printf(ptr, ...)
declare void @syscall.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }

View File

@@ -1,34 +1,26 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/structsize'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/structsize"
@"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/structsize.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/structsize.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/structsize.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/_testrt/structsize.init$guard", align 1
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/structsize.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 i32 (ptr, ...) @printf(ptr @0, i64 14)
ret i32 0
%0 = call i32 (ptr, ...) @printf(ptr @0, i64 14)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)

View File

@@ -1,50 +1,44 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/sum'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/sum"
%"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/sum.init$guard" = global i1 false, align 1
@0 = 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/sum.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/sum.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/_testrt/sum.init$guard", align 1
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/sum.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%3 = getelementptr inbounds i64, ptr %2, i64 0
store i64 1, ptr %3, align 4
%4 = getelementptr inbounds i64, ptr %2, i64 1
store i64 2, ptr %4, align 4
%5 = getelementptr inbounds i64, ptr %2, i64 2
store i64 3, ptr %5, align 4
%6 = getelementptr inbounds i64, ptr %2, i64 3
store i64 4, ptr %6, align 4
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 4, 1
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 4, 2
%10 = call i64 @main.sum(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
%11 = call i32 (ptr, ...) @printf(ptr @0, i64 %10)
ret i32 0
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%1 = getelementptr inbounds i64, ptr %0, i64 0
store i64 1, ptr %1, align 4
%2 = getelementptr inbounds i64, ptr %0, i64 1
store i64 2, ptr %2, align 4
%3 = getelementptr inbounds i64, ptr %0, i64 2
store i64 3, ptr %3, align 4
%4 = getelementptr inbounds i64, ptr %0, i64 3
store i64 4, ptr %4, align 4
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %5, i64 4, 1
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 4, 2
%8 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/sum.sum"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7)
%9 = call i32 (ptr, ...) @printf(ptr @0, i64 %8)
ret void
}
define i64 @main.sum(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/sum.sum"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
br label %_llgo_1
@@ -72,8 +66,6 @@ _llgo_3: ; preds = %_llgo_1
ret i64 %2
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
declare i32 @printf(ptr, ...)

View File

@@ -1,7 +1,7 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpabi'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpabi"
%"main.T[string,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i64 }
%"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
@@ -10,16 +10,14 @@ source_filename = "main"
%"github.com/goplus/llgo/runtime/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr }
%"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr }
@"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/tpabi.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [1 x i8] c"a", align 1
@"_llgo_main.T[string,int]" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/tpabi", align 1
@2 = private unnamed_addr constant [13 x i8] c"T[string,int]", align 1
@_llgo_string = linkonce global ptr null, align 8
@_llgo_int = linkonce global ptr null, align 8
@"main.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [1 x i8] c"m", align 1
@4 = private unnamed_addr constant [1 x i8] c"n", align 1
@5 = private unnamed_addr constant [4 x i8] c"Demo", align 1
@@ -27,107 +25,103 @@ source_filename = "main"
@6 = private unnamed_addr constant [4 x i8] c"Info", align 1
@7 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@8 = private unnamed_addr constant [5 x i8] c"hello", align 1
@"*_llgo_main.T[string,int]" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" = linkonce global ptr null, align 8
@"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs" = linkonce global ptr null, align 8
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.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/tpabi.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.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/tpabi.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 = alloca %"main.T[string,int]", align 8
call void @llvm.memset(ptr %2, i8 0, i64 24, i1 false)
%3 = getelementptr inbounds %"main.T[string,int]", ptr %2, i32 0, i32 0
%4 = getelementptr inbounds %"main.T[string,int]", ptr %2, i32 0, i32 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 1 }, ptr %3, align 8
store i64 1, ptr %4, align 4
%5 = load %"main.T[string,int]", ptr %2, align 8
%6 = load ptr, ptr @"_llgo_main.T[string,int]", align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store %"main.T[string,int]" %5, ptr %7, align 8
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, ptr %7, 1
%10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, 0
%11 = load ptr, ptr @"_llgo_main.T[string,int]", align 8
%12 = icmp eq ptr %10, %11
br i1 %12, label %_llgo_1, label %_llgo_2
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
call void @llvm.memset(ptr %0, i8 0, i64 24, i1 false)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 1 }, ptr %1, align 8
store i64 1, ptr %2, align 4
%3 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, align 8
%4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
store %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %3, ptr %5, align 8
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1
%8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 0
%9 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
%10 = icmp eq ptr %8, %9
br i1 %10, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, 1
%14 = load %"main.T[string,int]", ptr %13, align 8
%15 = extractvalue %"main.T[string,int]" %14, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %15)
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 1
%12 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %11, align 8
%13 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %12, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %13)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%17 = getelementptr inbounds %"main.T[string,int]", ptr %16, i32 0, i32 0
%18 = getelementptr inbounds %"main.T[string,int]", ptr %16, i32 0, i32 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 }, ptr %17, align 8
store i64 100, ptr %18, align 4
%19 = load ptr, ptr @"*_llgo_main.T[string,int]", align 8
%20 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%21 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %21, ptr %19)
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %22, 0
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %23, ptr %16, 1
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %24)
%26 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %24, 0
%27 = getelementptr ptr, ptr %26, i64 3
%28 = load ptr, ptr %27, align 8
%29 = insertvalue { ptr, ptr } undef, ptr %28, 0
%30 = insertvalue { ptr, ptr } %29, ptr %25, 1
%31 = extractvalue { ptr, ptr } %30, 1
%32 = extractvalue { ptr, ptr } %30, 0
call void %32(ptr %31)
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%34 = getelementptr inbounds i64, ptr %33, i64 0
%35 = getelementptr inbounds i64, ptr %33, i64 1
%36 = getelementptr inbounds i64, ptr %33, i64 2
%37 = getelementptr inbounds i64, ptr %33, i64 3
store i64 1, ptr %34, align 4
store i64 2, ptr %35, align 4
store i64 3, ptr %36, align 4
store i64 4, ptr %37, align 4
%38 = getelementptr [4 x i64], ptr %33, i64 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %38)
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %14, i32 0, i32 0
%16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %14, i32 0, i32 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 5 }, ptr %15, align 8
store i64 100, ptr %16, align 4
%17 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
%18 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%19 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %19, ptr %17)
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %20, 0
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %21, ptr %14, 1
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %22)
%24 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %22, 0
%25 = getelementptr ptr, ptr %24, i64 3
%26 = load ptr, ptr %25, align 8
%27 = insertvalue { ptr, ptr } undef, ptr %26, 0
%28 = insertvalue { ptr, ptr } %27, ptr %23, 1
%29 = extractvalue { ptr, ptr } %28, 1
%30 = extractvalue { ptr, ptr } %28, 0
call void %30(ptr %29)
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%32 = getelementptr inbounds i64, ptr %31, i64 0
%33 = getelementptr inbounds i64, ptr %31, i64 1
%34 = getelementptr inbounds i64, ptr %31, i64 2
%35 = getelementptr inbounds i64, ptr %31, i64 3
store i64 1, ptr %32, align 4
store i64 2, ptr %33, align 4
store i64 3, ptr %34, align 4
store i64 4, ptr %35, align 4
%36 = getelementptr [4 x i64], ptr %31, i64 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %36)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%39 = getelementptr [4 x i64], ptr %33, i64 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %39)
%37 = getelementptr [4 x i64], ptr %31, i64 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %37)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
_llgo_2: ; preds = %_llgo_0
%40 = load ptr, ptr @_llgo_string, align 8
%41 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 21 }, ptr %41, align 8
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %40, 0
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, ptr %41, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %43)
%38 = load ptr, ptr @_llgo_string, align 8
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 21 }, ptr %39, align 8
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41)
unreachable
}
define linkonce void @"main.T[string,int].Info"(%"main.T[string,int]" %0) {
define linkonce void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int].Info"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %0) {
_llgo_0:
%1 = alloca %"main.T[string,int]", align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
call void @llvm.memset(ptr %1, i8 0, i64 24, i1 false)
store %"main.T[string,int]" %0, ptr %1, align 8
%2 = getelementptr inbounds %"main.T[string,int]", ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %0, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %1, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, align 8
%4 = getelementptr inbounds %"main.T[string,int]", ptr %1, i32 0, i32 1
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %1, i32 0, i32 1
%5 = load i64, ptr %4, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
@@ -136,11 +130,11 @@ _llgo_0:
ret void
}
define linkonce void @"main.(*T[string,int]).Demo"(ptr %0) {
define linkonce void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Demo"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %"main.T[string,int]", ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 0
%2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8
%3 = getelementptr inbounds %"main.T[string,int]", ptr %0, i32 0, i32 1
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, i32 0, i32 1
%4 = load i64, ptr %3, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %2)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
@@ -149,27 +143,25 @@ _llgo_0:
ret void
}
define void @"main.(*T[string,int]).Info"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info"(ptr %0) {
_llgo_0:
%1 = load %"main.T[string,int]", ptr %0, align 8
call void @"main.T[string,int].Info"(%"main.T[string,int]" %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", ptr %0, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int].Info"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]" %1)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2)
%1 = load ptr, ptr @"_llgo_main.T[string,int]", align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
store ptr %0, ptr @"_llgo_main.T[string,int]", align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -207,9 +199,9 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %15, 0
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 2, 1
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, i64 2, 2
%21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20)
store ptr %21, ptr @"main.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8
%22 = load ptr, ptr @"main.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8
%21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, i64 24, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20)
store ptr %21, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8
%22 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8
br i1 %2, label %_llgo_7, label %_llgo_8
_llgo_7: ; preds = %_llgo_6
@@ -218,8 +210,8 @@ _llgo_7: ; preds = %_llgo_6
br i1 %24, label %_llgo_9, label %_llgo_10
_llgo_8: ; preds = %_llgo_10, %_llgo_6
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2)
%26 = load ptr, ptr @"*_llgo_main.T[string,int]", align 8
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 13 }, i64 25, i64 24, i64 1, i64 2)
%26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
%27 = icmp eq ptr %26, null
br i1 %27, label %_llgo_11, label %_llgo_12
@@ -240,15 +232,15 @@ _llgo_9: ; preds = %_llgo_7
_llgo_10: ; preds = %_llgo_9, %_llgo_7
%37 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %37, 1
%39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"main.(*T[string,int]).Demo", 2
%40 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %39, ptr @"main.(*T[string,int]).Demo", 3
%39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Demo", 2
%40 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %39, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Demo", 3
%41 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%42 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %41, 1
%43 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %42, ptr @"main.(*T[string,int]).Info", 2
%44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %43, ptr @"main.(*T[string,int]).Info", 3
%43 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %42, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info", 2
%44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %43, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info", 3
%45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %41, 1
%46 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %45, ptr @"main.(*T[string,int]).Info", 2
%47 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %46, ptr @"main.T[string,int].Info", 3
%46 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %45, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.(*T[string,int]).Info", 2
%47 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %46, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int].Info", 3
%48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%49 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %48, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %47, ptr %49, align 8
@@ -269,7 +261,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_7
_llgo_11: ; preds = %_llgo_8
%59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %25)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %59)
store ptr %59, ptr @"*_llgo_main.T[string,int]", align 8
store ptr %59, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpabi.T[string,int]", align 8
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_8
@@ -286,7 +278,7 @@ _llgo_13: ; preds = %_llgo_12
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %64, 0
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66, i64 1, 1
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 1, 2
%69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68)
%69 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68)
store ptr %69, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8
br label %_llgo_14

View File

@@ -1,39 +1,33 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpfunc'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpfunc"
@"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/tpfunc.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.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/_testrt/tpfunc.init$guard", align 1
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/tpfunc.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()
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 16)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
define void @"main.main$1"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$1"(ptr %0) {
_llgo_0:
%1 = load i64, ptr %0, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
@@ -41,7 +35,7 @@ _llgo_0:
ret void
}
define void @"main.main$2"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$2"(ptr %0) {
_llgo_0:
%1 = load i64, ptr %0, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
@@ -49,7 +43,7 @@ _llgo_0:
ret void
}
define void @"main.main$3"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$3"(ptr %0) {
_llgo_0:
%1 = load i64, ptr %0, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
@@ -57,11 +51,9 @@ _llgo_0:
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define linkonce void @"__llgo_stub.main.main$1"(ptr %0, ptr %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$1"(ptr %0, ptr %1) {
_llgo_0:
tail call void @"main.main$1"(ptr %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpfunc.main$1"(ptr %1)
ret void
}

View File

@@ -1,143 +1,135 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpmap'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpmap"
%main.cacheKey = type { i64, %main.T2, %"main.T3[any]", ptr, i64 }
%main.T2 = type { i64 }
%"main.T3[any]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.eface" }
%"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" = type { i64, %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", ptr, i64 }
%"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2" = type { i64 }
%"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.eface" }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"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.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
@_llgo_main.cacheKey = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/tpmap", align 1
@1 = private unnamed_addr constant [8 x i8] c"cacheKey", align 1
@_llgo_main.T1 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [2 x i8] c"T1", align 1
@_llgo_int = linkonce global ptr null, align 8
@_llgo_main.T2 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [2 x i8] c"T2", align 1
@"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [1 x i8] c"v", align 1
@"_llgo_main.T3[any]" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]" = linkonce global ptr null, align 8
@5 = private unnamed_addr constant [7 x i8] c"T3[any]", align 1
@_llgo_any = linkonce global ptr null, align 8
@"main.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo" = linkonce global ptr null, align 8
@"*_llgo_int" = linkonce global ptr null, align 8
@_llgo_uintptr = linkonce global ptr null, align 8
@"main.struct$ZLgMjv1XBA1L4yXCpdouRvQF2okeuHQ-YWVTE34gq4I" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$H1D8cXR8QUFS3qIktzfQn9cRVh-lNVxvR-59uCOVwMs" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [2 x i8] c"t1", align 1
@7 = private unnamed_addr constant [2 x i8] c"t2", align 1
@8 = private unnamed_addr constant [2 x i8] c"t3", align 1
@9 = private unnamed_addr constant [2 x i8] c"t4", align 1
@10 = private unnamed_addr constant [2 x i8] c"t5", align 1
@_llgo_string = linkonce global ptr null, align 8
@"map[_llgo_main.cacheKey]_llgo_string" = linkonce global ptr null, align 8
@"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string" = linkonce global ptr null, align 8
@11 = private unnamed_addr constant [7 x i8] c"topbits", align 1
@12 = private unnamed_addr constant [4 x i8] c"keys", align 1
@13 = private unnamed_addr constant [5 x i8] c"elems", align 1
@14 = private unnamed_addr constant [8 x i8] c"overflow", align 1
@15 = private unnamed_addr constant [5 x i8] c"world", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.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/tpmap.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.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/tpmap.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_main.cacheKey, align 8
%3 = load ptr, ptr @_llgo_string, align 8
%4 = load ptr, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %4, i64 0)
%6 = alloca %main.cacheKey, align 8
call void @llvm.memset(ptr %6, i8 0, i64 48, i1 false)
%7 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 0
%8 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 1
%9 = getelementptr inbounds %main.T2, ptr %8, i32 0, i32 0
%10 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 2
%11 = getelementptr inbounds %"main.T3[any]", ptr %10, i32 0, i32 0
%12 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 3
%13 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 4
%0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8
%1 = load ptr, ptr @_llgo_string, align 8
%2 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr %2, i64 0)
%4 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8
call void @llvm.memset(ptr %4, i8 0, i64 48, i1 false)
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 0
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 1
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", ptr %6, i32 0, i32 0
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 2
%9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", ptr %8, i32 0, i32 0
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 3
%11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, i32 0, i32 4
store i64 0, ptr %5, align 4
store i64 0, ptr %7, align 4
store i64 0, ptr %9, align 4
%14 = load ptr, ptr @_llgo_int, align 8
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, ptr null, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %11, align 8
store ptr null, ptr %12, align 8
store i64 0, ptr %13, align 4
%17 = load %main.cacheKey, ptr %6, align 8
%18 = load ptr, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %main.cacheKey %17, ptr %19, align 8
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %18, ptr %5, ptr %19)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 5 }, ptr %20, align 8
%21 = alloca %main.cacheKey, align 8
call void @llvm.memset(ptr %21, i8 0, i64 48, i1 false)
%22 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 0
%23 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 1
%24 = getelementptr inbounds %main.T2, ptr %23, i32 0, i32 0
%25 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 2
%26 = getelementptr inbounds %"main.T3[any]", ptr %25, i32 0, i32 0
%27 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 3
%28 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 4
%12 = load ptr, ptr @_llgo_int, align 8
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, ptr null, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %9, align 8
store ptr null, ptr %10, align 8
store i64 0, ptr %11, align 4
%15 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %4, align 8
%16 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" %15, ptr %17, align 8
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapAssign"(ptr %16, ptr %3, ptr %17)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @15, i64 5 }, ptr %18, align 8
%19 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8
call void @llvm.memset(ptr %19, i8 0, i64 48, i1 false)
%20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 0
%21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 1
%22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", ptr %21, i32 0, i32 0
%23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 2
%24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", ptr %23, i32 0, i32 0
%25 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 3
%26 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, i32 0, i32 4
store i64 0, ptr %20, align 4
store i64 0, ptr %22, align 4
store i64 0, ptr %24, align 4
%29 = load ptr, ptr @_llgo_int, align 8
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %29, 0
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, ptr null, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr %26, align 8
store ptr null, ptr %27, align 8
store i64 0, ptr %28, align 4
%32 = load %main.cacheKey, ptr %21, align 8
%33 = load ptr, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %main.cacheKey %32, ptr %34, align 8
%35 = call { ptr, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess2"(ptr %33, ptr %5, ptr %34)
%36 = extractvalue { ptr, i1 } %35, 0
%37 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %36, align 8
%38 = extractvalue { ptr, i1 } %35, 1
%39 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.String" %37, 0
%40 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %39, i1 %38, 1
%41 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %40, 0
%42 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %40, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %41)
%27 = load ptr, ptr @_llgo_int, align 8
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %27, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr null, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr %24, align 8
store ptr null, ptr %25, align 8
store i64 0, ptr %26, align 4
%30 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", ptr %19, align 8
%31 = load ptr, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey" %30, ptr %32, align 8
%33 = call { ptr, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.MapAccess2"(ptr %31, ptr %3, ptr %32)
%34 = extractvalue { ptr, i1 } %33, 0
%35 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %34, align 8
%36 = extractvalue { ptr, i1 } %33, 1
%37 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.String" %35, 0
%38 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %37, i1 %36, 1
%39 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %38, 0
%40 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %38, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %39)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %42)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %40)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
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/tpmap.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
store ptr %0, ptr @_llgo_main.cacheKey, align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0)
%2 = load ptr, ptr @_llgo_main.T1, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0)
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1", align 8
%3 = icmp eq ptr %2, null
br i1 %3, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
store ptr %1, ptr @_llgo_main.T1, align 8
store ptr %1, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -159,14 +151,14 @@ _llgo_5: ; preds = %_llgo_4
br label %_llgo_6
_llgo_6: ; preds = %_llgo_5, %_llgo_4
%8 = load ptr, ptr @_llgo_main.T1, align 8
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0)
%10 = load ptr, ptr @_llgo_main.T2, align 8
%8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T1", align 8
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0)
%10 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", align 8
%11 = icmp eq ptr %10, null
br i1 %11, label %_llgo_7, label %_llgo_8
_llgo_7: ; preds = %_llgo_6
store ptr %9, ptr @_llgo_main.T2, align 8
store ptr %9, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", align 8
br label %_llgo_8
_llgo_8: ; preds = %_llgo_7, %_llgo_6
@@ -178,9 +170,9 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %14, 0
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 1
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 1, 2
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18)
store ptr %19, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%20 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18)
store ptr %19, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%20 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
br i1 %11, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
@@ -188,14 +180,14 @@ _llgo_9: ; preds = %_llgo_8
br label %_llgo_10
_llgo_10: ; preds = %_llgo_9, %_llgo_8
%21 = load ptr, ptr @_llgo_main.T2, align 8
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0)
%23 = load ptr, ptr @"_llgo_main.T3[any]", align 8
%21 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T2", align 8
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0)
%23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", align 8
%24 = icmp eq ptr %23, null
br i1 %24, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
store ptr %22, ptr @"_llgo_main.T3[any]", align 8
store ptr %22, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", align 8
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_10
@@ -208,7 +200,7 @@ _llgo_13: ; preds = %_llgo_12
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %27, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28, i64 0, 1
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 0, 2
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30)
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30)
store ptr %31, ptr @_llgo_any, align 8
br label %_llgo_14
@@ -218,7 +210,7 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %33, 0
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 0, 1
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, i64 0, 2
%37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36)
%37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36)
%38 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, ptr %37, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
%40 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %39, i64 0
@@ -226,9 +218,9 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %39, 0
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41, i64 1, 1
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42, i64 1, 2
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43)
store ptr %44, ptr @"main.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8
%45 = load ptr, ptr @"main.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43)
store ptr %44, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8
%45 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8
br i1 %24, label %_llgo_15, label %_llgo_16
_llgo_15: ; preds = %_llgo_14
@@ -236,7 +228,7 @@ _llgo_15: ; preds = %_llgo_14
br label %_llgo_16
_llgo_16: ; preds = %_llgo_15, %_llgo_14
%46 = load ptr, ptr @"_llgo_main.T3[any]", align 8
%46 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.T3[any]", align 8
%47 = load ptr, ptr @"*_llgo_int", align 8
%48 = icmp eq ptr %47, null
br i1 %48, label %_llgo_17, label %_llgo_18
@@ -261,9 +253,9 @@ _llgo_19: ; preds = %_llgo_18
_llgo_20: ; preds = %_llgo_19, %_llgo_18
%55 = load ptr, ptr @_llgo_uintptr, align 8
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0)
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0)
%58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0)
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0)
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0)
%58 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 7 }, i64 25, i64 16, i64 0, i64 0)
%59 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 }, ptr %56, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%60 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 2 }, ptr %57, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%61 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 2 }, ptr %58, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
@@ -286,9 +278,9 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %67, 0
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73, i64 5, 1
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 5, 2
%76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75)
store ptr %76, ptr @"main.struct$ZLgMjv1XBA1L4yXCpdouRvQF2okeuHQ-YWVTE34gq4I", align 8
%77 = load ptr, ptr @"main.struct$ZLgMjv1XBA1L4yXCpdouRvQF2okeuHQ-YWVTE34gq4I", align 8
%76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75)
store ptr %76, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$H1D8cXR8QUFS3qIktzfQn9cRVh-lNVxvR-59uCOVwMs", align 8
%77 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmap.struct$H1D8cXR8QUFS3qIktzfQn9cRVh-lNVxvR-59uCOVwMs", align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %77, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
%78 = load ptr, ptr @_llgo_string, align 8
%79 = icmp eq ptr %78, null
@@ -300,8 +292,8 @@ _llgo_21: ; preds = %_llgo_20
br label %_llgo_22
_llgo_22: ; preds = %_llgo_21, %_llgo_20
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
%82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
%82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
%83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
%84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
%85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64 8, ptr %84)
@@ -325,10 +317,10 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20
%99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %94, 0
%100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %99, i64 4, 1
%101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %100, i64 4, 2
%102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 528, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101)
%102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 48 }, i64 528, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %101)
%103 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %81, ptr %83, ptr %102, i64 24)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %103)
store ptr %103, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
store ptr %103, ptr @"map[_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmap.cacheKey]_llgo_string", align 8
ret void
}

View File

@@ -1,126 +1,120 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/tpmethod'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/tpmethod"
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"main.Tuple[error]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }
%"main.future[main.Tuple[error]]" = type { { ptr, ptr } }
%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }
%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]" = type { { ptr, ptr } }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"github.com/goplus/llgo/runtime/abi.Imethod" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr }
%"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/abi.Method" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr, ptr, ptr }
@"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/tpmethod.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [7 x i8] c"foo.txt", align 1
@"_llgo_main.future[main.Tuple[error]]" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
@2 = private unnamed_addr constant [25 x i8] c"future[main.Tuple[error]]", align 1
@"_llgo_main.Tuple[error]" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [51 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod", align 1
@2 = private unnamed_addr constant [72 x i8] c"future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [12 x i8] c"Tuple[error]", align 1
@_llgo_error = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [5 x i8] c"error", align 1
@_llgo_string = linkonce global ptr null, align 8
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
@5 = private unnamed_addr constant [5 x i8] c"Error", align 1
@"main.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [1 x i8] c"v", align 1
@7 = private unnamed_addr constant [3 x i8] c"Get", align 1
@"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null, align 8
@"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU" = linkonce global ptr null, align 8
@"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0" = linkonce global ptr null, align 8
@_llgo_Pointer = linkonce global ptr null, align 8
@"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4" = linkonce global ptr null, align 8
@8 = private unnamed_addr constant [2 x i8] c"$f", align 1
@9 = private unnamed_addr constant [5 x i8] c"$data", align 1
@"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s" = linkonce global ptr null, align 8
@"main.struct$awGH2Wh33bS1v_s7SNAwKW27E20HcwiiPPzh9UA7QDs" = linkonce global ptr null, align 8
@"main.struct$N1awC7qGapVTS_NFj1Q0jk6nCjATrIK-60oOEyDjabo" = linkonce global ptr null, align 8
@"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$h0x5MUrZjI2t93KW7G5Ookzv6qIV0lh7-bP4KCXTtD4" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$sZkgOwzwSVW5_7o2czBO4vd0Y6GnzBmlznPz4599nqg" = linkonce global ptr null, align 8
@10 = private unnamed_addr constant [2 x i8] c"fn", align 1
@11 = private unnamed_addr constant [4 x i8] c"Then", align 1
@"*_llgo_main.future[main.Tuple[error]]" = linkonce global ptr null, align 8
@"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]" = linkonce global ptr null, align 8
@"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0" = linkonce global ptr null, align 8
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @main.ReadFile(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
_llgo_0:
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.Async[main.Tuple[error]]"({ ptr, ptr } { ptr @"__llgo_stub.main.ReadFile$1", ptr null })
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Async[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]"({ ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1", ptr null })
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1
}
define void @"main.ReadFile$1"({ ptr, ptr } %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1"({ ptr, ptr } %0) {
_llgo_0:
%1 = alloca %"main.Tuple[error]", align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
%2 = getelementptr inbounds %"main.Tuple[error]", ptr %1, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer, ptr %2, align 8
%3 = load %"main.Tuple[error]", ptr %1, align 8
%3 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %1, align 8
%4 = extractvalue { ptr, ptr } %0, 1
%5 = extractvalue { ptr, ptr } %0, 0
call void %5(ptr %4, %"main.Tuple[error]" %3)
call void %5(ptr %4, %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %3)
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.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/tpmethod.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.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/tpmethod.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 %"github.com/goplus/llgo/runtime/internal/runtime.iface" @main.ReadFile(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 7 })
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2)
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, 0
%5 = getelementptr ptr, ptr %4, i64 3
%6 = load ptr, ptr %5, align 8
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
%9 = extractvalue { ptr, ptr } %8, 1
%10 = extractvalue { ptr, ptr } %8, 0
call void %10(ptr %9, { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null })
ret i32 0
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 7 })
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0)
%2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 0
%3 = getelementptr ptr, ptr %2, i64 3
%4 = load ptr, ptr %3, align 8
%5 = insertvalue { ptr, ptr } undef, ptr %4, 0
%6 = insertvalue { ptr, ptr } %5, ptr %1, 1
%7 = extractvalue { ptr, ptr } %6, 1
%8 = extractvalue { ptr, ptr } %6, 0
call void %8(ptr %7, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1", ptr null })
ret void
}
define void @"main.main$1"(%"main.Tuple[error]" %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0) {
_llgo_0:
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.Tuple[error].Get"(%"main.Tuple[error]" %0)
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret void
}
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.Tuple[error].Get"(%"main.Tuple[error]" %0) {
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0) {
_llgo_0:
%1 = alloca %"main.Tuple[error]", align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
store %"main.Tuple[error]" %0, ptr %1, align 8
%2 = getelementptr inbounds %"main.Tuple[error]", ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %0, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %1, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3
}
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.(*Tuple[error]).Get"(ptr %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get"(ptr %0) {
_llgo_0:
%1 = load %"main.Tuple[error]", ptr %0, align 8
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.Tuple[error].Get"(%"main.Tuple[error]" %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", ptr %0, align 8
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %1)
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2
}
define linkonce void @"main.(*future[main.Tuple[error]]).Then"(ptr %0, { ptr, ptr } %1) {
define linkonce void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]).Then"(ptr %0, { ptr, ptr } %1) {
_llgo_0:
%2 = getelementptr inbounds %"main.future[main.Tuple[error]]", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", ptr %0, i32 0, i32 0
%3 = load { ptr, ptr }, ptr %2, align 8
%4 = extractvalue { ptr, ptr } %3, 1
%5 = extractvalue { ptr, ptr } %3, 0
@@ -128,39 +122,37 @@ _llgo_0:
ret void
}
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.Async[main.Tuple[error]]"({ ptr, ptr } %0) {
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Async[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]"({ ptr, ptr } %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%2 = getelementptr inbounds %"main.future[main.Tuple[error]]", ptr %1, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", ptr %1, i32 0, i32 0
store { ptr, ptr } %0, ptr %2, align 8
%3 = load ptr, ptr @"_llgo_main.future[main.Tuple[error]]", align 8
%4 = load ptr, ptr @"*_llgo_main.future[main.Tuple[error]]", align 8
%5 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
%6 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%7 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
%8 = load ptr, ptr @"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0", align 8
%3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8
%4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8
%5 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8
%6 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%7 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8
%8 = load ptr, ptr @"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0", align 8
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %8, ptr %4)
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %9, 0
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %10, ptr %1, 1
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11
}
define linkonce void @"__llgo_stub.main.ReadFile$1"(ptr %0, { ptr, ptr } %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1"(ptr %0, { ptr, ptr } %1) {
_llgo_0:
tail call void @"main.ReadFile$1"({ ptr, ptr } %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.ReadFile$1"({ ptr, ptr } %1)
ret void
}
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface")
define linkonce void @"__llgo_stub.main.main$1"(ptr %0, %"main.Tuple[error]" %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1"(ptr %0, %"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %1) {
_llgo_0:
tail call void @"main.main$1"(%"main.Tuple[error]" %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.main$1"(%"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]" %1)
ret void
}
@@ -170,17 +162,17 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 25 }, i64 25, i64 24, i64 0, i64 1)
store ptr %0, ptr @"_llgo_main.future[main.Tuple[error]]", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 12 }, i64 25, i64 16, i64 1, i64 1)
%2 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 72 }, i64 25, i64 24, i64 0, i64 1)
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 12 }, i64 25, i64 16, i64 1, i64 1)
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
%3 = icmp eq ptr %2, null
br i1 %3, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
store ptr %1, ptr @"_llgo_main.Tuple[error]", align 8
store ptr %1, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -251,9 +243,9 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %34, 0
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 1, 1
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, i64 1, 2
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38)
store ptr %39, ptr @"main.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8
%40 = load ptr, ptr @"main.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38)
store ptr %39, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8
%40 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8
br i1 %3, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
@@ -263,9 +255,9 @@ _llgo_11: ; preds = %_llgo_10
br i1 %43, label %_llgo_13, label %_llgo_14
_llgo_12: ; preds = %_llgo_14, %_llgo_10
%44 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
%45 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
%46 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
%44 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
%45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
%46 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8
%47 = icmp eq ptr %46, null
br i1 %47, label %_llgo_15, label %_llgo_16
@@ -288,11 +280,11 @@ _llgo_13: ; preds = %_llgo_11
_llgo_14: ; preds = %_llgo_13, %_llgo_11
%58 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
%59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1
%60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"main.(*Tuple[error]).Get", 2
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"main.(*Tuple[error]).Get", 3
%60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %59, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get", 2
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get", 3
%62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1
%63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"main.(*Tuple[error]).Get", 2
%64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"main.Tuple[error].Get", 3
%63 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*Tuple[error]).Get", 2
%64 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %63, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error].Get", 3
%65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%66 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %65, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %64, ptr %66, align 8
@@ -321,11 +313,11 @@ _llgo_15: ; preds = %_llgo_12
%83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %82, i64 0, 2
%84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %83, i1 false)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %84)
store ptr %84, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
store ptr %84, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8
br label %_llgo_16
_llgo_16: ; preds = %_llgo_15, %_llgo_12
%85 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
%85 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8
%86 = load ptr, ptr @_llgo_Pointer, align 8
%87 = icmp eq ptr %86, null
br i1 %87, label %_llgo_17, label %_llgo_18
@@ -338,7 +330,7 @@ _llgo_17: ; preds = %_llgo_16
_llgo_18: ; preds = %_llgo_17, %_llgo_16
%89 = load ptr, ptr @_llgo_Pointer, align 8
%90 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
%90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]", align 8
%91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%92 = getelementptr ptr, ptr %91, i64 0
store ptr %90, ptr %92, align 8
@@ -361,11 +353,11 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16
%107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %104, 0
%108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %107, i64 2, 1
%109 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %108, i64 2, 2
%110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %109)
store ptr %110, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%111 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%112 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%113 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
%110 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %109)
store ptr %110, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%111 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%112 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%113 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8
%114 = icmp eq ptr %113, null
br i1 %114, label %_llgo_19, label %_llgo_20
@@ -382,12 +374,12 @@ _llgo_19: ; preds = %_llgo_18
%123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, i64 0, 2
%124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Func"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %119, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123, i1 false)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %124)
store ptr %124, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
store ptr %124, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8
br label %_llgo_20
_llgo_20: ; preds = %_llgo_19, %_llgo_18
%125 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
%126 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%125 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8
%126 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%128 = getelementptr ptr, ptr %127, i64 0
store ptr %126, ptr %128, align 8
@@ -410,10 +402,10 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
%143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %140, 0
%144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %143, i64 2, 1
%145 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %144, i64 2, 2
%146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %145)
store ptr %146, ptr @"main.struct$awGH2Wh33bS1v_s7SNAwKW27E20HcwiiPPzh9UA7QDs", align 8
%147 = load ptr, ptr @"main.struct$awGH2Wh33bS1v_s7SNAwKW27E20HcwiiPPzh9UA7QDs", align 8
%148 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %145)
store ptr %146, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$h0x5MUrZjI2t93KW7G5Ookzv6qIV0lh7-bP4KCXTtD4", align 8
%147 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$h0x5MUrZjI2t93KW7G5Ookzv6qIV0lh7-bP4KCXTtD4", align 8
%148 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%150 = getelementptr ptr, ptr %149, i64 0
store ptr %148, ptr %150, align 8
@@ -436,7 +428,7 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
%165 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %162, 0
%166 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %165, i64 2, 1
%167 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %166, i64 2, 2
%168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %167)
%168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %167)
%169 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 2 }, ptr %168, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%170 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
%171 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %170, i64 0
@@ -444,15 +436,15 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
%172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %170, 0
%173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 1, 1
%174 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173, i64 1, 2
%175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174)
store ptr %175, ptr @"main.struct$N1awC7qGapVTS_NFj1Q0jk6nCjATrIK-60oOEyDjabo", align 8
%176 = load ptr, ptr @"main.struct$N1awC7qGapVTS_NFj1Q0jk6nCjATrIK-60oOEyDjabo", align 8
%177 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
%178 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
%179 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
%175 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %174)
store ptr %175, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$sZkgOwzwSVW5_7o2czBO4vd0Y6GnzBmlznPz4599nqg", align 8
%176 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$sZkgOwzwSVW5_7o2czBO4vd0Y6GnzBmlznPz4599nqg", align 8
%177 = load ptr, ptr @"_llgo_func$JEZg2HNYvw8IAggzDgQI9QLqcvOvX0DMdttkifcZmV0", align 8
%178 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.struct$mkld3EWqBOn-24FyZ5FtegwU8xiSpI84vxQJqk56Bi4", align 8
%179 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8
%180 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %179, 1
%181 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %180, ptr @"main.(*future[main.Tuple[error]]).Then", 2
%182 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %181, ptr @"main.(*future[main.Tuple[error]]).Then", 3
%181 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %180, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]).Then", 2
%182 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %181, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.(*future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]).Then", 3
%183 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%184 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %183, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %182, ptr %184, align 8
@@ -460,12 +452,12 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
%186 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %185, i64 1, 1
%187 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %186, i64 1, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %176, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %187)
%188 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 25 }, i64 25, i64 24, i64 0, i64 1)
%188 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 72 }, i64 25, i64 24, i64 0, i64 1)
%189 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %188)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %189)
store ptr %189, ptr @"*_llgo_main.future[main.Tuple[error]]", align 8
%190 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
%191 = load ptr, ptr @"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0", align 8
store ptr %189, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.future[github.com/goplus/llgo/compiler/cl/_testrt/tpmethod.Tuple[error]]", align 8
%190 = load ptr, ptr @"_llgo_func$7nUTt2YVMXCmrXEy9bAXGeGHQ2qjM-ltFZOTJ7kc2oc", align 8
%191 = load ptr, ptr @"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0", align 8
%192 = icmp eq ptr %191, null
br i1 %192, label %_llgo_21, label %_llgo_22
@@ -477,8 +469,8 @@ _llgo_21: ; preds = %_llgo_20
%196 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %194, 0
%197 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %196, i64 1, 1
%198 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %197, i64 1, 2
%199 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %198)
store ptr %199, ptr @"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0", align 8
%199 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 51 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %198)
store ptr %199, ptr @"_llgo_iface$vZQIEKY9NTKV50wpjIW4TLdy5d2nWtc2Lxm3TTPFcc0", align 8
br label %_llgo_22
_llgo_22: ; preds = %_llgo_21, %_llgo_20

View File

@@ -1,15 +1,13 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/typalias'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/typalias"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1
@main.format = global [10 x i8] zeroinitializer, align 1
@"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/typalias.format" = global [10 x i8] zeroinitializer, align 1
@"github.com/goplus/llgo/compiler/cl/_testrt/typalias.init$guard" = global i1 false, align 1
define void @main.Print(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.Print"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 1
%2 = load i1, ptr %1, align 1
@@ -18,65 +16,59 @@ _llgo_0:
_llgo_1: ; preds = %_llgo_0
%3 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 0
%4 = load i32, ptr %3, align 4
call void (ptr, ...) @printf(ptr @main.format, i32 %4)
call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i32 %4)
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
define ptr @main._Cgo_ptr(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias._Cgo_ptr"(ptr %0) {
_llgo_0:
ret ptr %0
}
declare void @runtime.cgoUse(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @main._cgoCheckResult(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
declare void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias._cgoCheckResult"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.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/_testrt/typalias.init$guard", align 1
call void @syscall.init()
store i8 72, ptr @main.format, align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @main.format, i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @main.format, i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @main.format, i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @main.format, i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @main.format, i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @main.format, i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @main.format, i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @main.format, i64 9), align 1
store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 4), align 1
store i8 32, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 5), align 1
store i8 37, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 6), align 1
store i8 100, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 7), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 8), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.format", i64 9), align 1
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/typalias.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 ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%3 = getelementptr inbounds { i32, i1 }, ptr %2, i32 0, i32 0
%4 = getelementptr inbounds { i32, i1 }, ptr %2, i32 0, i32 1
store i32 100, ptr %3, align 4
store i1 true, ptr %4, align 1
call void @main.Print(ptr %2)
ret i32 0
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 0
%2 = getelementptr inbounds { i32, i1 }, ptr %0, i32 0, i32 1
store i32 100, ptr %1, align 4
store i1 true, ptr %2, align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/typalias.Print"(ptr %0)
ret void
}
declare void @printf(ptr, ...)
declare void @syscall.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)

View File

@@ -1,149 +1,141 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/typed'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/typed"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"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/typed.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
@_llgo_main.T = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testrt/typed", align 1
@2 = private unnamed_addr constant [1 x i8] c"T", align 1
@_llgo_string = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@_llgo_main.A = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A" = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [1 x i8] c"A", align 1
@_llgo_int = linkonce global ptr null, align 8
@"[2]_llgo_int" = linkonce global ptr null, align 8
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/typed.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/typed.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/typed.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/typed.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/typed.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_main.T, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %3, align 8
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr %3, 1
%6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, 0
%7 = load ptr, ptr @_llgo_main.T, align 8
%8 = icmp eq ptr %6, %7
br i1 %8, label %_llgo_1, label %_llgo_2
%0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %1, align 8
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, 0
%5 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8
%6 = icmp eq ptr %4, %5
br i1 %6, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, 1
%10 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %9, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %10)
%7 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, 1
%8 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %7, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, 0
%12 = load ptr, ptr @_llgo_string, align 8
%13 = icmp eq ptr %11, %12
br i1 %13, label %_llgo_3, label %_llgo_4
%9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, 0
%10 = load ptr, ptr @_llgo_string, align 8
%11 = icmp eq ptr %9, %10
br i1 %11, label %_llgo_3, label %_llgo_4
_llgo_2: ; preds = %_llgo_0
%14 = load ptr, ptr @_llgo_string, align 8
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 21 }, ptr %15, align 8
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %15, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17)
%12 = load ptr, ptr @_llgo_string, align 8
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 21 }, ptr %13, align 8
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %13, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %15)
unreachable
_llgo_3: ; preds = %_llgo_1
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, 1
%19 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %18, align 8
%20 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.String" %19, 0
%21 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %20, i1 true, 1
%16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, 1
%17 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %16, align 8
%18 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.String" %17, 0
%19 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %18, i1 true, 1
br label %_llgo_5
_llgo_4: ; preds = %_llgo_1
br label %_llgo_5
_llgo_5: ; preds = %_llgo_4, %_llgo_3
%22 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } [ %21, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%23 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %22, 0
%24 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %22, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %23)
%20 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } [ %19, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%21 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %20, 0
%22 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", i1 } %20, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %21)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %24)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %22)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%25 = alloca [2 x i64], align 8
call void @llvm.memset(ptr %25, i8 0, i64 16, i1 false)
%26 = getelementptr inbounds i64, ptr %25, i64 0
%27 = getelementptr inbounds i64, ptr %25, i64 1
store i64 1, ptr %26, align 4
store i64 2, ptr %27, align 4
%28 = load [2 x i64], ptr %25, align 4
%29 = load ptr, ptr @_llgo_main.A, align 8
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store [2 x i64] %28, ptr %30, align 4
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %29, 0
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %31, ptr %30, 1
%33 = alloca [2 x i64], align 8
call void @llvm.memset(ptr %33, i8 0, i64 16, i1 false)
%34 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %32, 0
%35 = load ptr, ptr @_llgo_main.A, align 8
%36 = icmp eq ptr %34, %35
br i1 %36, label %_llgo_6, label %_llgo_7
%23 = alloca [2 x i64], align 8
call void @llvm.memset(ptr %23, i8 0, i64 16, i1 false)
%24 = getelementptr inbounds i64, ptr %23, i64 0
%25 = getelementptr inbounds i64, ptr %23, i64 1
store i64 1, ptr %24, align 4
store i64 2, ptr %25, align 4
%26 = load [2 x i64], ptr %23, align 4
%27 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store [2 x i64] %26, ptr %28, align 4
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %27, 0
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr %28, 1
%31 = alloca [2 x i64], align 8
call void @llvm.memset(ptr %31, i8 0, i64 16, i1 false)
%32 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, 0
%33 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8
%34 = icmp eq ptr %32, %33
br i1 %34, label %_llgo_6, label %_llgo_7
_llgo_6: ; preds = %_llgo_5
%37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %32, 1
%38 = load [2 x i64], ptr %37, align 4
%39 = insertvalue { [2 x i64], i1 } undef, [2 x i64] %38, 0
%40 = insertvalue { [2 x i64], i1 } %39, i1 true, 1
%35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, 1
%36 = load [2 x i64], ptr %35, align 4
%37 = insertvalue { [2 x i64], i1 } undef, [2 x i64] %36, 0
%38 = insertvalue { [2 x i64], i1 } %37, i1 true, 1
br label %_llgo_8
_llgo_7: ; preds = %_llgo_5
br label %_llgo_8
_llgo_8: ; preds = %_llgo_7, %_llgo_6
%41 = phi { [2 x i64], i1 } [ %40, %_llgo_6 ], [ zeroinitializer, %_llgo_7 ]
%42 = extractvalue { [2 x i64], i1 } %41, 0
store [2 x i64] %42, ptr %33, align 4
%43 = extractvalue { [2 x i64], i1 } %41, 1
%44 = getelementptr inbounds i64, ptr %33, i64 0
%39 = phi { [2 x i64], i1 } [ %38, %_llgo_6 ], [ zeroinitializer, %_llgo_7 ]
%40 = extractvalue { [2 x i64], i1 } %39, 0
store [2 x i64] %40, ptr %31, align 4
%41 = extractvalue { [2 x i64], i1 } %39, 1
%42 = getelementptr inbounds i64, ptr %31, i64 0
%43 = load i64, ptr %42, align 4
%44 = getelementptr inbounds i64, ptr %31, i64 1
%45 = load i64, ptr %44, align 4
%46 = getelementptr inbounds i64, ptr %33, i64 1
%47 = load i64, ptr %46, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %43)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %45)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %47)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %43)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %41)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
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/typed.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, i64 24, i64 16, i64 0, i64 0)
%1 = load ptr, ptr @_llgo_main.T, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, i64 24, i64 16, i64 0, i64 0)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
store ptr %0, ptr @_llgo_main.T, align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.T", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -165,13 +157,13 @@ _llgo_5: ; preds = %_llgo_4
br label %_llgo_6
_llgo_6: ; preds = %_llgo_5, %_llgo_4
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 17, i64 16, i64 0, i64 0)
%8 = load ptr, ptr @_llgo_main.A, align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 17, i64 16, i64 0, i64 0)
%8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8
%9 = icmp eq ptr %8, null
br i1 %9, label %_llgo_7, label %_llgo_8
_llgo_7: ; preds = %_llgo_6
store ptr %7, ptr @_llgo_main.A, align 8
store ptr %7, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testrt/typed.A", align 8
br label %_llgo_8
_llgo_8: ; preds = %_llgo_7, %_llgo_6

View File

@@ -1,41 +1,33 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/unreachable'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/unreachable"
@"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/unreachable.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1
define void @main.foo() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.foo"() {
_llgo_0:
unreachable
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.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/_testrt/unreachable.init$guard", align 1
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/unreachable.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()
call void @main.foo()
%2 = call i32 (ptr, ...) @printf(ptr @0)
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testrt/unreachable.foo"()
%0 = call i32 (ptr, ...) @printf(ptr @0)
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)

View File

@@ -1,267 +1,259 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/unsafe'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/unsafe"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"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/unsafe.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"error", align 1
@_llgo_string = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [4 x i8] c"abc\00", align 1
@2 = private unnamed_addr constant [3 x i8] c"abc", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.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/unsafe.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testrt/unsafe.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/unsafe.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()
br i1 false, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%2 = load ptr, ptr @_llgo_string, align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %3, align 8
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %2, 0
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %4, ptr %3, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %5)
%0 = load ptr, ptr @_llgo_string, align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %1, align 8
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, ptr %1, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3)
unreachable
_llgo_2: ; preds = %_llgo_0
br i1 false, label %_llgo_3, label %_llgo_4
_llgo_3: ; preds = %_llgo_2
%6 = load ptr, ptr @_llgo_string, align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %7, align 8
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %6, 0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, ptr %7, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %9)
%4 = load ptr, ptr @_llgo_string, align 8
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %5, align 8
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %5, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %7)
unreachable
_llgo_4: ; preds = %_llgo_2
br i1 false, label %_llgo_5, label %_llgo_6
_llgo_5: ; preds = %_llgo_4
%10 = load ptr, ptr @_llgo_string, align 8
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %11, align 8
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %10, 0
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %12, ptr %11, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %13)
%8 = load ptr, ptr @_llgo_string, align 8
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %9, align 8
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %8, 0
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %9, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %11)
unreachable
_llgo_6: ; preds = %_llgo_4
br i1 false, label %_llgo_7, label %_llgo_8
_llgo_7: ; preds = %_llgo_6
%14 = load ptr, ptr @_llgo_string, align 8
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %15, align 8
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %15, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17)
%12 = load ptr, ptr @_llgo_string, align 8
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %13, align 8
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %13, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %15)
unreachable
_llgo_8: ; preds = %_llgo_6
br i1 false, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
%18 = load ptr, ptr @_llgo_string, align 8
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %19, align 8
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %18, 0
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %20, ptr %19, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %21)
%16 = load ptr, ptr @_llgo_string, align 8
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %17, align 8
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %16, 0
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %18, ptr %17, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19)
unreachable
_llgo_10: ; preds = %_llgo_8
br i1 false, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
%22 = load ptr, ptr @_llgo_string, align 8
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %23, align 8
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %22, 0
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %24, ptr %23, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %25)
%20 = load ptr, ptr @_llgo_string, align 8
%21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %21, align 8
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %20, 0
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %22, ptr %21, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %23)
unreachable
_llgo_12: ; preds = %_llgo_10
br i1 false, label %_llgo_13, label %_llgo_14
_llgo_13: ; preds = %_llgo_12
%26 = load ptr, ptr @_llgo_string, align 8
%27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %27, align 8
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %26, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr %27, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %29)
%24 = load ptr, ptr @_llgo_string, align 8
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %25, align 8
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %24, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr %25, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %27)
unreachable
_llgo_14: ; preds = %_llgo_12
br i1 false, label %_llgo_15, label %_llgo_16
_llgo_15: ; preds = %_llgo_14
%30 = load ptr, ptr @_llgo_string, align 8
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %31, align 8
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %30, 0
%33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %32, ptr %31, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %33)
%28 = load ptr, ptr @_llgo_string, align 8
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %29, align 8
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %28, 0
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %30, ptr %29, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %31)
unreachable
_llgo_16: ; preds = %_llgo_14
br i1 false, label %_llgo_17, label %_llgo_18
_llgo_17: ; preds = %_llgo_16
%34 = load ptr, ptr @_llgo_string, align 8
%35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %35, align 8
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %34, 0
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %36, ptr %35, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %37)
%32 = load ptr, ptr @_llgo_string, align 8
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %33, align 8
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %32, 0
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %34, ptr %33, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %35)
unreachable
_llgo_18: ; preds = %_llgo_16
br i1 false, label %_llgo_19, label %_llgo_20
_llgo_19: ; preds = %_llgo_18
%38 = load ptr, ptr @_llgo_string, align 8
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %39, align 8
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %38, 0
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %41)
%36 = load ptr, ptr @_llgo_string, align 8
%37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %37, align 8
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %36, 0
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %38, ptr %37, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %39)
unreachable
_llgo_20: ; preds = %_llgo_18
%42 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 3 })
%43 = xor i1 %42, true
br i1 %43, label %_llgo_21, label %_llgo_22
%40 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 3 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 3 })
%41 = xor i1 %40, true
br i1 %41, label %_llgo_21, label %_llgo_22
_llgo_21: ; preds = %_llgo_20
%44 = load ptr, ptr @_llgo_string, align 8
%45 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %45, align 8
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %44, 0
%47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %46, ptr %45, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %47)
%42 = load ptr, ptr @_llgo_string, align 8
%43 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %43, align 8
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %42, 0
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44, ptr %43, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %45)
unreachable
_llgo_22: ; preds = %_llgo_20
%48 = load i8, ptr @1, align 1
%49 = icmp ne i8 %48, 97
br i1 %49, label %_llgo_23, label %_llgo_26
%46 = load i8, ptr @1, align 1
%47 = icmp ne i8 %46, 97
br i1 %47, label %_llgo_23, label %_llgo_26
_llgo_23: ; preds = %_llgo_25, %_llgo_26, %_llgo_22
%50 = load ptr, ptr @_llgo_string, align 8
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %51, align 8
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %50, 0
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %52, ptr %51, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %53)
%48 = load ptr, ptr @_llgo_string, align 8
%49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %49, align 8
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %48, 0
%51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %50, ptr %49, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %51)
unreachable
_llgo_24: ; preds = %_llgo_25
%54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%55 = getelementptr inbounds i64, ptr %54, i64 0
%56 = getelementptr inbounds i64, ptr %54, i64 1
store i64 1, ptr %55, align 4
store i64 2, ptr %56, align 4
%57 = getelementptr inbounds i64, ptr %54, i64 0
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %57, 0
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, i64 2, 1
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 2, 2
%61 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 0
%62 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 1
%63 = icmp sge i64 0, %62
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %63)
%64 = getelementptr inbounds i64, ptr %61, i64 0
%65 = load i64, ptr %64, align 4
%66 = icmp ne i64 %65, 1
br i1 %66, label %_llgo_27, label %_llgo_29
%52 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%53 = getelementptr inbounds i64, ptr %52, i64 0
%54 = getelementptr inbounds i64, ptr %52, i64 1
store i64 1, ptr %53, align 4
store i64 2, ptr %54, align 4
%55 = getelementptr inbounds i64, ptr %52, i64 0
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %55, 0
%57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56, i64 2, 1
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %57, i64 2, 2
%59 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 0
%60 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 1
%61 = icmp sge i64 0, %60
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %61)
%62 = getelementptr inbounds i64, ptr %59, i64 0
%63 = load i64, ptr %62, align 4
%64 = icmp ne i64 %63, 1
br i1 %64, label %_llgo_27, label %_llgo_29
_llgo_25: ; preds = %_llgo_26
%67 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 2), align 1
%68 = icmp ne i8 %67, 99
br i1 %68, label %_llgo_23, label %_llgo_24
%65 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 2), align 1
%66 = icmp ne i8 %65, 99
br i1 %66, label %_llgo_23, label %_llgo_24
_llgo_26: ; preds = %_llgo_22
%69 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 1), align 1
%70 = icmp ne i8 %69, 98
br i1 %70, label %_llgo_23, label %_llgo_25
%67 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 1), align 1
%68 = icmp ne i8 %67, 98
br i1 %68, label %_llgo_23, label %_llgo_25
_llgo_27: ; preds = %_llgo_29, %_llgo_24
%71 = load ptr, ptr @_llgo_string, align 8
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %72, align 8
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %71, 0
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %73, ptr %72, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %74)
%69 = load ptr, ptr @_llgo_string, align 8
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %70, align 8
%71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %71, ptr %70, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %72)
unreachable
_llgo_28: ; preds = %_llgo_29
%75 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 0
%76 = load i64, ptr %75, align 4
%77 = icmp ne i64 %76, 1
br i1 %77, label %_llgo_30, label %_llgo_31
%73 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 0
%74 = load i64, ptr %73, align 4
%75 = icmp ne i64 %74, 1
br i1 %75, label %_llgo_30, label %_llgo_31
_llgo_29: ; preds = %_llgo_24
%78 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 0
%79 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, 1
%80 = icmp sge i64 1, %79
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %80)
%81 = getelementptr inbounds i64, ptr %78, i64 1
%82 = load i64, ptr %81, align 4
%83 = icmp ne i64 %82, 2
br i1 %83, label %_llgo_27, label %_llgo_28
%76 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 0
%77 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %58, 1
%78 = icmp sge i64 1, %77
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %78)
%79 = getelementptr inbounds i64, ptr %76, i64 1
%80 = load i64, ptr %79, align 4
%81 = icmp ne i64 %80, 2
br i1 %81, label %_llgo_27, label %_llgo_28
_llgo_30: ; preds = %_llgo_28
%84 = load ptr, ptr @_llgo_string, align 8
%85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %85, align 8
%86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %84, 0
%87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %86, ptr %85, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %87)
%82 = load ptr, ptr @_llgo_string, align 8
%83 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %83, align 8
%84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %82, 0
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %84, ptr %83, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %85)
unreachable
_llgo_31: ; preds = %_llgo_28
br i1 icmp ne (i64 ptrtoint (ptr getelementptr (i8, ptr null, i64 1) to i64), i64 1), label %_llgo_32, label %_llgo_33
_llgo_32: ; preds = %_llgo_31
%88 = load ptr, ptr @_llgo_string, align 8
%89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %89, align 8
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %88, 0
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %90, ptr %89, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %91)
%86 = load ptr, ptr @_llgo_string, align 8
%87 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %87, align 8
%88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %86, 0
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %88, ptr %87, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %89)
unreachable
_llgo_33: ; preds = %_llgo_31
ret i32 0
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/unsafe.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_string, align 8
%1 = icmp eq ptr %0, null