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,20 +1,18 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/allocinloop'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/allocinloop"
%"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/_testgo/allocinloop.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
define i64 @main.Foo(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
_llgo_0:
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, 1
ret i64 %1
}
define void @main.Test() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Test"() {
_llgo_0:
br label %_llgo_1
@@ -25,7 +23,7 @@ _llgo_1: ; preds = %_llgo_2, %_llgo_0
br i1 %2, label %_llgo_2, label %_llgo_3
_llgo_2: ; preds = %_llgo_1
%3 = call i64 @main.Foo(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 })
%3 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 })
%4 = add i64 %0, %3
%5 = add i64 %1, 1
br label %_llgo_1
@@ -36,31 +34,25 @@ _llgo_3: ; preds = %_llgo_1
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.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/_testgo/allocinloop.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/_testgo/allocinloop.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.Test()
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/allocinloop.Test"()
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,5 +1,5 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/cgobasic'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/cgobasic"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@@ -14,16 +14,14 @@ source_filename = "main"
@_cgo_217b74f897b2_Cfunc_puts = external global i8, align 1
@_cgo_217b74f897b2_Cfunc_sin = external global i8, align 1
@_cgo_217b74f897b2_Cfunc_sqrt = external global i8, align 1
@main._cgo_217b74f897b2_Cfunc__Cmalloc = global ptr null, align 8
@main._cgo_217b74f897b2_Cfunc_cos = global ptr null, align 8
@main._cgo_217b74f897b2_Cfunc_free = global ptr null, align 8
@main._cgo_217b74f897b2_Cfunc_log = global ptr null, align 8
@main._cgo_217b74f897b2_Cfunc_puts = global ptr null, align 8
@main._cgo_217b74f897b2_Cfunc_sin = global ptr null, align 8
@main._cgo_217b74f897b2_Cfunc_sqrt = global ptr null, align 8
@"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/_testgo/cgobasic._cgo_217b74f897b2_Cfunc__Cmalloc" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_cos" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_free" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_log" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_puts" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_sin" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_sqrt" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [13 x i8] c"Hello, World!", align 1
@1 = private unnamed_addr constant [29 x i8] c"Converted back to Go string: ", align 1
@2 = private unnamed_addr constant [23 x i8] c"Length-limited string: ", align 1
@@ -37,239 +35,235 @@ source_filename = "main"
@"[]_llgo_byte" = linkonce global ptr null, align 8
@_llgo_Pointer = linkonce global ptr null, align 8
define double @main._Cfunc_cos(double %0) {
define double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_cos"(double %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%2 = load ptr, ptr @main._cgo_217b74f897b2_Cfunc_cos, align 8
%2 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_cos", align 8
%3 = load ptr, ptr %2, align 8
%4 = call double %3(double %0)
ret double %4
}
define [0 x i8] @main._Cfunc_free(ptr %0) {
define [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_free"(ptr %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%2 = load ptr, ptr @main._cgo_217b74f897b2_Cfunc_free, align 8
%2 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_free", align 8
%3 = load ptr, ptr %2, align 8
%4 = call [0 x i8] %3(ptr %0)
ret [0 x i8] %4
}
define double @main._Cfunc_log(double %0) {
define double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_log"(double %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%2 = load ptr, ptr @main._cgo_217b74f897b2_Cfunc_log, align 8
%2 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_log", align 8
%3 = load ptr, ptr %2, align 8
%4 = call double %3(double %0)
ret double %4
}
define i32 @main._Cfunc_puts(ptr %0) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_puts"(ptr %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%2 = load ptr, ptr @main._cgo_217b74f897b2_Cfunc_puts, align 8
%2 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_puts", align 8
%3 = load ptr, ptr %2, align 8
%4 = call i32 %3(ptr %0)
ret i32 %4
}
define double @main._Cfunc_sin(double %0) {
define double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_sin"(double %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%2 = load ptr, ptr @main._cgo_217b74f897b2_Cfunc_sin, align 8
%2 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_sin", align 8
%3 = load ptr, ptr %2, align 8
%4 = call double %3(double %0)
ret double %4
}
define double @main._Cfunc_sqrt(double %0) {
define double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_sqrt"(double %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%2 = load ptr, ptr @main._cgo_217b74f897b2_Cfunc_sqrt, align 8
%2 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_sqrt", align 8
%3 = load ptr, ptr %2, align 8
%4 = call double %3(double %0)
ret double %4
}
define ptr @main._Cgo_ptr(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._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/_testgo/cgobasic._cgoCheckResult"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.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/_testgo/cgobasic.init$guard", align 1
call void @syscall.init()
call void @fmt.init()
call void @"main.init$after"()
store ptr @_cgo_217b74f897b2_Cfunc_cos, ptr @main._cgo_217b74f897b2_Cfunc_cos, align 8
store ptr @_cgo_217b74f897b2_Cfunc_free, ptr @main._cgo_217b74f897b2_Cfunc_free, align 8
store ptr @_cgo_217b74f897b2_Cfunc_log, ptr @main._cgo_217b74f897b2_Cfunc_log, align 8
store ptr @_cgo_217b74f897b2_Cfunc_puts, ptr @main._cgo_217b74f897b2_Cfunc_puts, align 8
store ptr @_cgo_217b74f897b2_Cfunc_sin, ptr @main._cgo_217b74f897b2_Cfunc_sin, align 8
store ptr @_cgo_217b74f897b2_Cfunc_sqrt, ptr @main._cgo_217b74f897b2_Cfunc_sqrt, align 8
store ptr @_cgo_217b74f897b2_Cfunc__Cmalloc, ptr @main._cgo_217b74f897b2_Cfunc__Cmalloc, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.init$after"()
store ptr @_cgo_217b74f897b2_Cfunc_cos, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_cos", align 8
store ptr @_cgo_217b74f897b2_Cfunc_free, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_free", align 8
store ptr @_cgo_217b74f897b2_Cfunc_log, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_log", align 8
store ptr @_cgo_217b74f897b2_Cfunc_puts, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_puts", align 8
store ptr @_cgo_217b74f897b2_Cfunc_sin, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_sin", align 8
store ptr @_cgo_217b74f897b2_Cfunc_sqrt, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc_sqrt", align 8
store ptr @_cgo_217b74f897b2_Cfunc__Cmalloc, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._cgo_217b74f897b2_Cfunc__Cmalloc", 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/_testgo/cgobasic.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.CString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 13 })
store ptr %3, ptr %2, align 8
%4 = load ptr, ptr %2, align 8
%5 = call i32 @main._Cfunc_puts(ptr %4)
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%8 = getelementptr inbounds i8, ptr %7, i64 0
store i8 65, ptr %8, align 1
%9 = getelementptr inbounds i8, ptr %7, i64 1
store i8 66, ptr %9, align 1
%10 = getelementptr inbounds i8, ptr %7, i64 2
store i8 67, ptr %10, align 1
%11 = getelementptr inbounds i8, ptr %7, i64 3
store i8 68, ptr %11, align 1
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %7, 0
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %12, i64 4, 1
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13, i64 4, 2
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %14, ptr %6, align 8
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%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 %6, ptr %17, align 8
%18 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %16, 1
%19 = extractvalue { ptr, ptr } %18, 1
%20 = extractvalue { ptr, ptr } %18, 0
%21 = call ptr %20(ptr %19)
store ptr %21, ptr %15, align 8
%22 = load ptr, ptr %2, align 8
%23 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.GoString"(ptr %22)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.CString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 13 })
store ptr %1, ptr %0, align 8
%2 = load ptr, ptr %0, align 8
%3 = call i32 @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_puts"(ptr %2)
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%6 = getelementptr inbounds i8, ptr %5, i64 0
store i8 65, ptr %6, align 1
%7 = getelementptr inbounds i8, ptr %5, i64 1
store i8 66, ptr %7, align 1
%8 = getelementptr inbounds i8, ptr %5, i64 2
store i8 67, ptr %8, align 1
%9 = getelementptr inbounds i8, ptr %5, i64 3
store i8 68, ptr %9, align 1
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %5, 0
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 4, 1
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11, i64 4, 2
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %12, ptr %4, align 8
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%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 %4, ptr %15, align 8
%16 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$1", ptr undef }, ptr %14, 1
%17 = extractvalue { ptr, ptr } %16, 1
%18 = extractvalue { ptr, ptr } %16, 0
%19 = call ptr %18(ptr %17)
store ptr %19, ptr %13, align 8
%20 = load ptr, ptr %0, align 8
%21 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.GoString"(ptr %20)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 29 })
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" %21)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%22 = load ptr, ptr %0, align 8
%23 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.GoStringN"(ptr %22, i32 5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 23 })
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" %23)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%24 = load ptr, ptr %2, align 8
%25 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/runtime/internal/runtime.GoStringN"(ptr %24, i32 5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 23 })
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" %25)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%27 = getelementptr inbounds { ptr }, ptr %26, i32 0, i32 0
store ptr %15, ptr %27, align 8
%28 = insertvalue { ptr, ptr } { ptr @"main.main$2", ptr undef }, ptr %26, 1
%29 = extractvalue { ptr, ptr } %28, 1
%30 = extractvalue { ptr, ptr } %28, 0
%31 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30(ptr %29)
%24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%25 = getelementptr inbounds { ptr }, ptr %24, i32 0, i32 0
store ptr %13, ptr %25, align 8
%26 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$2", ptr undef }, ptr %24, 1
%27 = extractvalue { ptr, ptr } %26, 1
%28 = extractvalue { ptr, ptr } %26, 0
%29 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28(ptr %27)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 33 })
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" %31)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%32 = call double @main._Cfunc_sqrt(double 2.000000e+00)
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%34 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %33, i64 0
%35 = load ptr, ptr @_llgo_float64, 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 inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %37, ptr %34, align 8
%38 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %33, i64 1
%39 = load ptr, ptr @_llgo_float64, align 8
%40 = bitcast double %32 to i64
%41 = inttoptr i64 %40 to ptr
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %39, 0
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, ptr %41, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %43, ptr %38, align 8
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %33, 0
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 2, 1
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 2, 2
%47 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 14 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46)
%48 = call double @main._Cfunc_sin(double 2.000000e+00)
%49 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%50 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %49, i64 0
%51 = load ptr, ptr @_llgo_float64, align 8
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %51, 0
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %52, ptr inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %53, ptr %50, align 8
%54 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %49, i64 1
%55 = load ptr, ptr @_llgo_float64, align 8
%56 = bitcast double %48 to i64
%57 = inttoptr i64 %56 to ptr
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %55, 0
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %58, ptr %57, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %59, ptr %54, align 8
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %49, 0
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 2, 1
%62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61, i64 2, 2
%63 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 13 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %62)
%64 = call double @main._Cfunc_cos(double 2.000000e+00)
%65 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%66 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %65, i64 0
%67 = load ptr, ptr @_llgo_float64, align 8
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %67, 0
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %68, ptr inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %69, ptr %66, align 8
%70 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %65, i64 1
%71 = load ptr, ptr @_llgo_float64, align 8
%72 = bitcast double %64 to i64
%73 = inttoptr i64 %72 to ptr
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %71, 0
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %74, ptr %73, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %75, ptr %70, align 8
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %65, 0
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76, i64 2, 1
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %77, i64 2, 2
%79 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 13 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78)
%80 = call double @main._Cfunc_log(double 2.000000e+00)
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%82 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %81, i64 0
%83 = load ptr, ptr @_llgo_float64, align 8
%84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %83, 0
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %84, ptr inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %85, ptr %82, align 8
%86 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %81, i64 1
%87 = load ptr, ptr @_llgo_float64, align 8
%88 = bitcast double %80 to i64
%89 = inttoptr i64 %88 to ptr
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %87, 0
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %90, ptr %89, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %91, ptr %86, align 8
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %81, 0
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 2, 1
%94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, i64 2, 2
%95 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 13 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94)
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%97 = getelementptr inbounds { ptr }, ptr %96, i32 0, i32 0
store ptr %2, ptr %97, align 8
%98 = insertvalue { ptr, ptr } { ptr @"main.main$3", ptr undef }, ptr %96, 1
%99 = extractvalue { ptr, ptr } %98, 1
%100 = extractvalue { ptr, ptr } %98, 0
call void %100(ptr %99)
%101 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%102 = getelementptr inbounds { ptr }, ptr %101, i32 0, i32 0
store ptr %15, ptr %102, align 8
%103 = insertvalue { ptr, ptr } { ptr @"main.main$4", ptr undef }, ptr %101, 1
%104 = extractvalue { ptr, ptr } %103, 1
%105 = extractvalue { ptr, ptr } %103, 0
call void %105(ptr %104)
ret i32 0
%30 = call double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_sqrt"(double 2.000000e+00)
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%32 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %31, i64 0
%33 = load ptr, ptr @_llgo_float64, 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 inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %35, ptr %32, align 8
%36 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %31, i64 1
%37 = load ptr, ptr @_llgo_float64, align 8
%38 = bitcast double %30 to i64
%39 = inttoptr i64 %38 to ptr
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %37, 0
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %40, ptr %39, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %41, ptr %36, align 8
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %31, 0
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42, i64 2, 1
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43, i64 2, 2
%45 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 14 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44)
%46 = call double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_sin"(double 2.000000e+00)
%47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%48 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %47, i64 0
%49 = load ptr, ptr @_llgo_float64, align 8
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %49, 0
%51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %50, ptr inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %51, ptr %48, align 8
%52 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %47, i64 1
%53 = load ptr, ptr @_llgo_float64, align 8
%54 = bitcast double %46 to i64
%55 = inttoptr i64 %54 to ptr
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %53, 0
%57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %56, ptr %55, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %57, ptr %52, align 8
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %47, 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 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 13 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60)
%62 = call double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_cos"(double 2.000000e+00)
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%64 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %63, i64 0
%65 = load ptr, ptr @_llgo_float64, align 8
%66 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %65, 0
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %66, ptr inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %67, ptr %64, align 8
%68 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %63, i64 1
%69 = load ptr, ptr @_llgo_float64, align 8
%70 = bitcast double %62 to i64
%71 = inttoptr i64 %70 to ptr
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %69, 0
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %72, ptr %71, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %73, ptr %68, align 8
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %63, 0
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 2, 1
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 2
%77 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 13 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76)
%78 = call double @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_log"(double 2.000000e+00)
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%80 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %79, i64 0
%81 = load ptr, ptr @_llgo_float64, align 8
%82 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %81, 0
%83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %82, ptr inttoptr (i64 4611686018427387904 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %83, ptr %80, align 8
%84 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %79, i64 1
%85 = load ptr, ptr @_llgo_float64, align 8
%86 = bitcast double %78 to i64
%87 = inttoptr i64 %86 to ptr
%88 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %85, 0
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %88, ptr %87, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %89, ptr %84, align 8
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %79, 0
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %90, i64 2, 1
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %91, i64 2, 2
%93 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 13 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92)
%94 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%95 = getelementptr inbounds { ptr }, ptr %94, i32 0, i32 0
store ptr %0, ptr %95, align 8
%96 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$3", ptr undef }, ptr %94, 1
%97 = extractvalue { ptr, ptr } %96, 1
%98 = extractvalue { ptr, ptr } %96, 0
call void %98(ptr %97)
%99 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%100 = getelementptr inbounds { ptr }, ptr %99, i32 0, i32 0
store ptr %13, ptr %100, align 8
%101 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$4", ptr undef }, ptr %99, 1
%102 = extractvalue { ptr, ptr } %101, 1
%103 = extractvalue { ptr, ptr } %101, 0
call void %103(ptr %102)
ret void
}
define ptr @"main.main$1"(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$1"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -284,7 +278,7 @@ _llgo_0:
ret ptr %9
}
define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.main$2"(ptr %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$2"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -296,7 +290,7 @@ _llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7
}
define void @"main.main$3"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$3"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -304,11 +298,11 @@ _llgo_0:
%4 = load ptr, ptr @_llgo_Pointer, 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 %3, 1
%7 = call [0 x i8] @main._Cfunc_free(ptr %3)
%7 = call [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_free"(ptr %3)
ret void
}
define void @"main.main$4"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.main$4"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -316,7 +310,7 @@ _llgo_0:
%4 = load ptr, ptr @_llgo_Pointer, 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 %3, 1
%7 = call [0 x i8] @main._Cfunc_free(ptr %3)
%7 = call [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic._Cfunc_free"(ptr %3)
ret void
}
@@ -328,8 +322,6 @@ declare void @syscall.init()
declare void @fmt.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.CString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
@@ -344,7 +336,7 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/g
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice")
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/cgobasic.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_float64, align 8
%1 = icmp eq ptr %0, null

View File

@@ -1,132 +1,126 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles"
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%main._Ctype_struct___3 = type { i32 }
%main._Ctype_struct___4 = type { i32, i32 }
%main._Ctype_struct___0 = type { i32, i32, i32 }
%main._Ctype_struct___1 = type { i32, i32, i32, i32 }
%main._Ctype_struct___2 = type { i32, i32, i32, i32, i32 }
%"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___3" = type { i32 }
%"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___4" = type { i32, i32 }
%"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___0" = type { i32, i32, i32 }
%"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___1" = type { i32, i32, i32, i32 }
%"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___2" = type { i32, i32, i32, i32, i32 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@"github.com/goplus/llgo/runtime/internal/runtime.cgoAlwaysFalse" = external global i1, align 1
@_cgo_023ff89410ef_Cfunc_test_structs = external global i8, align 1
@main._cgo_023ff89410ef_Cfunc_test_structs = global ptr null, align 8
@"main.init$guard" = global i1 false, align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@_llgo_main._Ctype_int = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._cgo_023ff89410ef_Cfunc_test_structs" = global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_int" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles", align 1
@1 = private unnamed_addr constant [10 x i8] c"_Ctype_int", align 1
@_llgo_int32 = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [19 x i8] c"test_structs failed", align 1
@_llgo_string = linkonce global ptr null, align 8
define i32 @main._Cfunc_test_structs(ptr %0, ptr %1, ptr %2, ptr %3, ptr %4) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Cfunc_test_structs"(ptr %0, ptr %1, ptr %2, ptr %3, ptr %4) {
_llgo_0:
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%6 = load ptr, ptr @main._cgo_023ff89410ef_Cfunc_test_structs, align 8
%6 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._cgo_023ff89410ef_Cfunc_test_structs", align 8
%7 = load ptr, ptr %6, align 8
%8 = call i32 %7(ptr %0, ptr %1, ptr %2, ptr %3, ptr %4)
ret i32 %8
}
define ptr @main._Cgo_ptr(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._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/_testgo/cgocfiles._cgoCheckResult"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles.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/_testgo/cgocfiles.init$guard", align 1
call void @syscall.init()
call void @fmt.init()
call void @"main.init$after"()
store ptr @_cgo_023ff89410ef_Cfunc_test_structs, ptr @main._cgo_023ff89410ef_Cfunc_test_structs, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles.init$after"()
store ptr @_cgo_023ff89410ef_Cfunc_test_structs, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._cgo_023ff89410ef_Cfunc_test_structs", 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/_testgo/cgocfiles.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 %main._Ctype_struct___3, ptr %2, i32 0, i32 0
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___3", ptr %0, i32 0, i32 0
store i32 1, ptr %1, align 4
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___4", ptr %2, i32 0, i32 0
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___4", ptr %2, i32 0, i32 1
store i32 1, ptr %3, align 4
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%5 = getelementptr inbounds %main._Ctype_struct___4, ptr %4, i32 0, i32 0
%6 = getelementptr inbounds %main._Ctype_struct___4, ptr %4, i32 0, i32 1
store i32 1, ptr %5, align 4
store i32 2, ptr %6, align 4
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 12)
%8 = getelementptr inbounds %main._Ctype_struct___0, ptr %7, i32 0, i32 0
%9 = getelementptr inbounds %main._Ctype_struct___0, ptr %7, i32 0, i32 1
%10 = getelementptr inbounds %main._Ctype_struct___0, ptr %7, i32 0, i32 2
store i32 1, ptr %8, align 4
store i32 2, ptr %9, align 4
store i32 3, ptr %10, align 4
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%12 = getelementptr inbounds %main._Ctype_struct___1, ptr %11, i32 0, i32 0
%13 = getelementptr inbounds %main._Ctype_struct___1, ptr %11, i32 0, i32 1
%14 = getelementptr inbounds %main._Ctype_struct___1, ptr %11, i32 0, i32 2
%15 = getelementptr inbounds %main._Ctype_struct___1, ptr %11, i32 0, i32 3
store i32 1, ptr %12, align 4
store i32 2, ptr %13, align 4
store i32 3, ptr %14, align 4
store i32 4, ptr %15, align 4
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 20)
%17 = getelementptr inbounds %main._Ctype_struct___2, ptr %16, i32 0, i32 0
%18 = getelementptr inbounds %main._Ctype_struct___2, ptr %16, i32 0, i32 1
%19 = getelementptr inbounds %main._Ctype_struct___2, ptr %16, i32 0, i32 2
%20 = getelementptr inbounds %main._Ctype_struct___2, ptr %16, i32 0, i32 3
%21 = getelementptr inbounds %main._Ctype_struct___2, ptr %16, i32 0, i32 4
store i32 1, ptr %17, align 4
store i32 2, ptr %18, align 4
store i32 3, ptr %19, align 4
store i32 4, ptr %20, align 4
store i32 5, ptr %21, align 4
%22 = call i32 @main._Cfunc_test_structs(ptr %2, ptr %4, ptr %7, ptr %11, ptr %16)
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%24 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %23, i64 0
%25 = load ptr, ptr @_llgo_main._Ctype_int, align 8
%26 = sext i32 %22 to i64
%27 = inttoptr i64 %26 to ptr
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %25, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %28, ptr %27, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %29, ptr %24, align 8
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %23, 0
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 1, 1
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31, i64 1, 2
%33 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Println(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %32)
%34 = icmp ne i32 %22, 35
br i1 %34, label %_llgo_1, label %_llgo_2
store i32 2, ptr %4, align 4
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 12)
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___0", ptr %5, i32 0, i32 0
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___0", ptr %5, i32 0, i32 1
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___0", ptr %5, i32 0, i32 2
store i32 1, ptr %6, align 4
store i32 2, ptr %7, align 4
store i32 3, ptr %8, align 4
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___1", ptr %9, i32 0, i32 0
%11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___1", ptr %9, i32 0, i32 1
%12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___1", ptr %9, i32 0, i32 2
%13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___1", ptr %9, i32 0, i32 3
store i32 1, ptr %10, align 4
store i32 2, ptr %11, align 4
store i32 3, ptr %12, align 4
store i32 4, ptr %13, align 4
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 20)
%15 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___2", ptr %14, i32 0, i32 0
%16 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___2", ptr %14, i32 0, i32 1
%17 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___2", ptr %14, i32 0, i32 2
%18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___2", ptr %14, i32 0, i32 3
%19 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_struct___2", ptr %14, i32 0, i32 4
store i32 1, ptr %15, align 4
store i32 2, ptr %16, align 4
store i32 3, ptr %17, align 4
store i32 4, ptr %18, align 4
store i32 5, ptr %19, align 4
%20 = call i32 @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Cfunc_test_structs"(ptr %0, ptr %2, ptr %5, ptr %9, ptr %14)
%21 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%22 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %21, i64 0
%23 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_int", align 8
%24 = sext i32 %20 to i64
%25 = inttoptr i64 %24 to ptr
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %23, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr %25, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %27, ptr %22, align 8
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28, i64 1, 1
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 1, 2
%31 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @fmt.Println(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30)
%32 = icmp ne i32 %20, 35
br i1 %32, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%35 = load ptr, ptr @_llgo_string, align 8
%36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 19 }, ptr %36, align 8
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %35, 0
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %37, ptr %36, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %38)
%33 = load ptr, ptr @_llgo_string, align 8
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 19 }, ptr %34, align 8
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %33, 0
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %35, ptr %34, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %36)
unreachable
_llgo_2: ; preds = %_llgo_0
ret i32 0
ret void
}
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
@@ -135,12 +129,10 @@ declare void @syscall.init()
declare void @fmt.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles.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 10 }, i64 5, i64 4, i64 0, i64 0)
store ptr %0, ptr @_llgo_main._Ctype_int, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 10 }, i64 5, i64 4, i64 0, i64 0)
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/cgocfiles._Ctype_int", align 8
%1 = load ptr, ptr @_llgo_int32, align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2

View File

@@ -1,52 +1,46 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/closure'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/closure"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.T = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/closure.T" = 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/_testgo/closure.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [3 x i8] c"env", align 1
@1 = private unnamed_addr constant [4 x i8] c"func", align 1
@2 = private unnamed_addr constant [7 x i8] c"closure", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/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/_testgo/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/_testgo/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()
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }, 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$2", ptr undef }, ptr %3, 1
%6 = alloca %main.T, align 8
store { ptr, ptr } %5, ptr %6, align 8
%7 = load %main.T, ptr %6, align 8
call void @"__llgo_stub.main.main$1"(ptr null, i64 100)
%8 = extractvalue %main.T %7, 1
%9 = extractvalue %main.T %7, 0
call void %9(ptr %8, i64 200)
ret i32 0
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }, 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/_testgo/closure.main$2", ptr undef }, ptr %1, 1
%4 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T", align 8
store { ptr, ptr } %3, ptr %4, align 8
%5 = load %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T", ptr %4, align 8
call void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(ptr null, i64 100)
%6 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T" %5, 1
%7 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/closure.T" %5, 0
call void %7(ptr %6, i64 200)
ret void
}
define void @"main.main$1"(i64 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(i64 %0) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
@@ -55,7 +49,7 @@ _llgo_0:
ret void
}
define void @"main.main$2"(ptr %0, i64 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$2"(ptr %0, i64 %1) {
_llgo_0:
%2 = load { ptr }, ptr %0, align 8
%3 = extractvalue { ptr } %2, 0
@@ -69,13 +63,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$1"(ptr %0, i64 %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(ptr %0, i64 %1) {
_llgo_0:
tail call void @"main.main$1"(i64 %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testgo/closure.main$1"(i64 %1)
ret void
}

View File

@@ -1,59 +1,53 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/closure2'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/closure2"
%"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/_testgo/closure2.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [7 x i8] c"closure", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.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/_testgo/closure2.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/_testgo/closure2.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 1, 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 = extractvalue { ptr, ptr } %5, 1
%7 = extractvalue { ptr, ptr } %5, 0
%8 = call { ptr, ptr } %7(ptr %6, i64 1)
%9 = extractvalue { ptr, ptr } %8, 1
%10 = extractvalue { ptr, ptr } %8, 0
call void %10(ptr %9, i64 2)
ret i32 0
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store i64 1, 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/_testgo/closure2.main$1", ptr undef }, ptr %1, 1
%4 = extractvalue { ptr, ptr } %3, 1
%5 = extractvalue { ptr, ptr } %3, 0
%6 = call { ptr, ptr } %5(ptr %4, i64 1)
%7 = extractvalue { ptr, ptr } %6, 1
%8 = extractvalue { ptr, ptr } %6, 0
call void %8(ptr %7, i64 2)
ret void
}
define { ptr, ptr } @"main.main$1"(ptr %0, i64 %1) {
define { ptr, ptr } @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1"(ptr %0, i64 %1) {
_llgo_0:
%2 = load { ptr }, ptr %0, align 8
%3 = extractvalue { ptr } %2, 0
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%5 = getelementptr inbounds { ptr }, ptr %4, i32 0, i32 0
store ptr %3, ptr %5, align 8
%6 = insertvalue { ptr, ptr } { ptr @"main.main$1$1", ptr undef }, ptr %4, 1
%6 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1$1", ptr undef }, ptr %4, 1
ret { ptr, ptr } %6
}
define void @"main.main$1$1"(ptr %0, i64 %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/closure2.main$1$1"(ptr %0, i64 %1) {
_llgo_0:
%2 = load { ptr }, ptr %0, align 8
%3 = extractvalue { ptr } %2, 0
@@ -67,8 +61,6 @@ _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)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)

View File

@@ -1,29 +1,23 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/constconv'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/constconv"
@"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/_testgo/constconv.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/constconv.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/constconv.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/_testgo/constconv.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/_testgo/constconv.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 1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 1)
@@ -32,11 +26,9 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 11)
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.PrintUint"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,22 +1,22 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/equal'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/equal"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%main.T = type { i64, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.eface" }
%"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" = type { i64, i64, %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.eface" }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%main.N = type {}
%"github.com/goplus/llgo/compiler/cl/_testgo/equal.N" = type {}
%"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/_testgo/equal.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [6 x i8] c"failed", align 1
@_llgo_string = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [5 x i8] c"hello", align 1
@_llgo_int = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [2 x i8] c"ok", align 1
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [4 x i8] c"main", align 1
@_llgo_main.T = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/equal", align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T" = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [1 x i8] c"T", align 1
@_llgo_any = linkonce global ptr null, align 8
@"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk" = linkonce global ptr null, align 8
@@ -24,17 +24,15 @@ source_filename = "main"
@6 = private unnamed_addr constant [1 x i8] c"Y", align 1
@7 = private unnamed_addr constant [1 x i8] c"Z", align 1
@8 = private unnamed_addr constant [1 x i8] c"V", align 1
@_llgo_main.N = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N" = linkonce global ptr null, align 8
@9 = private unnamed_addr constant [1 x i8] c"N", align 1
@"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8
@10 = private unnamed_addr constant [7 x i8] c"topbits", align 1
@11 = private unnamed_addr constant [4 x i8] c"keys", align 1
@12 = private unnamed_addr constant [5 x i8] c"elems", align 1
@13 = private unnamed_addr constant [8 x i8] c"overflow", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
define void @main.assert(i1 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %0) {
_llgo_0:
br i1 %0, label %_llgo_2, label %_llgo_1
@@ -51,58 +49,58 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/equal.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"()
call void @"main.init#1"()
call void @"main.init#2"()
call void @"main.init#3"()
call void @"main.init#4"()
call void @"main.init#5"()
call void @"main.init#6"()
call void @"main.init#7"()
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#2"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#3"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#4"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#5"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#6"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#7"()
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
define void @"main.init#1"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 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 @"main.init#1$2", ptr undef }, ptr %1, 1
call void @main.assert(i1 true)
call void @main.assert(i1 true)
call void @main.assert(i1 true)
call void @main.assert(i1 true)
call void @main.assert(i1 true)
call void @main.assert(i1 true)
%3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1$2", ptr undef }, ptr %1, 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
%4 = extractvalue { ptr, ptr } %3, 0
%5 = icmp ne ptr %4, null
call void @main.assert(i1 %5)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %5)
%6 = extractvalue { ptr, ptr } %3, 0
%7 = icmp ne ptr null, %6
call void @main.assert(i1 %7)
call void @main.assert(i1 true)
call void @main.assert(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %7)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
ret void
}
define i64 @"main.init#1$1"(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1$1"(i64 %0, i64 %1) {
_llgo_0:
%2 = add i64 %0, %1
ret i64 %2
}
define void @"main.init#1$2"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#1$2"(ptr %0) {
_llgo_0:
%1 = load { ptr }, ptr %0, align 8
%2 = extractvalue { ptr } %1, 0
@@ -112,9 +110,9 @@ _llgo_0:
ret void
}
define void @"main.init#2"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#2"() {
_llgo_0:
call void @main.assert(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
%0 = alloca [3 x i64], align 8
call void @llvm.memset(ptr %0, i8 0, i64 24, i1 false)
%1 = getelementptr inbounds i64, ptr %0, i64 0
@@ -145,7 +143,7 @@ _llgo_0:
%19 = extractvalue [3 x i64] %9, 2
%20 = icmp eq i64 %18, %19
%21 = and i1 %17, %20
call void @main.assert(i1 %21)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %21)
%22 = getelementptr inbounds i64, ptr %4, i64 1
store i64 1, ptr %22, align 4
%23 = load [3 x i64], ptr %0, align 4
@@ -163,18 +161,18 @@ _llgo_0:
%35 = icmp eq i64 %33, %34
%36 = and i1 %32, %35
%37 = xor i1 %36, true
call void @main.assert(i1 %37)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %37)
ret void
}
define void @"main.init#3"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#3"() {
_llgo_0:
%0 = alloca %main.T, align 8
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
call void @llvm.memset(ptr %0, i8 0, i64 48, i1 false)
%1 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 1
%3 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 2
%4 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 3
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 1
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 2
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, i32 0, i32 3
store i64 10, ptr %1, align 4
store i64 20, ptr %2, align 4
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %3, align 8
@@ -182,12 +180,12 @@ _llgo_0:
%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 inttoptr (i64 1 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %4, align 8
%8 = alloca %main.T, align 8
%8 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
call void @llvm.memset(ptr %8, i8 0, i64 48, i1 false)
%9 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 0
%10 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 1
%11 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 2
%12 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 3
%9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 0
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 1
%11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 2
%12 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, i32 0, i32 3
store i64 10, ptr %9, align 4
store i64 20, ptr %10, align 4
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %11, align 8
@@ -195,12 +193,12 @@ _llgo_0:
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %13, 0
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr inttoptr (i64 1 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, ptr %12, align 8
%16 = alloca %main.T, align 8
%16 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
call void @llvm.memset(ptr %16, i8 0, i64 48, i1 false)
%17 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 0
%18 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 1
%19 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 2
%20 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 3
%17 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 0
%18 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 1
%19 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 2
%20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, i32 0, i32 3
store i64 10, ptr %17, align 4
store i64 20, ptr %18, align 4
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %19, align 8
@@ -210,75 +208,75 @@ _llgo_0:
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %21, 0
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %23, ptr %22, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %24, ptr %20, align 8
call void @main.assert(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
%25 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer)
%26 = and i1 true, %25
%27 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer)
%28 = and i1 %26, %27
call void @main.assert(i1 %28)
%29 = load %main.T, ptr %0, align 8
%30 = load %main.T, ptr %8, align 8
%31 = extractvalue %main.T %29, 0
%32 = extractvalue %main.T %30, 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %28)
%29 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, align 8
%30 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, align 8
%31 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 0
%32 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 0
%33 = icmp eq i64 %31, %32
%34 = and i1 true, %33
%35 = extractvalue %main.T %29, 1
%36 = extractvalue %main.T %30, 1
%35 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 1
%36 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 1
%37 = icmp eq i64 %35, %36
%38 = and i1 %34, %37
%39 = extractvalue %main.T %29, 2
%40 = extractvalue %main.T %30, 2
%39 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 2
%40 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 2
%41 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %39, %"github.com/goplus/llgo/runtime/internal/runtime.String" %40)
%42 = and i1 %38, %41
%43 = extractvalue %main.T %29, 3
%44 = extractvalue %main.T %30, 3
%43 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %29, 3
%44 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %30, 3
%45 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %43, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44)
%46 = and i1 %42, %45
call void @main.assert(i1 %46)
%47 = load %main.T, ptr %0, align 8
%48 = load %main.T, ptr %16, align 8
%49 = extractvalue %main.T %47, 0
%50 = extractvalue %main.T %48, 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %46)
%47 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %0, align 8
%48 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, align 8
%49 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 0
%50 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 0
%51 = icmp eq i64 %49, %50
%52 = and i1 true, %51
%53 = extractvalue %main.T %47, 1
%54 = extractvalue %main.T %48, 1
%53 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 1
%54 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 1
%55 = icmp eq i64 %53, %54
%56 = and i1 %52, %55
%57 = extractvalue %main.T %47, 2
%58 = extractvalue %main.T %48, 2
%57 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 2
%58 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 2
%59 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %57, %"github.com/goplus/llgo/runtime/internal/runtime.String" %58)
%60 = and i1 %56, %59
%61 = extractvalue %main.T %47, 3
%62 = extractvalue %main.T %48, 3
%61 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %47, 3
%62 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %48, 3
%63 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %61, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %62)
%64 = and i1 %60, %63
%65 = xor i1 %64, true
call void @main.assert(i1 %65)
%66 = load %main.T, ptr %8, align 8
%67 = load %main.T, ptr %16, align 8
%68 = extractvalue %main.T %66, 0
%69 = extractvalue %main.T %67, 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %65)
%66 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %8, align 8
%67 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %16, align 8
%68 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 0
%69 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 0
%70 = icmp eq i64 %68, %69
%71 = and i1 true, %70
%72 = extractvalue %main.T %66, 1
%73 = extractvalue %main.T %67, 1
%72 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 1
%73 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 1
%74 = icmp eq i64 %72, %73
%75 = and i1 %71, %74
%76 = extractvalue %main.T %66, 2
%77 = extractvalue %main.T %67, 2
%76 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 2
%77 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 2
%78 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %76, %"github.com/goplus/llgo/runtime/internal/runtime.String" %77)
%79 = and i1 %75, %78
%80 = extractvalue %main.T %66, 3
%81 = extractvalue %main.T %67, 3
%80 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %66, 3
%81 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %67, 3
%82 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %80, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %81)
%83 = and i1 %79, %82
%84 = xor i1 %83, true
call void @main.assert(i1 %84)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %84)
ret void
}
define void @"main.init#4"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#4"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%1 = getelementptr inbounds i64, ptr %0, i64 0
@@ -294,21 +292,21 @@ _llgo_0:
%8 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %7, i64 8, i64 2, i64 0, i64 2, i64 2)
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%10 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.NewSlice3"(ptr %9, i64 8, i64 2, i64 0, i64 0, i64 2)
call void @main.assert(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, 0
%12 = icmp ne ptr %11, null
call void @main.assert(i1 %12)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %12)
%13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, 0
%14 = icmp ne ptr %13, null
call void @main.assert(i1 %14)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %14)
%15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, 0
%16 = icmp ne ptr %15, null
call void @main.assert(i1 %16)
call void @main.assert(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %16)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
ret void
}
define void @"main.init#5"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#5"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
@@ -318,12 +316,12 @@ _llgo_0:
store {} zeroinitializer, ptr %4, align 1
%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 = alloca %main.T, align 8
%7 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
call void @llvm.memset(ptr %7, i8 0, i64 48, i1 false)
%8 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 0
%9 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 1
%10 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 2
%11 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 3
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 0
%9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 1
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 2
%11 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, i32 0, i32 3
store i64 10, ptr %8, align 4
store i64 20, ptr %9, align 4
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %10, align 8
@@ -331,18 +329,18 @@ _llgo_0:
%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 inttoptr (i64 1 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %11, align 8
%15 = load %main.T, ptr %7, align 8
%16 = load ptr, ptr @_llgo_main.T, align 8
%15 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %7, align 8
%16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %main.T %15, ptr %17, align 8
store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %15, 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
%20 = alloca %main.T, align 8
%20 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
call void @llvm.memset(ptr %20, i8 0, i64 48, i1 false)
%21 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 0
%22 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 1
%23 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 2
%24 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 3
%21 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 0
%22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 1
%23 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 2
%24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, i32 0, i32 3
store i64 10, ptr %21, align 4
store i64 20, ptr %22, align 4
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %23, align 8
@@ -350,12 +348,12 @@ _llgo_0:
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %25, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr inttoptr (i64 1 to ptr), 1
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %27, ptr %24, align 8
%28 = alloca %main.T, align 8
%28 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
call void @llvm.memset(ptr %28, i8 0, i64 48, i1 false)
%29 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 0
%30 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 1
%31 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 2
%32 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 3
%29 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 0
%30 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 1
%31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 2
%32 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, i32 0, i32 3
store i64 10, ptr %29, align 4
store i64 20, ptr %30, align 4
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, ptr %31, align 8
@@ -369,80 +367,76 @@ _llgo_0:
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %37, 0
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %38, ptr inttoptr (i64 100 to ptr), 1
%40 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39)
call void @main.assert(i1 %40)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %40)
%41 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store {} zeroinitializer, ptr %42, align 1
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %41, 0
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %43, ptr %42, 1
%45 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %44)
call void @main.assert(i1 %45)
%46 = load ptr, ptr @_llgo_main.N, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %45)
%46 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N", align 8
%47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %main.N zeroinitializer, ptr %47, align 1
store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.N" zeroinitializer, ptr %47, align 1
%48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %46, 0
%49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %48, ptr %47, 1
%50 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49)
%51 = xor i1 %50, true
call void @main.assert(i1 %51)
%52 = load %main.T, ptr %20, align 8
%53 = load ptr, ptr @_llgo_main.T, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %51)
%52 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %20, align 8
%53 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
%54 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %main.T %52, ptr %54, align 8
store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %52, ptr %54, align 8
%55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %53, 0
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %55, ptr %54, 1
%57 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %56)
call void @main.assert(i1 %57)
%58 = load %main.T, ptr %28, align 8
%59 = load ptr, ptr @_llgo_main.T, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %57)
%58 = load %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T", ptr %28, align 8
%59 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
%60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
store %main.T %58, ptr %60, align 8
store %"github.com/goplus/llgo/compiler/cl/_testgo/equal.T" %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
%63 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %19, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %62)
%64 = xor i1 %63, true
call void @main.assert(i1 %64)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %64)
ret void
}
define void @"main.init#6"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#6"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 0)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 8, i64 0)
%2 = icmp eq ptr %0, %0
call void @main.assert(i1 %2)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %2)
%3 = icmp ne ptr %0, %1
call void @main.assert(i1 %3)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %3)
%4 = icmp ne ptr %0, null
call void @main.assert(i1 %4)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %4)
ret void
}
define void @"main.init#7"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init#7"() {
_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 = icmp ne ptr %1, null
call void @main.assert(i1 %2)
call void @main.assert(i1 true)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 %2)
call void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.assert"(i1 true)
ret void
}
define i32 @main(i32 %0, ptr %1) {
_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()
ret i32 0
}
define void @main.test() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.main"() {
_llgo_0:
ret void
}
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.test"() {
_llgo_0:
ret void
}
define void @"github.com/goplus/llgo/compiler/cl/_testgo/equal.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_string, align 8
%1 = icmp eq ptr %0, null
@@ -468,15 +462,15 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 0, 1
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 0, 2
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
store ptr %10, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%12 = load ptr, ptr @_llgo_main.T, align 8
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0)
%12 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
%13 = icmp eq ptr %12, null
br i1 %13, label %_llgo_5, label %_llgo_6
_llgo_5: ; preds = %_llgo_4
store ptr %11, ptr @_llgo_main.T, align 8
store ptr %11, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.T", align 8
br label %_llgo_6
_llgo_6: ; preds = %_llgo_5, %_llgo_4
@@ -489,7 +483,7 @@ _llgo_7: ; preds = %_llgo_6
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %16, 0
%18 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, i64 0, 1
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %18, i64 0, 2
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19)
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19)
store ptr %20, ptr @_llgo_any, align 8
br label %_llgo_8
@@ -505,7 +499,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %28, 0
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 0, 1
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30, i64 0, 2
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31)
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %31)
%33 = 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 1 }, ptr %32, i64 32, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 224)
%35 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField", ptr %34, i64 0
@@ -519,7 +513,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %34, 0
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 4, 1
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40, i64 4, 2
%42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41)
%42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, i64 48, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %41)
store ptr %42, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
%43 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
br i1 %13, label %_llgo_9, label %_llgo_10
@@ -529,13 +523,13 @@ _llgo_9: ; preds = %_llgo_8
br label %_llgo_10
_llgo_10: ; preds = %_llgo_9, %_llgo_8
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0)
%45 = load ptr, ptr @_llgo_main.N, align 8
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0)
%45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N", align 8
%46 = icmp eq ptr %45, null
br i1 %46, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
store ptr %44, ptr @_llgo_main.N, align 8
store ptr %44, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/equal.N", align 8
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_10
@@ -577,7 +571,7 @@ _llgo_15: ; preds = %_llgo_14
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %63, 0
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 4, 1
%70 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69, i64 4, 2
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70)
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 48 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70)
%72 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %50, ptr %51, ptr %71, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %72)
store ptr %72, ptr @"map[_llgo_int]_llgo_string", align 8
@@ -628,6 +622,4 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(p
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.MakeMap"(ptr, i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }

View File

@@ -1,36 +1,34 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/errors'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/errors"
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.errorString = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" }
%"github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" }
%"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 }
%"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_main.errorString = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/errors.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [49 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/errors", align 1
@1 = private unnamed_addr constant [11 x i8] c"errorString", align 1
@_llgo_string = linkonce global ptr null, align 8
@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [1 x i8] c"s", align 1
@3 = private unnamed_addr constant [5 x i8] c"Error", align 1
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
@"*_llgo_main.errorString" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString" = linkonce global ptr null, align 8
@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@4 = private unnamed_addr constant [8 x i8] c"an error", align 1
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @main.New(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
_llgo_0:
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%2 = getelementptr inbounds %main.errorString, ptr %1, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %0, ptr %2, align 8
%3 = load ptr, ptr @_llgo_main.errorString, align 8
%4 = load ptr, ptr @"*_llgo_main.errorString", align 8
%3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8
%4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8
%5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%6 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %6, ptr %4)
@@ -39,56 +37,52 @@ _llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9
}
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"main.(*errorString).Error"(ptr %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/errors.(*errorString).Error"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %main.errorString, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", ptr %0, i32 0, i32 0
%2 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %1, align 8
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.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/_testgo/errors.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.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/_testgo/errors.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.New(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2)
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/errors.New"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%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
%11 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %10(ptr %9)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %11)
%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
%9 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %8(ptr %7)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %9)
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 void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/errors.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 11 }, i64 25, i64 16, i64 0, i64 1)
store ptr %0, ptr @_llgo_main.errorString, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1)
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8
%1 = load ptr, ptr @_llgo_string, align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2
@@ -108,9 +102,9 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %7, 0
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, i64 1, 1
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 1, 2
%12 = 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" %11)
store ptr %12, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
%13 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11)
store ptr %12, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
%13 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
%14 = load ptr, ptr @_llgo_string, align 8
%15 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%16 = icmp eq ptr %15, null
@@ -135,8 +129,8 @@ _llgo_3: ; preds = %_llgo_2
_llgo_4: ; preds = %_llgo_3, %_llgo_2
%27 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %27, 1
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"main.(*errorString).Error", 2
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"main.(*errorString).Error", 3
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.(*errorString).Error", 2
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/errors.(*errorString).Error", 3
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%32 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %31, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %32, align 8
@@ -144,10 +138,10 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 1, 1
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 1, 2
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %13, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35)
%36 = 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 11 }, i64 25, i64 16, i64 0, i64 1)
%36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1)
%37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %36)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %37)
store ptr %37, ptr @"*_llgo_main.errorString", align 8
store ptr %37, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/errors.errorString", align 8
%38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%39 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
%40 = icmp eq ptr %39, null
@@ -161,7 +155,7 @@ _llgo_5: ; preds = %_llgo_4
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %42, 0
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 1, 1
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 1, 2
%47 = 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" %46)
%47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46)
store ptr %47, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
br label %_llgo_6
@@ -191,8 +185,6 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"githu
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr, ptr)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,52 +1,46 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/goroutine'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/goroutine"
%"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/_testgo/goroutine.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
@1 = private unnamed_addr constant [16 x i8] c"Hello, goroutine", align 1
@2 = private unnamed_addr constant [1 x i8] c".", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.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/_testgo/goroutine.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/_testgo/goroutine.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 1)
store i1 false, ptr %2, align 1
%3 = call ptr @malloc(i64 16)
%4 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %3, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %4, align 8
%5 = alloca i8, i64 8, align 1
%6 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %5, ptr null, ptr @"main._llgo_routine$1", ptr %3)
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%8 = getelementptr inbounds { ptr }, ptr %7, i32 0, i32 0
store ptr %2, ptr %8, align 8
%9 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %7, 1
%10 = call ptr @malloc(i64 32)
%11 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %10, i32 0, i32 0
store { ptr, ptr } %9, ptr %11, align 8
%12 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %10, i32 0, i32 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 16 }, ptr %12, align 8
%13 = alloca i8, i64 8, align 1
%14 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %13, ptr null, ptr @"main._llgo_routine$2", ptr %10)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 1)
store i1 false, ptr %0, align 1
%1 = call ptr @malloc(i64 16)
%2 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %2, align 8
%3 = alloca i8, i64 8, align 1
%4 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %3, ptr null, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$1", ptr %1)
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
%6 = getelementptr inbounds { ptr }, ptr %5, i32 0, i32 0
store ptr %0, ptr %6, align 8
%7 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.main$1", ptr undef }, ptr %5, 1
%8 = call ptr @malloc(i64 32)
%9 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %8, i32 0, i32 0
store { ptr, ptr } %7, ptr %9, align 8
%10 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %8, i32 0, i32 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 16 }, ptr %10, align 8
%11 = alloca i8, i64 8, align 1
%12 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %11, ptr null, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$2", ptr %8)
br label %_llgo_3
_llgo_1: ; preds = %_llgo_3
@@ -54,14 +48,14 @@ _llgo_1: ; preds = %_llgo_3
br label %_llgo_3
_llgo_2: ; preds = %_llgo_3
ret i32 0
ret void
_llgo_3: ; preds = %_llgo_1, %_llgo_0
%15 = load i1, ptr %2, align 1
br i1 %15, label %_llgo_2, label %_llgo_1
%13 = load i1, ptr %0, align 1
br i1 %13, label %_llgo_2, label %_llgo_1
}
define void @"main.main$1"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" %1) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine.main$1"(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)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
@@ -71,13 +65,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)
declare ptr @malloc(i64)
define ptr @"main._llgo_routine$1"(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$1"(ptr %0) {
_llgo_0:
%1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %0, align 8
%2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String" } %1, 0
@@ -97,7 +89,7 @@ declare i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr,
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
define ptr @"main._llgo_routine$2"(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/goroutine._llgo_routine$2"(ptr %0) {
_llgo_0:
%1 = load { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" }, ptr %0, align 8
%2 = extractvalue { { ptr, ptr }, %"github.com/goplus/llgo/runtime/internal/runtime.String" } %1, 0

View File

@@ -1,8 +1,8 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv"
%main.C1 = type {}
%main.C2 = type {}
%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" = type {}
%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" = type {}
%"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 }
@@ -11,33 +11,31 @@ 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.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
@_llgo_main.I0 = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv", align 1
@1 = private unnamed_addr constant [2 x i8] c"I0", align 1
@2 = private unnamed_addr constant [21 x i8] c"nil i0.(I0) succeeded", align 1
@_llgo_string = linkonce global ptr null, align 8
@_llgo_main.I1 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [2 x i8] c"I1", align 1
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [6 x i8] c"main.f", align 1
@"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [54 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.f", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = linkonce global ptr null, align 8
@5 = private unnamed_addr constant [21 x i8] c"nil i1.(I1) succeeded", align 1
@_llgo_main.I2 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [2 x i8] c"I2", align 1
@7 = private unnamed_addr constant [6 x i8] c"main.g", align 1
@"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [54 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.g", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = linkonce global ptr null, align 8
@8 = private unnamed_addr constant [21 x i8] c"nil i2.(I2) succeeded", align 1
@_llgo_main.C1 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" = linkonce global ptr null, align 8
@9 = private unnamed_addr constant [2 x i8] c"C1", align 1
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
@10 = private unnamed_addr constant [1 x i8] c"f", align 1
@11 = private unnamed_addr constant [17 x i8] c"C1 i1.(I0) failed", align 1
@12 = private unnamed_addr constant [17 x i8] c"C1 i1.(I1) failed", align 1
@13 = private unnamed_addr constant [20 x i8] c"C1 i1.(I2) succeeded", align 1
@_llgo_main.C2 = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" = linkonce global ptr null, align 8
@14 = private unnamed_addr constant [2 x i8] c"C2", align 1
@15 = private unnamed_addr constant [1 x i8] c"g", align 1
@16 = private unnamed_addr constant [17 x i8] c"C2 i1.(I0) failed", align 1
@@ -47,268 +45,264 @@ source_filename = "main"
@20 = private unnamed_addr constant [17 x i8] c"C1 I1(i1) was nil", align 1
@21 = private unnamed_addr constant [4 x i8] c"pass", align 1
define void @main.C1.f(%main.C1 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" %0) {
_llgo_0:
ret void
}
define void @"main.(*C1).f"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f"(ptr %0) {
_llgo_0:
%1 = load %main.C1, ptr %0, align 1
call void @main.C1.f(%main.C1 %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", ptr %0, align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" %1)
ret void
}
define void @main.C2.f(%main.C2 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %0) {
_llgo_0:
ret void
}
define void @main.C2.g(%main.C2 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.g"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %0) {
_llgo_0:
ret void
}
define void @"main.(*C2).f"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f"(ptr %0) {
_llgo_0:
%1 = load %main.C2, ptr %0, align 1
call void @main.C2.f(%main.C2 %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", ptr %0, align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.f"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %1)
ret void
}
define void @"main.(*C2).g"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g"(ptr %0) {
_llgo_0:
%1 = load %main.C2, ptr %0, align 1
call void @main.C2.g(%main.C2 %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", ptr %0, align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.g"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" %1)
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.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/_testgo/ifaceconv.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.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/_testgo/ifaceconv.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.I0, align 8
%3 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %2, ptr null)
br i1 %3, label %_llgo_23, label %_llgo_24
%0 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8
%1 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %0, ptr null)
br i1 %1, label %_llgo_23, label %_llgo_24
_llgo_1: ; preds = %_llgo_25
%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 @2, i64 21 }, 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)
%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 @2, i64 21 }, 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)
unreachable
_llgo_2: ; preds = %_llgo_25
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%9 = load ptr, ptr @_llgo_main.I1, align 8
%10 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %9, ptr %8)
br i1 %10, label %_llgo_26, label %_llgo_27
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%7 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8
%8 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %7, ptr %6)
br i1 %8, label %_llgo_26, label %_llgo_27
_llgo_3: ; preds = %_llgo_28
%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 @5, i64 21 }, 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)
%9 = load ptr, ptr @_llgo_string, align 8
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 21 }, 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
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %12)
unreachable
_llgo_4: ; preds = %_llgo_28
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%16 = load ptr, ptr @_llgo_main.I2, align 8
%17 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %16, ptr %15)
br i1 %17, label %_llgo_29, label %_llgo_30
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%14 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8
%15 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %14, ptr %13)
br i1 %15, label %_llgo_29, label %_llgo_30
_llgo_5: ; preds = %_llgo_31
%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 @8, i64 21 }, 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 @8, i64 21 }, 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_6: ; preds = %_llgo_31
%22 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %22, 0
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %23, ptr null, 1
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %25, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %26, ptr null, 1
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%29 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %29, ptr %28)
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %30, 0
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %31, ptr null, 1
%33 = load ptr, ptr @_llgo_main.C1, align 8
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %main.C1 zeroinitializer, ptr %34, align 1
%35 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %35, ptr %33)
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %36, 0
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %37, ptr %34, 1
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %38)
%40 = load ptr, ptr @_llgo_main.I0, align 8
%41 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %40, ptr %39)
br i1 %41, label %_llgo_32, label %_llgo_33
%20 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%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
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%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
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%27 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %27, ptr %26)
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %28, 0
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %29, ptr null, 1
%31 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %32, align 1
%33 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %33, ptr %31)
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %34, 0
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %35, ptr %32, 1
%37 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %36)
%38 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8
%39 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %38, ptr %37)
br i1 %39, label %_llgo_32, label %_llgo_33
_llgo_7: ; preds = %_llgo_34
%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 @11, i64 17 }, 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 @11, i64 17 }, 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_8: ; preds = %_llgo_34
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %38)
%47 = load ptr, ptr @_llgo_main.I1, align 8
%48 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %47, ptr %46)
br i1 %48, label %_llgo_35, label %_llgo_36
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %36)
%45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8
%46 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %45, ptr %44)
br i1 %46, label %_llgo_35, label %_llgo_36
_llgo_9: ; preds = %_llgo_37
%49 = load ptr, ptr @_llgo_string, align 8
%50 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 17 }, ptr %50, align 8
%51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %49, 0
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %51, ptr %50, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %52)
%47 = load ptr, ptr @_llgo_string, align 8
%48 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @12, i64 17 }, ptr %48, align 8
%49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %47, 0
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, ptr %48, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %50)
unreachable
_llgo_10: ; preds = %_llgo_37
%53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %38)
%54 = load ptr, ptr @_llgo_main.I2, align 8
%55 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %54, ptr %53)
br i1 %55, label %_llgo_38, label %_llgo_39
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %36)
%52 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8
%53 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %52, ptr %51)
br i1 %53, label %_llgo_38, label %_llgo_39
_llgo_11: ; preds = %_llgo_40
%56 = load ptr, ptr @_llgo_string, align 8
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 20 }, ptr %57, align 8
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %56, 0
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %58, ptr %57, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %59)
%54 = load ptr, ptr @_llgo_string, align 8
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @13, i64 20 }, ptr %55, align 8
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %54, 0
%57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %56, ptr %55, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %57)
unreachable
_llgo_12: ; preds = %_llgo_40
%60 = load ptr, ptr @_llgo_main.C2, align 8
%61 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %main.C2 zeroinitializer, ptr %61, align 1
%62 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %62, ptr %60)
%64 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %63, 0
%65 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %64, ptr %61, 1
%66 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %65)
%67 = load ptr, ptr @_llgo_main.I0, align 8
%68 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %67, ptr %66)
br i1 %68, label %_llgo_41, label %_llgo_42
%58 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", align 8
%59 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2" zeroinitializer, ptr %59, align 1
%60 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%61 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %60, ptr %58)
%62 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %61, 0
%63 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %62, ptr %59, 1
%64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %63)
%65 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8
%66 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %65, ptr %64)
br i1 %66, label %_llgo_41, label %_llgo_42
_llgo_13: ; preds = %_llgo_43
%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 @16, i64 17 }, 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)
%67 = load ptr, ptr @_llgo_string, align 8
%68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @16, i64 17 }, ptr %68, align 8
%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/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %70)
unreachable
_llgo_14: ; preds = %_llgo_43
%73 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %65)
%74 = load ptr, ptr @_llgo_main.I1, align 8
%75 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %74, ptr %73)
br i1 %75, label %_llgo_44, label %_llgo_45
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %63)
%72 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8
%73 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %72, ptr %71)
br i1 %73, label %_llgo_44, label %_llgo_45
_llgo_15: ; preds = %_llgo_46
%76 = load ptr, ptr @_llgo_string, align 8
%77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @17, i64 17 }, ptr %77, align 8
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %76, 0
%79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %78, ptr %77, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %79)
%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 @17, i64 17 }, 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)
unreachable
_llgo_16: ; preds = %_llgo_46
%80 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %65)
%81 = load ptr, ptr @_llgo_main.I2, align 8
%82 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %81, ptr %80)
br i1 %82, label %_llgo_47, label %_llgo_48
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %63)
%79 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8
%80 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %79, ptr %78)
br i1 %80, label %_llgo_47, label %_llgo_48
_llgo_17: ; preds = %_llgo_49
%83 = load ptr, ptr @_llgo_string, align 8
%84 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 17 }, ptr %84, align 8
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %83, 0
%86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %85, ptr %84, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %86)
%81 = load ptr, ptr @_llgo_string, align 8
%82 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @18, i64 17 }, ptr %82, align 8
%83 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %81, 0
%84 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %83, ptr %82, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %84)
unreachable
_llgo_18: ; preds = %_llgo_49
%87 = load ptr, ptr @_llgo_main.C1, align 8
%88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %main.C1 zeroinitializer, ptr %88, align 1
%89 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%90 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %89, ptr %87)
%91 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %90, 0
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %91, ptr %88, 1
%93 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %92)
%94 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %92, 1
%95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %93, 0
%96 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %95, ptr %94, 1
%97 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %96, %"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer)
br i1 %97, label %_llgo_19, label %_llgo_20
%85 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8
%86 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1" zeroinitializer, ptr %86, align 1
%87 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %87, ptr %85)
%89 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %88, 0
%90 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %89, ptr %86, 1
%91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %90)
%92 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %90, 1
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %91, 0
%94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %93, ptr %92, 1
%95 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %94, %"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer)
br i1 %95, label %_llgo_19, label %_llgo_20
_llgo_19: ; preds = %_llgo_18
%98 = load ptr, ptr @_llgo_string, align 8
%99 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 17 }, ptr %99, align 8
%100 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %98, 0
%101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %100, ptr %99, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %101)
%96 = load ptr, ptr @_llgo_string, align 8
%97 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @19, i64 17 }, ptr %97, align 8
%98 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %96, 0
%99 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %98, ptr %97, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %99)
unreachable
_llgo_20: ; preds = %_llgo_18
%102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %92)
%103 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %92, 1
%104 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %102, 0
%105 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %104, ptr %103, 1
%106 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%107 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %106, 0
%108 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %107, ptr null, 1
%109 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %105, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %108)
br i1 %109, label %_llgo_21, label %_llgo_22
%100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %90)
%101 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %90, 1
%102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %100, 0
%103 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %102, ptr %101, 1
%104 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
%105 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %104, 0
%106 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %105, ptr null, 1
%107 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %103, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %106)
br i1 %107, label %_llgo_21, label %_llgo_22
_llgo_21: ; preds = %_llgo_20
%110 = load ptr, ptr @_llgo_string, align 8
%111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 17 }, ptr %111, align 8
%112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %110, 0
%113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %112, ptr %111, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %113)
%108 = load ptr, ptr @_llgo_string, align 8
%109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @20, i64 17 }, ptr %109, align 8
%110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %108, 0
%111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %110, ptr %109, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %111)
unreachable
_llgo_22: ; preds = %_llgo_20
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @21, i64 4 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
_llgo_23: ; preds = %_llgo_0
br label %_llgo_25
@@ -317,169 +311,167 @@ _llgo_24: ; preds = %_llgo_0
br label %_llgo_25
_llgo_25: ; preds = %_llgo_24, %_llgo_23
%114 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } [ { %"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer, i1 true }, %_llgo_23 ], [ zeroinitializer, %_llgo_24 ]
%115 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %114, 0
%116 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %114, 1
br i1 %116, label %_llgo_1, label %_llgo_2
%112 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } [ { %"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer, i1 true }, %_llgo_23 ], [ zeroinitializer, %_llgo_24 ]
%113 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %112, 0
%114 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %112, 1
br i1 %114, label %_llgo_1, label %_llgo_2
_llgo_26: ; preds = %_llgo_2
%117 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%118 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %117, ptr %8)
%119 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %118, 0
%120 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %119, ptr null, 1
%121 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %120, 0
%122 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %121, i1 true, 1
%115 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %115, ptr %6)
%117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %116, 0
%118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %117, ptr null, 1
%119 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %118, 0
%120 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %119, i1 true, 1
br label %_llgo_28
_llgo_27: ; preds = %_llgo_2
br label %_llgo_28
_llgo_28: ; preds = %_llgo_27, %_llgo_26
%123 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %122, %_llgo_26 ], [ zeroinitializer, %_llgo_27 ]
%124 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %123, 0
%125 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %123, 1
br i1 %125, label %_llgo_3, label %_llgo_4
%121 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %120, %_llgo_26 ], [ zeroinitializer, %_llgo_27 ]
%122 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %121, 0
%123 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %121, 1
br i1 %123, label %_llgo_3, label %_llgo_4
_llgo_29: ; preds = %_llgo_4
%126 = load ptr, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%127 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %126, ptr %15)
%128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %127, 0
%129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %128, ptr null, 1
%130 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %129, 0
%131 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %130, i1 true, 1
%124 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%125 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %124, ptr %13)
%126 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %125, 0
%127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %126, ptr null, 1
%128 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %127, 0
%129 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %128, i1 true, 1
br label %_llgo_31
_llgo_30: ; preds = %_llgo_4
br label %_llgo_31
_llgo_31: ; preds = %_llgo_30, %_llgo_29
%132 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %131, %_llgo_29 ], [ zeroinitializer, %_llgo_30 ]
%133 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %132, 0
%134 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %132, 1
br i1 %134, label %_llgo_5, label %_llgo_6
%130 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %129, %_llgo_29 ], [ zeroinitializer, %_llgo_30 ]
%131 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %130, 0
%132 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %130, 1
br i1 %132, label %_llgo_5, label %_llgo_6
_llgo_32: ; preds = %_llgo_6
%135 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %38, 1
%136 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %39, 0
%137 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %136, ptr %135, 1
%138 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %137, 0
%139 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %138, i1 true, 1
%133 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %36, 1
%134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %37, 0
%135 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %134, ptr %133, 1
%136 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %135, 0
%137 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %136, i1 true, 1
br label %_llgo_34
_llgo_33: ; preds = %_llgo_6
br label %_llgo_34
_llgo_34: ; preds = %_llgo_33, %_llgo_32
%140 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } [ %139, %_llgo_32 ], [ zeroinitializer, %_llgo_33 ]
%141 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %140, 0
%142 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %140, 1
br i1 %142, label %_llgo_8, label %_llgo_7
%138 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } [ %137, %_llgo_32 ], [ zeroinitializer, %_llgo_33 ]
%139 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %138, 0
%140 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %138, 1
br i1 %140, label %_llgo_8, label %_llgo_7
_llgo_35: ; preds = %_llgo_8
%143 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %38, 1
%144 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%145 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %144, ptr %46)
%146 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %145, 0
%147 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %146, ptr %143, 1
%148 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %147, 0
%149 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %148, i1 true, 1
%141 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %36, 1
%142 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%143 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %142, ptr %44)
%144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %143, 0
%145 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %144, ptr %141, 1
%146 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %145, 0
%147 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %146, i1 true, 1
br label %_llgo_37
_llgo_36: ; preds = %_llgo_8
br label %_llgo_37
_llgo_37: ; preds = %_llgo_36, %_llgo_35
%150 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %149, %_llgo_35 ], [ zeroinitializer, %_llgo_36 ]
%151 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %150, 0
%152 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %150, 1
br i1 %152, label %_llgo_10, label %_llgo_9
%148 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %147, %_llgo_35 ], [ zeroinitializer, %_llgo_36 ]
%149 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %148, 0
%150 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %148, 1
br i1 %150, label %_llgo_10, label %_llgo_9
_llgo_38: ; preds = %_llgo_10
%153 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %38, 1
%154 = load ptr, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%155 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %154, ptr %53)
%156 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %155, 0
%157 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %156, ptr %153, 1
%158 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %157, 0
%159 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %158, i1 true, 1
%151 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %36, 1
%152 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%153 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %152, ptr %51)
%154 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %153, 0
%155 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %154, ptr %151, 1
%156 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %155, 0
%157 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %156, i1 true, 1
br label %_llgo_40
_llgo_39: ; preds = %_llgo_10
br label %_llgo_40
_llgo_40: ; preds = %_llgo_39, %_llgo_38
%160 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %159, %_llgo_38 ], [ zeroinitializer, %_llgo_39 ]
%161 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %160, 0
%162 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %160, 1
br i1 %162, label %_llgo_11, label %_llgo_12
%158 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %157, %_llgo_38 ], [ zeroinitializer, %_llgo_39 ]
%159 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %158, 0
%160 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %158, 1
br i1 %160, label %_llgo_11, label %_llgo_12
_llgo_41: ; preds = %_llgo_12
%163 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %65, 1
%164 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %66, 0
%165 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %164, ptr %163, 1
%166 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %165, 0
%167 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %166, i1 true, 1
%161 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %63, 1
%162 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %64, 0
%163 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %162, ptr %161, 1
%164 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %163, 0
%165 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %164, i1 true, 1
br label %_llgo_43
_llgo_42: ; preds = %_llgo_12
br label %_llgo_43
_llgo_43: ; preds = %_llgo_42, %_llgo_41
%168 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } [ %167, %_llgo_41 ], [ zeroinitializer, %_llgo_42 ]
%169 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %168, 0
%170 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %168, 1
br i1 %170, label %_llgo_14, label %_llgo_13
%166 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } [ %165, %_llgo_41 ], [ zeroinitializer, %_llgo_42 ]
%167 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %166, 0
%168 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.eface", i1 } %166, 1
br i1 %168, label %_llgo_14, label %_llgo_13
_llgo_44: ; preds = %_llgo_14
%171 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %65, 1
%172 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%173 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %172, ptr %73)
%174 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %173, 0
%175 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %174, ptr %171, 1
%176 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %175, 0
%177 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %176, i1 true, 1
%169 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %63, 1
%170 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%171 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %170, ptr %71)
%172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %171, 0
%173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %172, ptr %169, 1
%174 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %173, 0
%175 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %174, i1 true, 1
br label %_llgo_46
_llgo_45: ; preds = %_llgo_14
br label %_llgo_46
_llgo_46: ; preds = %_llgo_45, %_llgo_44
%178 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %177, %_llgo_44 ], [ zeroinitializer, %_llgo_45 ]
%179 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %178, 0
%180 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %178, 1
br i1 %180, label %_llgo_16, label %_llgo_15
%176 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %175, %_llgo_44 ], [ zeroinitializer, %_llgo_45 ]
%177 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %176, 0
%178 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %176, 1
br i1 %178, label %_llgo_16, label %_llgo_15
_llgo_47: ; preds = %_llgo_16
%181 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %65, 1
%182 = load ptr, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%183 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %182, ptr %80)
%184 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %183, 0
%185 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %184, ptr %181, 1
%186 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %185, 0
%187 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %186, i1 true, 1
%179 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %63, 1
%180 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%181 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %180, ptr %78)
%182 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %181, 0
%183 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %182, ptr %179, 1
%184 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %183, 0
%185 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %184, i1 true, 1
br label %_llgo_49
_llgo_48: ; preds = %_llgo_16
br label %_llgo_49
_llgo_49: ; preds = %_llgo_48, %_llgo_47
%188 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %187, %_llgo_47 ], [ zeroinitializer, %_llgo_48 ]
%189 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %188, 0
%190 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %188, 1
br i1 %190, label %_llgo_18, label %_llgo_17
%186 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %185, %_llgo_47 ], [ zeroinitializer, %_llgo_48 ]
%187 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %186, 0
%188 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %186, 1
br i1 %188, label %_llgo_18, label %_llgo_17
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 2 })
%1 = load ptr, ptr @_llgo_main.I0, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 2 })
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", 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.I0, align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I0", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -504,13 +496,13 @@ _llgo_5: ; preds = %_llgo_4
br label %_llgo_6
_llgo_6: ; preds = %_llgo_5, %_llgo_4
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 })
%11 = load ptr, ptr @_llgo_main.I1, align 8
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 })
%11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8
%12 = icmp eq ptr %11, null
br i1 %12, label %_llgo_7, label %_llgo_8
_llgo_7: ; preds = %_llgo_6
store ptr %10, ptr @_llgo_main.I1, align 8
store ptr %10, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I1", align 8
br label %_llgo_8
_llgo_8: ; preds = %_llgo_7, %_llgo_6
@@ -537,7 +529,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
br i1 %12, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
%25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %24, 1
%25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %24, 1
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
%27 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %26, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %25, ptr %27, align 8
@@ -549,22 +541,22 @@ _llgo_11: ; preds = %_llgo_10
_llgo_12: ; preds = %_llgo_11, %_llgo_10
%31 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %31, 1
%32 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %31, 1
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
%34 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %33, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %32, ptr %34, align 8
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %33, 0
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, i64 1, 1
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 1, 2
%38 = 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" %37)
store ptr %38, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 })
%40 = load ptr, ptr @_llgo_main.I2, align 8
%38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37)
store ptr %38, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
%39 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 2 })
%40 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8
%41 = icmp eq ptr %40, null
br i1 %41, label %_llgo_13, label %_llgo_14
_llgo_13: ; preds = %_llgo_12
store ptr %39, ptr @_llgo_main.I2, align 8
store ptr %39, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.I2", align 8
br label %_llgo_14
_llgo_14: ; preds = %_llgo_13, %_llgo_12
@@ -573,8 +565,8 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12
br i1 %41, label %_llgo_15, label %_llgo_16
_llgo_15: ; preds = %_llgo_14
%44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %42, 1
%45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef }, ptr %43, 1
%44 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %42, 1
%45 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef }, ptr %43, 1
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
%47 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %46, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %44, ptr %47, align 8
@@ -589,8 +581,8 @@ _llgo_15: ; preds = %_llgo_14
_llgo_16: ; preds = %_llgo_15, %_llgo_14
%52 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%53 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %52, 1
%55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef }, ptr %53, 1
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef }, ptr %52, 1
%55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef }, ptr %53, 1
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
%57 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %56, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %54, ptr %57, align 8
@@ -599,15 +591,15 @@ _llgo_16: ; preds = %_llgo_15, %_llgo_14
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %56, 0
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59, i64 2, 1
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, i64 2, 2
%62 = 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" %61)
store ptr %62, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%63 = 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 @9, i64 2 }, i64 25, i64 0, i64 1, i64 1)
%64 = load ptr, ptr @_llgo_main.C1, align 8
%62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61)
store ptr %62, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 2 }, i64 25, i64 0, i64 1, i64 1)
%64 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8
%65 = icmp eq ptr %64, null
br i1 %65, label %_llgo_17, label %_llgo_18
_llgo_17: ; preds = %_llgo_16
store ptr %63, ptr @_llgo_main.C1, align 8
store ptr %63, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1", align 8
br label %_llgo_18
_llgo_18: ; preds = %_llgo_17, %_llgo_16
@@ -615,19 +607,19 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16
%67 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %66, 0
%68 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %67, i64 0, 1
%69 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68, i64 0, 2
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69)
%70 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %69)
store ptr %70, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%71 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
br i1 %65, label %_llgo_19, label %_llgo_20
_llgo_19: ; preds = %_llgo_18
%72 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%73 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %72, 1
%74 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %73, ptr @"main.(*C1).f", 2
%75 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %74, ptr @"main.(*C1).f", 3
%76 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %72, 1
%77 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %76, ptr @"main.(*C1).f", 2
%78 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %77, ptr @main.C1.f, 3
%73 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %72, 1
%74 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %73, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f", 2
%75 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %74, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f", 3
%76 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %72, 1
%77 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %76, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C1).f", 2
%78 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %77, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C1.f", 3
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%80 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %79, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %78, ptr %80, align 8
@@ -644,13 +636,13 @@ _llgo_19: ; preds = %_llgo_18
br label %_llgo_20
_llgo_20: ; preds = %_llgo_19, %_llgo_18
%89 = 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 @14, i64 2 }, i64 25, i64 0, i64 2, i64 2)
%90 = load ptr, ptr @_llgo_main.C2, align 8
%89 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2)
%90 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", align 8
%91 = icmp eq ptr %90, null
br i1 %91, label %_llgo_21, label %_llgo_22
_llgo_21: ; preds = %_llgo_20
store ptr %89, ptr @_llgo_main.C2, align 8
store ptr %89, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2", align 8
br label %_llgo_22
_llgo_22: ; preds = %_llgo_21, %_llgo_20
@@ -659,19 +651,19 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20
_llgo_23: ; preds = %_llgo_22
%93 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1
%95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"main.(*C2).f", 2
%96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr @"main.(*C2).f", 3
%97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1
%98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"main.(*C2).f", 2
%99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @main.C2.f, 3
%94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1
%95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f", 2
%96 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f", 3
%97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %93, 1
%98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).f", 2
%99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.f", 3
%100 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1
%102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr @"main.(*C2).g", 2
%103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %102, ptr @"main.(*C2).g", 3
%104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1
%105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"main.(*C2).g", 2
%106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr @main.C2.g, 3
%101 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1
%102 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %101, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g", 2
%103 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %102, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g", 3
%104 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 54 }, ptr undef, ptr undef, ptr undef }, ptr %100, 1
%105 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %104, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.(*C2).g", 2
%106 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %105, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceconv.C2.g", 3
%107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
%108 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %107, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %99, ptr %108, align 8

View File

@@ -1,43 +1,41 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom"
%main.S = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }
%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" = type { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.impl = type {}
%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" = type {}
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"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 }
%"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/_testgo/ifaceprom.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [3 x i8] c"two", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@_llgo_main.impl = 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/_testgo/ifaceprom.impl" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom", align 1
@2 = private unnamed_addr constant [4 x i8] c"impl", align 1
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [3 x i8] c"one", align 1
@4 = private unnamed_addr constant [8 x i8] c"main.one", align 1
@4 = private unnamed_addr constant [56 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one", align 1
@_llgo_int = linkonce global ptr null, align 8
@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8
@5 = private unnamed_addr constant [8 x i8] c"main.two", align 1
@5 = private unnamed_addr constant [56 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two", align 1
@_llgo_string = linkonce global ptr null, align 8
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
@"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8
@_llgo_main.I = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [1 x i8] c"I", align 1
@7 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@8 = private unnamed_addr constant [4 x i8] c"pass", align 1
define i64 @main.S.one(%main.S %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S.one"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0) {
_llgo_0:
%1 = alloca %main.S, align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", align 8
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
store %main.S %0, ptr %1, align 8
%2 = getelementptr inbounds %main.S, ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %1, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3)
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3, 0
@@ -51,12 +49,12 @@ _llgo_0:
ret i64 %12
}
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.S.two(%main.S %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S.two"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0) {
_llgo_0:
%1 = alloca %main.S, align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", align 8
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
store %main.S %0, ptr %1, align 8
%2 = getelementptr inbounds %main.S, ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %0, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %1, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %2, align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %3)
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %3, 0
@@ -70,9 +68,9 @@ _llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %12
}
define i64 @"main.(*S).one"(ptr %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*S).one"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %main.S, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%2 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %1, align 8
%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
@@ -86,9 +84,9 @@ _llgo_0:
ret i64 %11
}
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"main.(*S).two"(ptr %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*S).two"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %main.S, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%2 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %1, align 8
%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
@@ -102,329 +100,325 @@ _llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %11
}
define i64 @main.impl.one(%main.impl %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.one"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %0) {
_llgo_0:
ret i64 1
}
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.impl.two(%main.impl %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.two"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %0) {
_llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 }
}
define i64 @"main.(*impl).one"(ptr %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one"(ptr %0) {
_llgo_0:
%1 = load %main.impl, ptr %0, align 1
%2 = call i64 @main.impl.one(%main.impl %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", ptr %0, align 1
%2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.one"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %1)
ret i64 %2
}
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"main.(*impl).two"(ptr %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two"(ptr %0) {
_llgo_0:
%1 = load %main.impl, ptr %0, align 1
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @main.impl.two(%main.impl %1)
%1 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", ptr %0, align 1
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.two"(%"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" %1)
ret %"github.com/goplus/llgo/runtime/internal/runtime.String" %2
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.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/_testgo/ifaceprom.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.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/_testgo/ifaceprom.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.S, align 8
call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false)
%3 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
%4 = load ptr, ptr @_llgo_main.impl, align 8
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %main.impl zeroinitializer, ptr %5, align 1
%6 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%7 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%8 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", 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 %5, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, ptr %3, align 8
%12 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
%13 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %12, align 8
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %13)
%15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %13, 0
%16 = getelementptr ptr, ptr %15, i64 3
%17 = load ptr, ptr %16, align 8
%18 = insertvalue { ptr, ptr } undef, ptr %17, 0
%19 = insertvalue { ptr, ptr } %18, ptr %14, 1
%20 = extractvalue { ptr, ptr } %19, 1
%21 = extractvalue { ptr, ptr } %19, 0
%22 = call i64 %21(ptr %20)
%23 = icmp ne i64 %22, 1
br i1 %23, label %_llgo_1, label %_llgo_2
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", align 8
call void @llvm.memset(ptr %0, i8 0, i64 16, i1 false)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", align 8
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
store %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl" zeroinitializer, ptr %3, align 1
%4 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%6 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %6, ptr %2)
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %7, 0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, ptr %3, 1
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %9, ptr %1, align 8
%10 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%11 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %10, align 8
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %11)
%13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %11, 0
%14 = getelementptr ptr, ptr %13, i64 3
%15 = load ptr, ptr %14, align 8
%16 = insertvalue { ptr, ptr } undef, ptr %15, 0
%17 = insertvalue { ptr, ptr } %16, ptr %12, 1
%18 = extractvalue { ptr, ptr } %17, 1
%19 = extractvalue { ptr, ptr } %17, 0
%20 = call i64 %19(ptr %18)
%21 = icmp ne i64 %20, 1
br i1 %21, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%24 = load ptr, ptr @_llgo_int, align 8
%25 = inttoptr i64 %22 to ptr
%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)
%22 = load ptr, ptr @_llgo_int, align 8
%23 = inttoptr i64 %20 to ptr
%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)
unreachable
_llgo_2: ; preds = %_llgo_0
%28 = load %main.S, ptr %2, align 8
%29 = extractvalue %main.S %28, 0
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %29)
%31 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %29, 0
%32 = getelementptr ptr, ptr %31, i64 3
%33 = load ptr, ptr %32, align 8
%34 = insertvalue { ptr, ptr } undef, ptr %33, 0
%35 = insertvalue { ptr, ptr } %34, ptr %30, 1
%36 = extractvalue { ptr, ptr } %35, 1
%37 = extractvalue { ptr, ptr } %35, 0
%38 = call i64 %37(ptr %36)
%39 = icmp ne i64 %38, 1
br i1 %39, label %_llgo_3, label %_llgo_4
%26 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8
%27 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %26, 0
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %27)
%29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %27, 0
%30 = getelementptr ptr, ptr %29, i64 3
%31 = load ptr, ptr %30, align 8
%32 = insertvalue { ptr, ptr } undef, ptr %31, 0
%33 = insertvalue { ptr, ptr } %32, ptr %28, 1
%34 = extractvalue { ptr, ptr } %33, 1
%35 = extractvalue { ptr, ptr } %33, 0
%36 = call i64 %35(ptr %34)
%37 = icmp ne i64 %36, 1
br i1 %37, label %_llgo_3, label %_llgo_4
_llgo_3: ; preds = %_llgo_2
%40 = load ptr, ptr @_llgo_int, align 8
%41 = inttoptr i64 %38 to ptr
%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_int, align 8
%39 = inttoptr i64 %36 to ptr
%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
_llgo_4: ; preds = %_llgo_2
%44 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
%45 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %44, align 8
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %45)
%47 = load ptr, ptr @_llgo_main.I, align 8
%48 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %47, ptr %46)
br i1 %48, label %_llgo_17, label %_llgo_18
%42 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%43 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %42, align 8
%44 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %43)
%45 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8
%46 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %45, ptr %44)
br i1 %46, label %_llgo_17, label %_llgo_18
_llgo_5: ; preds = %_llgo_17
%49 = load ptr, ptr @_llgo_int, align 8
%50 = inttoptr i64 %124 to ptr
%51 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %49, 0
%52 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %51, ptr %50, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %52)
%47 = load ptr, ptr @_llgo_int, align 8
%48 = inttoptr i64 %122 to ptr
%49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %47, 0
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %49, ptr %48, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %50)
unreachable
_llgo_6: ; preds = %_llgo_17
%53 = load %main.S, ptr %2, align 8
%54 = extractvalue %main.S %53, 0
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %54)
%56 = load ptr, ptr @_llgo_main.I, align 8
%57 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %56, ptr %55)
br i1 %57, label %_llgo_19, label %_llgo_20
%51 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8
%52 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %51, 0
%53 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %52)
%54 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8
%55 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %54, ptr %53)
br i1 %55, label %_llgo_19, label %_llgo_20
_llgo_7: ; preds = %_llgo_19
%58 = load ptr, ptr @_llgo_int, align 8
%59 = inttoptr i64 %140 to ptr
%60 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %58, 0
%61 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %60, ptr %59, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %61)
%56 = load ptr, ptr @_llgo_int, align 8
%57 = inttoptr i64 %138 to ptr
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %56, 0
%59 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %58, ptr %57, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %59)
unreachable
_llgo_8: ; preds = %_llgo_19
%62 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
%63 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %62, align 8
%64 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %63)
%65 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %63, 0
%66 = getelementptr ptr, ptr %65, i64 4
%67 = load ptr, ptr %66, align 8
%68 = insertvalue { ptr, ptr } undef, ptr %67, 0
%69 = insertvalue { ptr, ptr } %68, ptr %64, 1
%70 = extractvalue { ptr, ptr } %69, 1
%71 = extractvalue { ptr, ptr } %69, 0
%72 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %71(ptr %70)
%73 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %72, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%74 = xor i1 %73, true
br i1 %74, label %_llgo_9, label %_llgo_10
%60 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%61 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %60, align 8
%62 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %61)
%63 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %61, 0
%64 = getelementptr ptr, ptr %63, i64 4
%65 = load ptr, ptr %64, align 8
%66 = insertvalue { ptr, ptr } undef, ptr %65, 0
%67 = insertvalue { ptr, ptr } %66, ptr %62, 1
%68 = extractvalue { ptr, ptr } %67, 1
%69 = extractvalue { ptr, ptr } %67, 0
%70 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %69(ptr %68)
%71 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %70, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%72 = xor i1 %71, true
br i1 %72, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
%75 = load ptr, ptr @_llgo_string, align 8
%76 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %72, ptr %76, align 8
%77 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %75, 0
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %77, ptr %76, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %78)
%73 = load ptr, ptr @_llgo_string, align 8
%74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %70, 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 @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %76)
unreachable
_llgo_10: ; preds = %_llgo_8
%79 = load %main.S, ptr %2, align 8
%80 = extractvalue %main.S %79, 0
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %80)
%82 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %80, 0
%83 = getelementptr ptr, ptr %82, i64 4
%84 = load ptr, ptr %83, align 8
%85 = insertvalue { ptr, ptr } undef, ptr %84, 0
%86 = insertvalue { ptr, ptr } %85, ptr %81, 1
%87 = extractvalue { ptr, ptr } %86, 1
%88 = extractvalue { ptr, ptr } %86, 0
%89 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %88(ptr %87)
%90 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %89, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%91 = xor i1 %90, true
br i1 %91, label %_llgo_11, label %_llgo_12
%77 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8
%78 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %77, 0
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %78)
%80 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %78, 0
%81 = getelementptr ptr, ptr %80, i64 4
%82 = load ptr, ptr %81, align 8
%83 = insertvalue { ptr, ptr } undef, ptr %82, 0
%84 = insertvalue { ptr, ptr } %83, ptr %79, 1
%85 = extractvalue { ptr, ptr } %84, 1
%86 = extractvalue { ptr, ptr } %84, 0
%87 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %86(ptr %85)
%88 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %87, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%89 = xor i1 %88, true
br i1 %89, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
%92 = load ptr, ptr @_llgo_string, align 8
%93 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %89, ptr %93, align 8
%94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %92, 0
%95 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %94, ptr %93, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %95)
%90 = load ptr, ptr @_llgo_string, align 8
%91 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %87, ptr %91, align 8
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %90, 0
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %92, ptr %91, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %93)
unreachable
_llgo_12: ; preds = %_llgo_10
%96 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
%97 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %96, align 8
%98 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %97)
%99 = load ptr, ptr @_llgo_main.I, align 8
%100 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %99, ptr %98)
br i1 %100, label %_llgo_21, label %_llgo_22
%94 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, i32 0, i32 0
%95 = load %"github.com/goplus/llgo/runtime/internal/runtime.iface", ptr %94, align 8
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %95)
%97 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8
%98 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %97, ptr %96)
br i1 %98, label %_llgo_21, label %_llgo_22
_llgo_13: ; preds = %_llgo_21
%101 = load ptr, ptr @_llgo_string, align 8
%102 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %156, ptr %102, align 8
%103 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %101, 0
%104 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %103, ptr %102, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %104)
%99 = load ptr, ptr @_llgo_string, align 8
%100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %154, ptr %100, align 8
%101 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %99, 0
%102 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %101, ptr %100, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %102)
unreachable
_llgo_14: ; preds = %_llgo_21
%105 = load %main.S, ptr %2, align 8
%106 = extractvalue %main.S %105, 0
%107 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %106)
%108 = load ptr, ptr @_llgo_main.I, align 8
%109 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %108, ptr %107)
br i1 %109, label %_llgo_23, label %_llgo_24
%103 = load %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S", ptr %0, align 8
%104 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.S" %103, 0
%105 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %104)
%106 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8
%107 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %106, ptr %105)
br i1 %107, label %_llgo_23, label %_llgo_24
_llgo_15: ; preds = %_llgo_23
%110 = load ptr, ptr @_llgo_string, align 8
%111 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %173, ptr %111, align 8
%112 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %110, 0
%113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %112, ptr %111, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %113)
%108 = load ptr, ptr @_llgo_string, align 8
%109 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/runtime/internal/runtime.String" %171, ptr %109, align 8
%110 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %108, 0
%111 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %110, ptr %109, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %111)
unreachable
_llgo_16: ; preds = %_llgo_23
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 4 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
_llgo_17: ; preds = %_llgo_4
%114 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %45, 1
%115 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %115, ptr %46)
%117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %116, 0
%118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %117, ptr %114, 1
%119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%120 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %119, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %45, ptr %120, align 8
%121 = insertvalue { ptr, ptr } { ptr @"main.one$bound", ptr undef }, ptr %119, 1
%122 = extractvalue { ptr, ptr } %121, 1
%123 = extractvalue { ptr, ptr } %121, 0
%124 = call i64 %123(ptr %122)
%125 = icmp ne i64 %124, 1
br i1 %125, label %_llgo_5, label %_llgo_6
%112 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %43, 1
%113 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%114 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %113, ptr %44)
%115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %114, 0
%116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %115, ptr %112, 1
%117 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%118 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %117, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %43, ptr %118, align 8
%119 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one$bound", ptr undef }, ptr %117, 1
%120 = extractvalue { ptr, ptr } %119, 1
%121 = extractvalue { ptr, ptr } %119, 0
%122 = call i64 %121(ptr %120)
%123 = icmp ne i64 %122, 1
br i1 %123, label %_llgo_5, label %_llgo_6
_llgo_18: ; preds = %_llgo_4
%126 = load ptr, ptr @_llgo_string, align 8
%127 = 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 %127, align 8
%128 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %126, 0
%129 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %128, ptr %127, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %129)
%124 = load ptr, ptr @_llgo_string, align 8
%125 = 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 %125, align 8
%126 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %124, 0
%127 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %126, ptr %125, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %127)
unreachable
_llgo_19: ; preds = %_llgo_6
%130 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %54, 1
%131 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%132 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %131, ptr %55)
%133 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %132, 0
%134 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %133, ptr %130, 1
%135 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%136 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %135, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %54, ptr %136, align 8
%137 = insertvalue { ptr, ptr } { ptr @"main.one$bound", ptr undef }, ptr %135, 1
%138 = extractvalue { ptr, ptr } %137, 1
%139 = extractvalue { ptr, ptr } %137, 0
%140 = call i64 %139(ptr %138)
%141 = icmp ne i64 %140, 1
br i1 %141, label %_llgo_7, label %_llgo_8
%128 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %52, 1
%129 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%130 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %129, ptr %53)
%131 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %130, 0
%132 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %131, ptr %128, 1
%133 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%134 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %133, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %52, ptr %134, align 8
%135 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one$bound", ptr undef }, ptr %133, 1
%136 = extractvalue { ptr, ptr } %135, 1
%137 = extractvalue { ptr, ptr } %135, 0
%138 = call i64 %137(ptr %136)
%139 = icmp ne i64 %138, 1
br i1 %139, label %_llgo_7, label %_llgo_8
_llgo_20: ; preds = %_llgo_6
%142 = load ptr, ptr @_llgo_string, align 8
%143 = 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 %143, align 8
%144 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %142, 0
%145 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %144, ptr %143, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %145)
%140 = load ptr, ptr @_llgo_string, align 8
%141 = 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 %141, align 8
%142 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %140, 0
%143 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %142, ptr %141, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %143)
unreachable
_llgo_21: ; preds = %_llgo_12
%146 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %97, 1
%147 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%148 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %147, ptr %98)
%149 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %148, 0
%150 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %149, ptr %146, 1
%151 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%152 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %151, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %97, ptr %152, align 8
%153 = insertvalue { ptr, ptr } { ptr @"main.two$bound", ptr undef }, ptr %151, 1
%154 = extractvalue { ptr, ptr } %153, 1
%155 = extractvalue { ptr, ptr } %153, 0
%156 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %155(ptr %154)
%157 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %156, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%158 = xor i1 %157, true
br i1 %158, label %_llgo_13, label %_llgo_14
%144 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %95, 1
%145 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%146 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %145, ptr %96)
%147 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %146, 0
%148 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %147, ptr %144, 1
%149 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%150 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %149, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %95, ptr %150, align 8
%151 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two$bound", ptr undef }, ptr %149, 1
%152 = extractvalue { ptr, ptr } %151, 1
%153 = extractvalue { ptr, ptr } %151, 0
%154 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %153(ptr %152)
%155 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %154, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%156 = xor i1 %155, true
br i1 %156, label %_llgo_13, label %_llgo_14
_llgo_22: ; preds = %_llgo_12
%159 = load ptr, ptr @_llgo_string, align 8
%160 = 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 %160, align 8
%161 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %159, 0
%162 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %161, ptr %160, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %162)
%157 = load ptr, ptr @_llgo_string, align 8
%158 = 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 %158, align 8
%159 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %157, 0
%160 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %159, ptr %158, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %160)
unreachable
_llgo_23: ; preds = %_llgo_14
%163 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %106, 1
%164 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%165 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %164, ptr %107)
%166 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %165, 0
%167 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %166, ptr %163, 1
%168 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%169 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %168, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %106, ptr %169, align 8
%170 = insertvalue { ptr, ptr } { ptr @"main.two$bound", ptr undef }, ptr %168, 1
%171 = extractvalue { ptr, ptr } %170, 1
%172 = extractvalue { ptr, ptr } %170, 0
%173 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %172(ptr %171)
%174 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %173, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%175 = xor i1 %174, true
br i1 %175, label %_llgo_15, label %_llgo_16
%161 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %104, 1
%162 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%163 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %162, ptr %105)
%164 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %163, 0
%165 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %164, ptr %161, 1
%166 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
%167 = getelementptr inbounds { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %166, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.iface" %104, ptr %167, align 8
%168 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two$bound", ptr undef }, ptr %166, 1
%169 = extractvalue { ptr, ptr } %168, 1
%170 = extractvalue { ptr, ptr } %168, 0
%171 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" %170(ptr %169)
%172 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %171, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 3 })
%173 = xor i1 %172, true
br i1 %173, label %_llgo_15, label %_llgo_16
_llgo_24: ; preds = %_llgo_14
%176 = load ptr, ptr @_llgo_string, align 8
%177 = 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 %177, align 8
%178 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %176, 0
%179 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %178, ptr %177, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %179)
%174 = load ptr, ptr @_llgo_string, align 8
%175 = 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 %175, align 8
%176 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %174, 0
%177 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %176, ptr %175, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %177)
unreachable
}
@@ -433,17 +427,15 @@ declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.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 4 }, i64 25, i64 0, i64 2, i64 2)
store ptr %0, ptr @_llgo_main.impl, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 }, i64 25, i64 0, i64 2, i64 2)
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 0)
%2 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %1, 0
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, i64 0, 1
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3, i64 0, 2
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4)
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4)
store ptr %5, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%7 = load ptr, ptr @_llgo_int, align 8
@@ -480,12 +472,12 @@ _llgo_3: ; preds = %_llgo_2
_llgo_4: ; preds = %_llgo_3, %_llgo_2
%24 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1
%26 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %25, ptr @"main.(*impl).one", 2
%27 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %26, ptr @"main.(*impl).one", 3
%28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"main.(*impl).one", 2
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @main.impl.one, 3
%25 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1
%26 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %25, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one", 2
%27 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %26, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one", 3
%28 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %24, 1
%29 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %28, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).one", 2
%30 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %29, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.one", 3
%31 = load ptr, ptr @_llgo_string, align 8
%32 = icmp eq ptr %31, null
br i1 %32, label %_llgo_5, label %_llgo_6
@@ -520,12 +512,12 @@ _llgo_7: ; preds = %_llgo_6
_llgo_8: ; preds = %_llgo_7, %_llgo_6
%48 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%49 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1
%50 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %49, ptr @"main.(*impl).two", 2
%51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %50, ptr @"main.(*impl).two", 3
%52 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1
%53 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %52, ptr @"main.(*impl).two", 2
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %53, ptr @main.impl.two, 3
%49 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1
%50 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %49, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two", 2
%51 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %50, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two", 3
%52 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef, ptr undef, ptr undef }, ptr %48, 1
%53 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %52, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.(*impl).two", 2
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %53, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.impl.two", 3
%55 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
%56 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %55, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %30, ptr %56, align 8
@@ -545,8 +537,8 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %0, ptr %6, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %60, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %66)
%67 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%68 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
%69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %67, 1
%70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %68, 1
%69 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef }, ptr %67, 1
%70 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef }, ptr %68, 1
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
%72 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %71, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %69, ptr %72, align 8
@@ -555,15 +547,15 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6
%74 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %71, 0
%75 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %74, i64 2, 1
%76 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %75, i64 2, 2
%77 = 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" %76)
store ptr %77, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 })
%79 = load ptr, ptr @_llgo_main.I, align 8
%77 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %76)
store ptr %77, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 1 })
%79 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8
%80 = icmp eq ptr %79, null
br i1 %80, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
store ptr %78, ptr @_llgo_main.I, align 8
store ptr %78, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.I", align 8
br label %_llgo_10
_llgo_10: ; preds = %_llgo_9, %_llgo_8
@@ -572,8 +564,8 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
br i1 %80, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
%83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %81, 1
%84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %82, 1
%83 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 56 }, ptr undef }, ptr %81, 1
%84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 56 }, ptr undef }, ptr %82, 1
%85 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
%86 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %85, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %83, ptr %86, align 8
@@ -619,7 +611,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamedInterfac
declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr, ptr)
define i64 @"main.one$bound"(ptr %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.one$bound"(ptr %0) {
_llgo_0:
%1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %0, align 8
%2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %1, 0
@@ -637,7 +629,7 @@ _llgo_0:
declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.StringEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.String")
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"main.two$bound"(ptr %0) {
define %"github.com/goplus/llgo/runtime/internal/runtime.String" @"github.com/goplus/llgo/compiler/cl/_testgo/ifaceprom.two$bound"(ptr %0) {
_llgo_0:
%1 = load { %"github.com/goplus/llgo/runtime/internal/runtime.iface" }, ptr %0, align 8
%2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %1, 0

View File

@@ -1,7 +1,7 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/interface'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/interface"
%main.Game1 = type { ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" = type { ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@@ -10,11 +10,9 @@ source_filename = "main"
%"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.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
@_llgo_main.Game1 = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/interface.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/interface", align 1
@1 = private unnamed_addr constant [5 x i8] c"Game1", align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo", align 1
@@ -26,166 +24,162 @@ source_filename = "main"
@6 = private unnamed_addr constant [57 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo.initGame", align 1
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Game" = linkonce global ptr null, align 8
@"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o" = linkonce global ptr null, align 8
@"*_llgo_main.Game1" = linkonce global ptr null, align 8
@_llgo_main.Game2 = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [5 x i8] c"Game2", align 1
@8 = private unnamed_addr constant [13 x i8] c"main.initGame", align 1
@"*_llgo_main.Game2" = linkonce global ptr null, align 8
@8 = private unnamed_addr constant [61 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/interface.initGame", align 1
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer" = linkonce global ptr null, align 8
@9 = private unnamed_addr constant [5 x i8] c"Gamer", align 1
@"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = linkonce global ptr null, align 8
@10 = private unnamed_addr constant [2 x i8] c"OK", align 1
@11 = private unnamed_addr constant [4 x i8] c"FAIL", align 1
define void @main.Game1.Load(%main.Game1 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1.Load"(%"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0) {
_llgo_0:
%1 = alloca %main.Game1, align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false)
store %main.Game1 %0, ptr %1, align 8
%2 = getelementptr inbounds %main.Game1, ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %1, i32 0, i32 0
%3 = load ptr, ptr %2, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load"(ptr %3)
ret void
}
define void @main.Game1.initGame(%main.Game1 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1.initGame"(%"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0) {
_llgo_0:
%1 = alloca %main.Game1, align 8
%1 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false)
store %main.Game1 %0, ptr %1, align 8
%2 = getelementptr inbounds %main.Game1, ptr %1, i32 0, i32 0
store %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1" %0, ptr %1, align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %1, i32 0, i32 0
%3 = load ptr, ptr %2, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame"(ptr %3)
ret void
}
define void @"main.(*Game1).Load"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %main.Game1, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0
%2 = load ptr, ptr %1, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).Load"(ptr %2)
ret void
}
define void @"main.(*Game1).initGame"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).initGame"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %main.Game1, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0
%2 = load ptr, ptr %1, align 8
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame"(ptr %2)
ret void
}
define void @"main.(*Game2).initGame"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game2).initGame"(ptr %0) {
_llgo_0:
ret void
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.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/_testgo/interface.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"()
call void @"main.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/interface.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/_testgo/interface.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 %main.Game1, ptr %2, i32 0, i32 0
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
store ptr %4, ptr %3, align 8
%5 = load ptr, ptr @_llgo_main.Game1, align 8
%6 = load ptr, ptr @"*_llgo_main.Game1", 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 %2, 1
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
%10 = load ptr, ptr @_llgo_main.Game2, align 8
%11 = load ptr, ptr @"*_llgo_main.Game2", 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 %9, 1
%14 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, 0
%15 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
%16 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %15, ptr %14)
br i1 %16, label %_llgo_3, label %_llgo_4
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", ptr %0, i32 0, i32 0
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
store ptr %2, ptr %1, align 8
%3 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
%4 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", 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 %0, 1
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 0)
%8 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8
%9 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", 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 %7, 1
%12 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 0
%13 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
%14 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %13, ptr %12)
br i1 %14, label %_llgo_3, label %_llgo_4
_llgo_1: ; preds = %_llgo_5
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %36)
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %36, 0
%19 = getelementptr ptr, ptr %18, i64 3
%20 = load ptr, ptr %19, align 8
%21 = insertvalue { ptr, ptr } undef, ptr %20, 0
%22 = insertvalue { ptr, ptr } %21, ptr %17, 1
%23 = extractvalue { ptr, ptr } %22, 1
%24 = extractvalue { ptr, ptr } %22, 0
call void %24(ptr %23)
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %34)
%16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %34, 0
%17 = getelementptr ptr, ptr %16, i64 3
%18 = load ptr, ptr %17, align 8
%19 = insertvalue { ptr, ptr } undef, ptr %18, 0
%20 = insertvalue { ptr, ptr } %19, ptr %15, 1
%21 = extractvalue { ptr, ptr } %20, 1
%22 = extractvalue { ptr, ptr } %20, 0
call void %22(ptr %21)
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_5
%25 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, 0
%26 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
%27 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %26, ptr %25)
br i1 %27, label %_llgo_6, label %_llgo_7
%23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 0
%24 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Gamer", align 8
%25 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %24, ptr %23)
br i1 %25, label %_llgo_6, label %_llgo_7
_llgo_3: ; preds = %_llgo_0
%28 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, 1
%29 = load ptr, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %29, ptr %14)
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %30, 0
%32 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %31, ptr %28, 1
%33 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %32, 0
%34 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %33, i1 true, 1
%26 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, 1
%27 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
%28 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %27, ptr %12)
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %28, 0
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %29, ptr %26, 1
%31 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %30, 0
%32 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %31, i1 true, 1
br label %_llgo_5
_llgo_4: ; preds = %_llgo_0
br label %_llgo_5
_llgo_5: ; preds = %_llgo_4, %_llgo_3
%35 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %34, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%36 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %35, 0
%37 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %35, 1
%33 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %32, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
%34 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %33, 0
%35 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %33, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @10, i64 2 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %36)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %34)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %37)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %35)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br i1 %37, label %_llgo_1, label %_llgo_2
br i1 %35, label %_llgo_1, label %_llgo_2
_llgo_6: ; preds = %_llgo_2
%38 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %13, 1
%39 = load ptr, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
%40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %39, ptr %25)
%41 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %40, 0
%42 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %41, ptr %38, 1
%43 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %42, 0
%44 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %43, i1 true, 1
%36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 1
%37 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
%38 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %37, ptr %23)
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %38, 0
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %39, ptr %36, 1
%41 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/runtime/internal/runtime.iface" %40, 0
%42 = insertvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %41, i1 true, 1
br label %_llgo_8
_llgo_7: ; preds = %_llgo_2
br label %_llgo_8
_llgo_8: ; preds = %_llgo_7, %_llgo_6
%45 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %44, %_llgo_6 ], [ zeroinitializer, %_llgo_7 ]
%46 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %45, 0
%47 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %45, 1
%43 = phi { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } [ %42, %_llgo_6 ], [ zeroinitializer, %_llgo_7 ]
%44 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %43, 0
%45 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.iface", i1 } %43, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 4 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %46)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintIface"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %44)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %47)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %45)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
@@ -197,20 +191,18 @@ declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame
declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"()
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/_testgo/interface.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 5 }, i64 25, i64 8, i64 2, i64 2)
%1 = load ptr, ptr @_llgo_main.Game1, align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
%2 = icmp eq ptr %1, null
br i1 %2, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %0)
store ptr %0, ptr @_llgo_main.Game1, align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -228,7 +220,7 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %6, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 0, 1
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 0, 2
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
store ptr %10, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%11 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
br i1 %5, label %_llgo_5, label %_llgo_6
@@ -296,7 +288,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_6
%48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %46, 0
%49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 1, 1
%50 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49, i64 1, 2
%51 = 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" %50)
%51 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %51)
store ptr %51, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
%52 = load ptr, ptr @"_llgo_struct$8pZiNl4ZxK-lZr-eyXOGJ2lgSsNDx-SmrHiChs0Nc-o", align 8
@@ -305,11 +297,11 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_6
_llgo_11: ; preds = %_llgo_10
%53 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%54 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1
%55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"main.(*Game1).Load", 2
%56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"main.(*Game1).Load", 3
%55 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %54, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load", 2
%56 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %55, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load", 3
%57 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %53, 1
%58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %57, ptr @"main.(*Game1).Load", 2
%59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @main.Game1.Load, 3
%58 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %57, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game1).Load", 2
%59 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %58, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1.Load", 3
%60 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 57 }, ptr undef, ptr undef, ptr undef }, ptr %60, 1
%62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.(*Game).initGame", 2
@@ -332,25 +324,25 @@ _llgo_11: ; preds = %_llgo_10
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_10
%75 = 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 5 }, i64 25, i64 8, i64 2, i64 2)
%76 = load ptr, ptr @"*_llgo_main.Game1", align 8
%75 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2)
%76 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
%77 = icmp eq ptr %76, null
br i1 %77, label %_llgo_13, label %_llgo_14
_llgo_13: ; preds = %_llgo_12
%78 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %75)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %78)
store ptr %78, ptr @"*_llgo_main.Game1", align 8
store ptr %78, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game1", align 8
br label %_llgo_14
_llgo_14: ; preds = %_llgo_13, %_llgo_12
%79 = 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 @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
%80 = load ptr, ptr @_llgo_main.Game2, align 8
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
%80 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8
%81 = icmp eq ptr %80, null
br i1 %81, label %_llgo_15, label %_llgo_16
_llgo_15: ; preds = %_llgo_14
store ptr %79, ptr @_llgo_main.Game2, align 8
store ptr %79, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8
br label %_llgo_16
_llgo_16: ; preds = %_llgo_15, %_llgo_14
@@ -359,9 +351,9 @@ _llgo_16: ; preds = %_llgo_15, %_llgo_14
_llgo_17: ; preds = %_llgo_16
%83 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
%84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 13 }, ptr undef, ptr undef, ptr undef }, ptr %83, 1
%85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %84, ptr @"main.(*Game2).initGame", 2
%86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"main.(*Game2).initGame", 3
%84 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 61 }, ptr undef, ptr undef, ptr undef }, ptr %83, 1
%85 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %84, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game2).initGame", 2
%86 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %85, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.(*Game2).initGame", 3
%87 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%88 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %87, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %86, ptr %88, align 8
@@ -372,15 +364,15 @@ _llgo_17: ; preds = %_llgo_16
br label %_llgo_18
_llgo_18: ; preds = %_llgo_17, %_llgo_16
%92 = 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 @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
%93 = load ptr, ptr @"*_llgo_main.Game2", align 8
%92 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
%93 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8
%94 = icmp eq ptr %93, null
br i1 %94, label %_llgo_19, label %_llgo_20
_llgo_19: ; preds = %_llgo_18
%95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %92)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %95)
store ptr %95, ptr @"*_llgo_main.Game2", align 8
store ptr %95, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/interface.Game2", align 8
br label %_llgo_20
_llgo_20: ; preds = %_llgo_19, %_llgo_18
@@ -425,8 +417,8 @@ _llgo_24: ; preds = %_llgo_23, %_llgo_22
%116 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %113, 0
%117 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %116, i64 2, 1
%118 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %117, i64 2, 2
%119 = 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" %118)
store ptr %119, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
%119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %118)
store ptr %119, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/interface.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
ret void
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,51 +1,43 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/multiret'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/multiret"
@main.a = global i64 0, align 8
@"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/_testgo/multiret.a" = global i64 0, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init$guard" = global i1 false, align 1
define { i64, double } @main.foo(double %0) {
define { i64, double } @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.foo"(double %0) {
_llgo_0:
%1 = load i64, ptr @main.a, align 4
%1 = load i64, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.a", align 4
%2 = insertvalue { i64, double } undef, i64 %1, 0
%3 = insertvalue { i64, double } %2, double %0, 1
ret { i64, double } %3
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.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 i64 1, ptr @main.a, align 4
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.init$guard", align 1
store i64 1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.a", 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/_testgo/multiret.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 { i64, double } @main.foo(double 2.000000e+00)
%3 = extractvalue { i64, double } %2, 0
%4 = extractvalue { i64, double } %2, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
%0 = call { i64, double } @"github.com/goplus/llgo/compiler/cl/_testgo/multiret.foo"(double 2.000000e+00)
%1 = extractvalue { i64, double } %0, 0
%2 = extractvalue { i64, double } %0, 1
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %2)
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.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -1,38 +1,30 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/print'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/print"
@"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/_testgo/print.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/print.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/print.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/_testgo/print.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/_testgo/print.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 46)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 46)
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.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/reflect'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/reflect"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%main.T = type { i64 }
%"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T" = type { i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%reflect.Value = type { ptr, ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
@@ -11,38 +11,36 @@ 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
@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [11 x i8] c"call.method", 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/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8
@1 = private unnamed_addr constant [2 x i8] c"$f", align 1
@2 = private unnamed_addr constant [5 x i8] c"$data", align 1
@3 = private unnamed_addr constant [4 x i8] c"main", align 1
@3 = private unnamed_addr constant [50 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/reflect", align 1
@4 = private unnamed_addr constant [7 x i8] c"closure", align 1
@5 = private unnamed_addr constant [5 x i8] c"error", align 1
@_llgo_string = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [12 x i8] c"call.closure", align 1
@7 = private unnamed_addr constant [4 x i8] c"func", align 1
@8 = private unnamed_addr constant [9 x i8] c"call.func", align 1
@_llgo_main.T = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T" = linkonce global ptr null, align 8
@9 = private unnamed_addr constant [1 x i8] c"T", align 1
@"main.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U" = linkonce global ptr null, align 8
@10 = private unnamed_addr constant [1 x i8] c"n", align 1
@11 = private unnamed_addr constant [3 x i8] c"Add", align 1
@"*_llgo_main.T" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T" = linkonce global ptr null, align 8
@"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A" = linkonce global ptr null, align 8
@12 = private unnamed_addr constant [7 x i8] c"imethod", align 1
@13 = private unnamed_addr constant [6 x i8] c"method", align 1
@_llgo_any = linkonce global ptr null, align 8
@"[]_llgo_any" = linkonce global ptr null, align 8
@"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU" = linkonce global ptr null, align 8
@"main.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk" = linkonce global ptr null, align 8
@14 = private unnamed_addr constant [10 x i8] c"call.slice", align 1
@15 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8
@16 = private unnamed_addr constant [7 x i8] c"topbits", align 1
@17 = private unnamed_addr constant [4 x i8] c"keys", align 1
@@ -55,32 +53,32 @@ source_filename = "main"
@24 = private unnamed_addr constant [12 x i8] c"must invalid", align 1
@25 = private unnamed_addr constant [13 x i8] c"MapIter error", align 1
define i64 @"main.(*T).Add"(ptr %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.(*T).Add"(ptr %0, i64 %1) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 11 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%2 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0
%3 = load i64, ptr %2, align 4
%4 = add i64 %3, %1
%5 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0
store i64 %4, ptr %5, align 4
%6 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0
%7 = load i64, ptr %6, align 4
ret i64 %7
}
define void @main.callClosure() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
store i64 100, 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 @"main.callClosure$1", ptr undef }, ptr %1, 1
%3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure$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 @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%7 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.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
@@ -125,7 +123,7 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%39 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %11)
%40 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %39, 0
%41 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%41 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%42 = icmp eq ptr %40, %41
br i1 %42, label %_llgo_3, label %_llgo_4
@@ -161,7 +159,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3
br i1 %56, label %_llgo_2, label %_llgo_1
}
define i64 @"main.callClosure$1"(ptr %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure$1"(ptr %0, i64 %1) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 12 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
@@ -173,11 +171,11 @@ _llgo_0:
ret i64 %6
}
define void @main.callFunc() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc"() {
_llgo_0:
%0 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%0 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store { ptr, ptr } { ptr @"__llgo_stub.main.callFunc$1", ptr null }, ptr %1, align 8
store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1", ptr null }, 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 %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %3)
@@ -220,7 +218,7 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%32 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %4)
%33 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %32, 0
%34 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%34 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%35 = icmp eq ptr %33, %34
br i1 %35, label %_llgo_3, label %_llgo_4
@@ -256,7 +254,7 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3
br i1 %49, label %_llgo_2, label %_llgo_1
}
define i64 @"main.callFunc$1"(i64 %0) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1"(i64 %0) {
_llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @8, i64 9 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
@@ -264,13 +262,13 @@ _llgo_0:
ret i64 %1
}
define void @main.callIMethod() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callIMethod"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0
store i64 1, ptr %1, align 4
%2 = load ptr, ptr @_llgo_main.T, align 8
%3 = load ptr, ptr @"*_llgo_main.T", align 8
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8
%3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8
%4 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
%5 = load ptr, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %3)
@@ -321,7 +319,7 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%42 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %14)
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %42, 0
%44 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%44 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%45 = icmp eq ptr %43, %44
br i1 %45, label %_llgo_3, label %_llgo_4
@@ -379,12 +377,12 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3
br i1 %77, label %_llgo_2, label %_llgo_1
}
define void @main.callMethod() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callMethod"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", ptr %0, i32 0, i32 0
store i64 1, ptr %1, align 4
%2 = load ptr, ptr @"*_llgo_main.T", align 8
%2 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", 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 %0, 1
%5 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %4)
@@ -428,7 +426,7 @@ _llgo_0:
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%34 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.Interface(%reflect.Value %6)
%35 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %34, 0
%36 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%36 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
%37 = icmp eq ptr %35, %36
br i1 %37, label %_llgo_3, label %_llgo_4
@@ -486,14 +484,14 @@ _llgo_5: ; preds = %_llgo_4, %_llgo_3
br i1 %69, label %_llgo_2, label %_llgo_1
}
define void @main.callSlice() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callSlice"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_any, align 8
%1 = load ptr, ptr @"[]_llgo_any", align 8
%2 = load ptr, ptr @"_llgo_func$KK0iU4Wpi3BdRqssvycXqtgNe2Dq1riBlM61Rds1QsU", align 8
%3 = load ptr, ptr @"main.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8
%3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", 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/_testgo/reflect.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 = call %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6)
@@ -635,7 +633,7 @@ _llgo_0:
ret void
}
define { i64, i64 } @main.demo(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) {
define { i64, i64 } @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9) {
_llgo_0:
%10 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, 1
br label %_llgo_1
@@ -690,38 +688,34 @@ _llgo_5: ; preds = %_llgo_2
unreachable
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.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/_testgo/reflect.init$guard", align 1
call void @reflect.init()
call void @"main.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.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/_testgo/reflect.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.callSlice()
call void @main.callFunc()
call void @main.callClosure()
call void @main.callMethod()
call void @main.callIMethod()
call void @main.mapDemo1()
call void @main.mapDemo2()
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callSlice"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callClosure"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callMethod"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callIMethod"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo1"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo2"()
ret void
}
define void @main.mapDemo1() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo1"() {
_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 2)
@@ -885,7 +879,7 @@ _llgo_14: ; preds = %_llgo_10
br i1 %98, label %_llgo_13, label %_llgo_12
}
define void @main.mapDemo2() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.mapDemo2"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %0, 0
@@ -1077,7 +1071,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
declare %reflect.Value @reflect.ValueOf(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null
@@ -1151,8 +1145,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 @3, 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 @3, i64 50 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %42)
store ptr %43, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.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
@@ -1163,13 +1157,13 @@ _llgo_7: ; preds = %_llgo_6
br label %_llgo_8
_llgo_8: ; preds = %_llgo_7, %_llgo_6
%47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1)
%48 = load ptr, ptr @_llgo_main.T, align 8
%47 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1)
%48 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8
%49 = icmp eq ptr %48, null
br i1 %49, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
store ptr %47, ptr @_llgo_main.T, align 8
store ptr %47, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8
br label %_llgo_10
_llgo_10: ; preds = %_llgo_9, %_llgo_8
@@ -1181,16 +1175,16 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
%54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %52, 0
%55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, i64 1, 1
%56 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55, i64 1, 2
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56)
store ptr %57, ptr @"main.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8
%58 = load ptr, ptr @"main.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8
%57 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %56)
store ptr %57, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8
%58 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$eovYmOhZg4X0zMSsuscSshndnbbAGvB2E3cyG8E7Y4U", align 8
br i1 %49, label %_llgo_11, label %_llgo_12
_llgo_11: ; preds = %_llgo_10
%59 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
%60 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @11, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %59, 1
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"main.(*T).Add", 2
%62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"main.(*T).Add", 3
%61 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %60, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.(*T).Add", 2
%62 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %61, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.(*T).Add", 3
%63 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 40)
%64 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %63, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %62, ptr %64, align 8
@@ -1201,15 +1195,15 @@ _llgo_11: ; preds = %_llgo_10
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_10
%68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1)
%69 = load ptr, ptr @"*_llgo_main.T", align 8
%68 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 8, i64 0, i64 1)
%69 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8
%70 = icmp eq ptr %69, null
br i1 %70, label %_llgo_13, label %_llgo_14
_llgo_13: ; preds = %_llgo_12
%71 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %68)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %71)
store ptr %71, ptr @"*_llgo_main.T", align 8
store ptr %71, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/reflect.T", align 8
br label %_llgo_14
_llgo_14: ; preds = %_llgo_13, %_llgo_12
@@ -1226,7 +1220,7 @@ _llgo_15: ; preds = %_llgo_14
%78 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %76, 0
%79 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %78, i64 1, 1
%80 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %79, i64 1, 2
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80)
%81 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %80)
store ptr %81, ptr @"_llgo_iface$VdBKYV8-gcMjZtZfcf-u2oKoj9Lu3VXwuG8TGCW2S4A", align 8
br label %_llgo_16
@@ -1240,7 +1234,7 @@ _llgo_17: ; preds = %_llgo_16
%85 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %84, 0
%86 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %85, i64 0, 1
%87 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %86, i64 0, 2
%88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87)
%88 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %87)
store ptr %88, ptr @_llgo_any, align 8
br label %_llgo_18
@@ -1254,7 +1248,7 @@ _llgo_19: ; preds = %_llgo_18
%92 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %91, 0
%93 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %92, i64 0, 1
%94 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %93, i64 0, 2
%95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94)
%95 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %94)
%96 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.SliceOf"(ptr %95)
store ptr %96, ptr @"[]_llgo_any", align 8
br label %_llgo_20
@@ -1371,8 +1365,8 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_20
%171 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %168, 0
%172 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %171, i64 2, 1
%173 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %172, i64 2, 2
%174 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173)
store ptr %174, ptr @"main.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8
%174 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %173)
store ptr %174, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.struct$FjMjjQr3-2iTiWyZP1IIQFOz0hUCa0OS6pEm5uVV6Pk", align 8
%175 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
%176 = icmp eq ptr %175, null
br i1 %176, label %_llgo_23, label %_llgo_24
@@ -1403,7 +1397,7 @@ _llgo_23: ; preds = %_llgo_22
%195 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %190, 0
%196 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %195, i64 4, 1
%197 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %196, i64 4, 2
%198 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %197)
%198 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 50 }, i64 208, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %197)
%199 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr %177, ptr %178, ptr %198, i64 4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %199)
store ptr %199, ptr @"map[_llgo_int]_llgo_string", align 8
@@ -1443,9 +1437,9 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.eface" @reflect.Value.
declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
define linkonce i64 @"__llgo_stub.main.callFunc$1"(ptr %0, i64 %1) {
define linkonce i64 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1"(ptr %0, i64 %1) {
_llgo_0:
%2 = tail call i64 @"main.callFunc$1"(i64 %1)
%2 = tail call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.callFunc$1"(i64 %1)
ret i64 %2
}
@@ -1463,9 +1457,9 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"githu
declare %reflect.Value @reflect.Value.Method(%reflect.Value, i64)
define linkonce { i64, i64 } @__llgo_stub.main.demo(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) {
define linkonce { i64, i64 } @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo"(ptr %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10) {
_llgo_0:
%11 = tail call { i64, i64 } @main.demo(i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10)
%11 = tail call { i64, i64 } @"github.com/goplus/llgo/compiler/cl/_testgo/reflect.demo"(i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10)
ret { i64, i64 } %11
}
@@ -1475,8 +1469,6 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @reflect.Value.
declare void @reflect.init()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.MapOf"(ptr, ptr, ptr, i64)
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.ArrayOf"(i64, ptr)

View File

@@ -1,14 +1,12 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/selects'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/selects"
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" = type { ptr, ptr, i32, i1 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, 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/_testgo/selects.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [4 x i8] c"c1<-", align 1
@1 = private unnamed_addr constant [4 x i8] c"<-c2", align 1
@2 = private unnamed_addr constant [4 x i8] c"<-c4", align 1
@@ -18,94 +16,90 @@ source_filename = "main"
@5 = private unnamed_addr constant [4 x i8] c"c2<-", align 1
@6 = private unnamed_addr constant [4 x i8] c"<-c3", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects.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/_testgo/selects.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.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/_testgo/selects.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()
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1)
store ptr %1, ptr %0, align 8
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1)
store ptr %3, ptr %2, align 8
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1)
store ptr %5, ptr %4, align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1)
store ptr %7, ptr %6, align 8
%8 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1)
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
%10 = getelementptr inbounds { ptr, ptr, ptr }, ptr %9, i32 0, i32 0
store ptr %2, ptr %10, align 8
%11 = getelementptr inbounds { ptr, ptr, ptr }, ptr %9, i32 0, i32 1
store ptr %4, ptr %11, align 8
%12 = getelementptr inbounds { ptr, ptr, ptr }, ptr %9, i32 0, i32 2
store ptr %6, ptr %12, align 8
%13 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %9, 1
%14 = call ptr @malloc(i64 16)
%15 = getelementptr inbounds { { ptr, ptr } }, ptr %14, i32 0, i32 0
store { ptr, ptr } %13, ptr %15, align 8
%16 = alloca i8, i64 8, align 1
%17 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %16, ptr null, ptr @"main._llgo_routine$1", ptr %14)
%18 = load ptr, ptr %2, align 8
%19 = alloca {}, align 8
call void @llvm.memset(ptr %19, i8 0, i64 0, i1 false)
store {} zeroinitializer, ptr %19, align 1
%20 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.ChanSend"(ptr %18, ptr %19, i64 0)
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewChan"(i64 0, i64 1)
%7 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
%8 = getelementptr inbounds { ptr, ptr, ptr }, ptr %7, i32 0, i32 0
store ptr %0, ptr %8, align 8
%9 = getelementptr inbounds { ptr, ptr, ptr }, ptr %7, i32 0, i32 1
store ptr %2, ptr %9, align 8
%10 = getelementptr inbounds { ptr, ptr, ptr }, ptr %7, i32 0, i32 2
store ptr %4, ptr %10, align 8
%11 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects.main$1", ptr undef }, ptr %7, 1
%12 = call ptr @malloc(i64 16)
%13 = getelementptr inbounds { { ptr, ptr } }, ptr %12, i32 0, i32 0
store { ptr, ptr } %11, ptr %13, align 8
%14 = alloca i8, i64 8, align 1
%15 = call i32 @"github.com/goplus/llgo/runtime/internal/runtime.CreateThread"(ptr %14, ptr null, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects._llgo_routine$1", ptr %12)
%16 = load ptr, ptr %0, align 8
%17 = alloca {}, align 8
call void @llvm.memset(ptr %17, i8 0, i64 0, i1 false)
store {} zeroinitializer, ptr %17, align 1
%18 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.ChanSend"(ptr %16, ptr %17, i64 0)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%21 = load ptr, ptr %4, align 8
%22 = alloca {}, align 8
call void @llvm.memset(ptr %22, i8 0, i64 0, i1 false)
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" undef, ptr %21, 0
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %23, ptr %22, 1
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %24, i32 0, 2
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %25, i1 false, 3
%27 = alloca {}, align 8
call void @llvm.memset(ptr %27, i8 0, i64 0, i1 false)
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" undef, ptr %8, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %28, ptr %27, 1
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %29, i32 0, 2
%31 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %30, i1 false, 3
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
%33 = getelementptr %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp", ptr %32, i64 0
store %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %26, ptr %33, align 8
%34 = getelementptr %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp", ptr %32, i64 1
store %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %31, ptr %34, align 8
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %32, 0
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, i64 2, 1
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 2, 2
%38 = call { i64, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.Select"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37)
%39 = extractvalue { i64, i1 } %38, 0
%40 = extractvalue { i64, i1 } %38, 1
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %26, 1
%19 = load ptr, ptr %2, align 8
%20 = alloca {}, align 8
call void @llvm.memset(ptr %20, i8 0, i64 0, i1 false)
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" undef, ptr %19, 0
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %21, ptr %20, 1
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %22, i32 0, 2
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %23, i1 false, 3
%25 = alloca {}, align 8
call void @llvm.memset(ptr %25, i8 0, i64 0, i1 false)
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" undef, ptr %6, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %26, ptr %25, 1
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %27, i32 0, 2
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %28, i1 false, 3
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 48)
%31 = getelementptr %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp", ptr %30, i64 0
store %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %24, ptr %31, align 8
%32 = getelementptr %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp", ptr %30, i64 1
store %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %29, ptr %32, align 8
%33 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %30, 0
%34 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %33, i64 2, 1
%35 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %34, i64 2, 2
%36 = call { i64, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.Select"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35)
%37 = extractvalue { i64, i1 } %36, 0
%38 = extractvalue { i64, i1 } %36, 1
%39 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %24, 1
%40 = load {}, ptr %39, align 1
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %29, 1
%42 = load {}, ptr %41, align 1
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.ChanOp" %31, 1
%44 = load {}, ptr %43, align 1
%45 = insertvalue { i64, i1, {}, {} } undef, i64 %39, 0
%46 = insertvalue { i64, i1, {}, {} } %45, i1 %40, 1
%47 = insertvalue { i64, i1, {}, {} } %46, {} %42, 2
%48 = insertvalue { i64, i1, {}, {} } %47, {} %44, 3
%49 = extractvalue { i64, i1, {}, {} } %48, 0
%50 = icmp eq i64 %49, 0
br i1 %50, label %_llgo_2, label %_llgo_3
%43 = insertvalue { i64, i1, {}, {} } undef, i64 %37, 0
%44 = insertvalue { i64, i1, {}, {} } %43, i1 %38, 1
%45 = insertvalue { i64, i1, {}, {} } %44, {} %40, 2
%46 = insertvalue { i64, i1, {}, {} } %45, {} %42, 3
%47 = extractvalue { i64, i1, {}, {} } %46, 0
%48 = icmp eq i64 %47, 0
br i1 %48, label %_llgo_2, label %_llgo_3
_llgo_1: ; preds = %_llgo_4, %_llgo_2
ret i32 0
ret void
_llgo_2: ; preds = %_llgo_0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 })
@@ -113,8 +107,8 @@ _llgo_2: ; preds = %_llgo_0
br label %_llgo_1
_llgo_3: ; preds = %_llgo_0
%51 = icmp eq i64 %49, 1
br i1 %51, label %_llgo_4, label %_llgo_5
%49 = icmp eq i64 %47, 1
br i1 %49, label %_llgo_4, label %_llgo_5
_llgo_4: ; preds = %_llgo_3
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 })
@@ -122,16 +116,16 @@ _llgo_4: ; preds = %_llgo_3
br label %_llgo_1
_llgo_5: ; preds = %_llgo_3
%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 @3, i64 31 }, 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 @3, i64 31 }, 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
}
define void @"main.main$1"(ptr %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.main$1"(ptr %0) {
_llgo_0:
%1 = load { ptr, ptr, ptr }, ptr %0, align 8
%2 = extractvalue { ptr, ptr, ptr } %1, 0
@@ -206,8 +200,6 @@ _llgo_5: ; preds = %_llgo_3
unreachable
}
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.NewChan"(i64, i64)
@@ -216,7 +208,7 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
declare ptr @malloc(i64)
define ptr @"main._llgo_routine$1"(ptr %0) {
define ptr @"github.com/goplus/llgo/compiler/cl/_testgo/selects._llgo_routine$1"(ptr %0) {
_llgo_0:
%1 = load { { ptr, ptr } }, ptr %0, align 8
%2 = extractvalue { { ptr, ptr } } %1, 0
@@ -242,7 +234,7 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)
declare { i64, i1 } @"github.com/goplus/llgo/runtime/internal/runtime.Select"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice")
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/selects.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_string, align 8
%1 = icmp eq ptr %0, null

View File

@@ -1,25 +1,23 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/strucintf'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/strucintf"
%"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
@"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init$guard" = global i1 false, align 1
@_llgo_int = linkonce global ptr null, align 8
@"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [1 x i8] c"v", align 1
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@1 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/strucintf", align 1
@2 = private unnamed_addr constant [11 x i8] c"Foo: not ok", align 1
@"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null, align 8
@3 = private unnamed_addr constant [1 x i8] c"V", align 1
@4 = private unnamed_addr constant [11 x i8] c"Bar: not ok", align 1
@5 = private unnamed_addr constant [9 x i8] c"F: not ok", align 1
define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @main.Foo() {
define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.Foo"() {
_llgo_0:
%0 = alloca { i64 }, align 8
call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false)
@@ -27,7 +25,7 @@ _llgo_0:
store i64 1, ptr %1, align 4
%2 = load { i64 }, ptr %0, align 4
%3 = load ptr, ptr @_llgo_int, align 8
%4 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%4 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%5 = extractvalue { i64 } %2, 0
%6 = inttoptr i64 %5 to ptr
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0
@@ -35,50 +33,46 @@ _llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.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/_testgo/strucintf.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"()
call void @"main.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.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/_testgo/strucintf.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.eface" @main.Foo()
%3 = alloca { i64 }, align 8
call void @llvm.memset(ptr %3, i8 0, i64 8, i1 false)
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, 0
%5 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%6 = icmp eq ptr %4, %5
br i1 %6, label %_llgo_10, label %_llgo_11
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.Foo"()
%1 = alloca { i64 }, align 8
call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false)
%2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 0
%3 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%4 = icmp eq ptr %2, %3
br i1 %4, label %_llgo_10, label %_llgo_11
_llgo_1: ; preds = %_llgo_12
%7 = getelementptr inbounds { i64 }, ptr %3, i32 0, i32 0
%8 = load i64, ptr %7, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8)
%5 = getelementptr inbounds { i64 }, ptr %1, i32 0, i32 0
%6 = load i64, ptr %5, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br label %_llgo_2
_llgo_2: ; preds = %_llgo_3, %_llgo_1
%9 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Bar"()
%10 = alloca { i64 }, align 8
call void @llvm.memset(ptr %10, i8 0, i64 8, i1 false)
%11 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, 0
%12 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
%13 = icmp eq ptr %11, %12
br i1 %13, label %_llgo_13, label %_llgo_14
%7 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Bar"()
%8 = alloca { i64 }, align 8
call void @llvm.memset(ptr %8, i8 0, i64 8, i1 false)
%9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 0
%10 = load ptr, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
%11 = icmp eq ptr %9, %10
br i1 %11, label %_llgo_13, label %_llgo_14
_llgo_3: ; preds = %_llgo_12
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 11 })
@@ -86,20 +80,20 @@ _llgo_3: ; preds = %_llgo_12
br label %_llgo_2
_llgo_4: ; preds = %_llgo_15
%14 = getelementptr inbounds { i64 }, ptr %10, i32 0, i32 0
%15 = load i64, ptr %14, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
%12 = getelementptr inbounds { i64 }, ptr %8, i32 0, i32 0
%13 = load i64, ptr %12, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %13)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br label %_llgo_5
_llgo_5: ; preds = %_llgo_6, %_llgo_4
%16 = alloca { i64 }, align 8
call void @llvm.memset(ptr %16, i8 0, i64 8, i1 false)
%17 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.F"()
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %17, 0
%19 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%20 = icmp eq ptr %18, %19
br i1 %20, label %_llgo_16, label %_llgo_17
%14 = alloca { i64 }, align 8
call void @llvm.memset(ptr %14, i8 0, i64 8, i1 false)
%15 = call %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/compiler/cl/_testdata/foo.F"()
%16 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, 0
%17 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%18 = icmp eq ptr %16, %17
br i1 %18, label %_llgo_16, label %_llgo_17
_llgo_6: ; preds = %_llgo_15
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 11 })
@@ -107,14 +101,14 @@ _llgo_6: ; preds = %_llgo_15
br label %_llgo_5
_llgo_7: ; preds = %_llgo_18
%21 = getelementptr inbounds { i64 }, ptr %16, i32 0, i32 0
%22 = load i64, ptr %21, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %22)
%19 = getelementptr inbounds { i64 }, ptr %14, i32 0, i32 0
%20 = load i64, ptr %19, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %20)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br label %_llgo_8
_llgo_8: ; preds = %_llgo_9, %_llgo_7
ret i32 0
ret void
_llgo_9: ; preds = %_llgo_18
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 9 })
@@ -122,64 +116,64 @@ _llgo_9: ; preds = %_llgo_18
br label %_llgo_8
_llgo_10: ; preds = %_llgo_0
%23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %2, 1
%24 = ptrtoint ptr %23 to i64
%25 = insertvalue { i64 } undef, i64 %24, 0
%26 = insertvalue { { i64 }, i1 } undef, { i64 } %25, 0
%27 = insertvalue { { i64 }, i1 } %26, i1 true, 1
%21 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 1
%22 = ptrtoint ptr %21 to i64
%23 = insertvalue { i64 } undef, i64 %22, 0
%24 = insertvalue { { i64 }, i1 } undef, { i64 } %23, 0
%25 = insertvalue { { i64 }, i1 } %24, i1 true, 1
br label %_llgo_12
_llgo_11: ; preds = %_llgo_0
br label %_llgo_12
_llgo_12: ; preds = %_llgo_11, %_llgo_10
%28 = phi { { i64 }, i1 } [ %27, %_llgo_10 ], [ zeroinitializer, %_llgo_11 ]
%29 = extractvalue { { i64 }, i1 } %28, 0
store { i64 } %29, ptr %3, align 4
%30 = extractvalue { { i64 }, i1 } %28, 1
br i1 %30, label %_llgo_1, label %_llgo_3
%26 = phi { { i64 }, i1 } [ %25, %_llgo_10 ], [ zeroinitializer, %_llgo_11 ]
%27 = extractvalue { { i64 }, i1 } %26, 0
store { i64 } %27, ptr %1, align 4
%28 = extractvalue { { i64 }, i1 } %26, 1
br i1 %28, label %_llgo_1, label %_llgo_3
_llgo_13: ; preds = %_llgo_2
%31 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, 1
%32 = ptrtoint ptr %31 to i64
%33 = insertvalue { i64 } undef, i64 %32, 0
%34 = insertvalue { { i64 }, i1 } undef, { i64 } %33, 0
%35 = insertvalue { { i64 }, i1 } %34, i1 true, 1
%29 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, 1
%30 = ptrtoint ptr %29 to i64
%31 = insertvalue { i64 } undef, i64 %30, 0
%32 = insertvalue { { i64 }, i1 } undef, { i64 } %31, 0
%33 = insertvalue { { i64 }, i1 } %32, i1 true, 1
br label %_llgo_15
_llgo_14: ; preds = %_llgo_2
br label %_llgo_15
_llgo_15: ; preds = %_llgo_14, %_llgo_13
%36 = phi { { i64 }, i1 } [ %35, %_llgo_13 ], [ zeroinitializer, %_llgo_14 ]
%37 = extractvalue { { i64 }, i1 } %36, 0
store { i64 } %37, ptr %10, align 4
%38 = extractvalue { { i64 }, i1 } %36, 1
br i1 %38, label %_llgo_4, label %_llgo_6
%34 = phi { { i64 }, i1 } [ %33, %_llgo_13 ], [ zeroinitializer, %_llgo_14 ]
%35 = extractvalue { { i64 }, i1 } %34, 0
store { i64 } %35, ptr %8, align 4
%36 = extractvalue { { i64 }, i1 } %34, 1
br i1 %36, label %_llgo_4, label %_llgo_6
_llgo_16: ; preds = %_llgo_5
%39 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %17, 1
%40 = ptrtoint ptr %39 to i64
%41 = insertvalue { i64 } undef, i64 %40, 0
%42 = insertvalue { { i64 }, i1 } undef, { i64 } %41, 0
%43 = insertvalue { { i64 }, i1 } %42, i1 true, 1
%37 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %15, 1
%38 = ptrtoint ptr %37 to i64
%39 = insertvalue { i64 } undef, i64 %38, 0
%40 = insertvalue { { i64 }, i1 } undef, { i64 } %39, 0
%41 = insertvalue { { i64 }, i1 } %40, i1 true, 1
br label %_llgo_18
_llgo_17: ; preds = %_llgo_5
br label %_llgo_18
_llgo_18: ; preds = %_llgo_17, %_llgo_16
%44 = phi { { i64 }, i1 } [ %43, %_llgo_16 ], [ zeroinitializer, %_llgo_17 ]
%45 = extractvalue { { i64 }, i1 } %44, 0
store { i64 } %45, ptr %16, align 4
%46 = extractvalue { { i64 }, i1 } %44, 1
br i1 %46, label %_llgo_7, label %_llgo_9
%42 = phi { { i64 }, i1 } [ %41, %_llgo_16 ], [ zeroinitializer, %_llgo_17 ]
%43 = extractvalue { { i64 }, i1 } %42, 0
store { i64 } %43, ptr %14, align 4
%44 = extractvalue { { i64 }, i1 } %42, 1
br i1 %44, label %_llgo_7, label %_llgo_9
}
; 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/_testgo/strucintf.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_int, align 8
%1 = icmp eq ptr %0, null
@@ -199,8 +193,8 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %5, 0
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 1, 1
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 1, 2
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
store ptr %10, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
store ptr %10, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/strucintf.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
%12 = 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 @3, i64 1 }, ptr %11, i64 0, %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer, i1 false)
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 56)
@@ -209,7 +203,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %13, 0
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 1, 1
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 1, 2
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17)
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 52 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17)
store ptr %18, ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk", align 8
ret void
}
@@ -224,8 +218,6 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"()
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,36 +1,34 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/struczero'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/struczero"
%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" = type { ptr, float }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%main.bar = type { ptr, float }
%"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" = type { ptr, float }
%"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 }
%"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/_testgo/struczero.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [48 x i8] c"github.com/goplus/llgo/compiler/cl/_testdata/foo", align 1
@1 = private unnamed_addr constant [3 x i8] c"Foo", align 1
@_llgo_byte = linkonce global ptr null, align 8
@"*_llgo_byte" = linkonce global ptr null, align 8
@_llgo_float32 = linkonce global ptr null, align 8
@"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [2 x i8] c"pb", align 1
@3 = private unnamed_addr constant [1 x i8] c"F", align 1
@4 = private unnamed_addr constant [4 x i8] c"main", align 1
@4 = private unnamed_addr constant [52 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/struczero", align 1
@5 = private unnamed_addr constant [2 x i8] c"Pb", align 1
@"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE" = linkonce global ptr null, align 8
@_llgo_main.bar = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [3 x i8] c"bar", align 1
@"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo" = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [1 x i8] c"f", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
@8 = private unnamed_addr constant [6 x i8] c"notOk:", align 1
define { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Bar"(%"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_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8
@@ -56,99 +54,95 @@ _llgo_3: ; preds = %_llgo_2, %_llgo_1
ret { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %12
}
define { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %0) {
define { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Foo"(%"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_main.bar, align 8
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", align 8
%3 = icmp eq ptr %1, %2
br i1 %3, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %0, 1
%5 = load %main.bar, ptr %4, align 8
%6 = insertvalue { %main.bar, i1 } undef, %main.bar %5, 0
%7 = insertvalue { %main.bar, i1 } %6, i1 true, 1
%5 = load %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", ptr %4, align 8
%6 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } undef, %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" %5, 0
%7 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %6, i1 true, 1
br label %_llgo_3
_llgo_2: ; preds = %_llgo_0
br label %_llgo_3
_llgo_3: ; preds = %_llgo_2, %_llgo_1
%8 = phi { %main.bar, i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ]
%9 = extractvalue { %main.bar, i1 } %8, 0
%10 = extractvalue { %main.bar, i1 } %8, 1
%11 = insertvalue { %main.bar, i1 } undef, %main.bar %9, 0
%12 = insertvalue { %main.bar, i1 } %11, i1 %10, 1
ret { %main.bar, i1 } %12
%8 = phi { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ]
%9 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %8, 0
%10 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %8, 1
%11 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } undef, %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" %9, 0
%12 = insertvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %11, i1 %10, 1
ret { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %12
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.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/_testgo/struczero.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"()
call void @"main.init$after"()
call void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.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/_testgo/struczero.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.bar, align 8
call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false)
%3 = call { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer)
%4 = extractvalue { %main.bar, i1 } %3, 0
store %main.bar %4, ptr %2, align 8
%5 = extractvalue { %main.bar, i1 } %3, 1
%6 = getelementptr inbounds %main.bar, ptr %2, i32 0, i32 0
%7 = load ptr, ptr %6, align 8
%8 = getelementptr inbounds %main.bar, ptr %2, i32 0, i32 1
%9 = load float, ptr %8, align 4
%10 = xor i1 %5, true
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %7)
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", align 8
call void @llvm.memset(ptr %0, i8 0, i64 16, i1 false)
%1 = call { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Foo"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" zeroinitializer)
%2 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %1, 0
store %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar" %2, ptr %0, align 8
%3 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", i1 } %1, 1
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", ptr %0, i32 0, i32 0
%5 = load ptr, ptr %4, align 8
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", ptr %0, i32 0, i32 1
%7 = load float, ptr %6, align 4
%8 = xor i1 %3, true
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%11 = fpext float %9 to double
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %11)
%9 = fpext float %7 to double
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %9)
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" { ptr @8, i64 6 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%12 = alloca %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8
call void @llvm.memset(ptr %12, i8 0, i64 16, i1 false)
%13 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" zeroinitializer, 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
%17 = call { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %16)
%18 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %17, 0
store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %18, ptr %12, align 8
%19 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %17, 1
%20 = load %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %12, align 8
%21 = call ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %20)
%22 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %12, i32 0, i32 1
%23 = load float, ptr %22, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %21)
%10 = alloca %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8
call void @llvm.memset(ptr %10, i8 0, i64 16, i1 false)
%11 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" zeroinitializer, 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
%15 = call { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.Bar"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %14)
%16 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %15, 0
store %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %16, ptr %10, align 8
%17 = extractvalue { %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", i1 } %15, 1
%18 = load %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %10, align 8
%19 = call ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo" %18)
%20 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", ptr %10, i32 0, i32 1
%21 = load float, ptr %20, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%24 = fpext float %23 to double
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %24)
%22 = fpext float %21 to double
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %22)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.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 48 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 3 }, i64 25, i64 16, i64 1, i64 1)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo", align 8
@@ -208,9 +202,9 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_6
%24 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %21, 0
%25 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %24, i64 2, 1
%26 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %25, i64 2, 2
%27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26)
store ptr %27, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8
%28 = load ptr, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8
%27 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 52 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26)
store ptr %27, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8
%28 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8
br i1 %2, label %_llgo_9, label %_llgo_10
_llgo_9: ; preds = %_llgo_8
@@ -221,8 +215,8 @@ _llgo_9: ; preds = %_llgo_8
br i1 %32, label %_llgo_11, label %_llgo_12
_llgo_10: ; preds = %_llgo_12, %_llgo_8
%33 = 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 @6, i64 3 }, i64 25, i64 16, i64 0, i64 0)
store ptr %33, ptr @_llgo_main.bar, align 8
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 52 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 3 }, i64 25, i64 16, i64 0, i64 0)
store ptr %33, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/struczero.bar", align 8
%34 = load ptr, ptr @"*_llgo_byte", align 8
%35 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 40)
%36 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %35)
@@ -237,9 +231,9 @@ _llgo_10: ; preds = %_llgo_12, %_llgo_8
%43 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %40, 0
%44 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %43, i64 2, 1
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %44, i64 2, 2
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 4 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45)
store ptr %46, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8
%47 = load ptr, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 52 }, i64 16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45)
store ptr %46, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8
%47 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/struczero.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.InitNamed"(ptr %33, ptr %47, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
ret void
@@ -307,8 +301,6 @@ declare ptr @"github.com/goplus/llgo/compiler/cl/_testdata/foo.Foo.Pb"(%"github.
declare void @"github.com/goplus/llgo/compiler/cl/_testdata/foo.init"()
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,59 +1,51 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tpindex'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tpindex"
%"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/_testgo/tpindex.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.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/_testgo/tpindex.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/_testgo/tpindex.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
store i64 1, ptr %3, align 4
%4 = getelementptr inbounds i64, ptr %2, i64 1
store i64 3, ptr %4, align 4
%5 = getelementptr inbounds i64, ptr %2, i64 2
store i64 5, ptr %5, align 4
%6 = getelementptr inbounds i64, ptr %2, i64 3
store i64 2, ptr %6, align 4
%7 = getelementptr inbounds i64, ptr %2, i64 4
store i64 4, ptr %7, align 4
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 5, 1
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9, i64 5, 2
%11 = call i64 @"main.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11)
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
%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 3, ptr %2, align 4
%3 = getelementptr inbounds i64, ptr %0, i64 2
store i64 5, ptr %3, align 4
%4 = getelementptr inbounds i64, ptr %0, i64 3
store i64 2, ptr %4, align 4
%5 = getelementptr inbounds i64, ptr %0, i64 4
store i64 4, ptr %5, align 4
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %0, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 5, 1
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 5, 2
%9 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 3)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %9)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%12 = call i64 @"main.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %10, i64 6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %12)
%10 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, i64 6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %10)
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)
define linkonce i64 @"main.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, i64 %1) {
define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpindex.index[int]"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, i64 %1) {
_llgo_0:
%2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
br label %_llgo_1

View File

@@ -1,50 +1,48 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tpinst'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tpinst"
%"main.M[int]" = type { i64 }
%"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]" = type { i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
%"main.M[float64]" = type { double }
%"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]" = type { double }
%"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 }
%"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_main.M[int]" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init$guard" = global i1 false, align 1
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8
@0 = private unnamed_addr constant [49 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/tpinst", align 1
@1 = private unnamed_addr constant [6 x i8] c"M[int]", align 1
@_llgo_int = linkonce global ptr null, align 8
@"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
@2 = private unnamed_addr constant [1 x i8] c"v", align 1
@3 = private unnamed_addr constant [5 x i8] c"Value", align 1
@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8
@4 = private unnamed_addr constant [5 x i8] c"value", align 1
@5 = private unnamed_addr constant [10 x i8] c"main.value", align 1
@"*_llgo_main.M[int]" = linkonce global ptr null, align 8
@5 = private unnamed_addr constant [55 x i8] c"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.value", align 1
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]" = linkonce global ptr null, align 8
@"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8" = linkonce global ptr null, align 8
@6 = private unnamed_addr constant [5 x i8] c"error", align 1
@_llgo_string = linkonce global ptr null, align 8
@"_llgo_main.M[float64]" = linkonce global ptr null, align 8
@"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8
@7 = private unnamed_addr constant [10 x i8] c"M[float64]", align 1
@_llgo_float64 = linkonce global ptr null, align 8
@"main.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU" = linkonce global ptr null, align 8
@"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8" = linkonce global ptr null, align 8
@"*_llgo_main.M[float64]" = linkonce global ptr null, align 8
@"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]" = linkonce global ptr null, align 8
@"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk" = linkonce global ptr null, align 8
@"main.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww" = linkonce global ptr null, align 8
@"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww" = linkonce global ptr null, align 8
@8 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
@__llgo_argc = global i32 0, align 4
@__llgo_argv = global ptr null, align 8
define void @main.demo() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.demo"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%1 = getelementptr inbounds %"main.M[int]", ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0
store i64 100, ptr %1, align 4
%2 = load ptr, ptr @"_llgo_main.M[int]", align 8
%3 = load ptr, ptr @"*_llgo_main.M[int]", align 8
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8
%3 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8
%4 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%5 = load ptr, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8
%6 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %5, ptr %3)
@@ -73,10 +71,10 @@ _llgo_1: ; preds = %_llgo_0
_llgo_2: ; preds = %_llgo_0
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%24 = getelementptr inbounds %"main.M[float64]", ptr %23, i32 0, i32 0
%24 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", ptr %23, i32 0, i32 0
store double 1.001000e+02, ptr %24, align 8
%25 = load ptr, ptr @"_llgo_main.M[float64]", align 8
%26 = load ptr, ptr @"*_llgo_main.M[float64]", align 8
%25 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8
%26 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8
%27 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8
%28 = load ptr, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8
%29 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %28, ptr %26)
@@ -106,7 +104,7 @@ _llgo_3: ; preds = %_llgo_2
_llgo_4: ; preds = %_llgo_2
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %8)
%47 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%48 = load ptr, ptr @"main.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8
%48 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8
%49 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr %48, ptr %46)
br i1 %49, label %_llgo_7, label %_llgo_8
@@ -124,7 +122,7 @@ _llgo_6: ; preds = %_llgo_7
_llgo_7: ; preds = %_llgo_4
%54 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %8, 1
%55 = load ptr, ptr @"main.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8
%55 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewItab"(ptr %55, ptr %46)
%57 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" undef, ptr %56, 0
%58 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %57, ptr %54, 1
@@ -150,69 +148,65 @@ _llgo_8: ; preds = %_llgo_4
unreachable
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.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/_testgo/tpinst.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.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/_testgo/tpinst.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.demo()
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.demo"()
ret void
}
define linkonce double @"main.(*M[float64]).Value"(ptr %0) {
define linkonce double @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).Value"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %"main.M[float64]", ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", ptr %0, i32 0, i32 0
%2 = load double, ptr %1, align 8
ret double %2
}
define linkonce double @"main.(*M[float64]).value"(ptr %0) {
define linkonce double @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).value"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %"main.M[float64]", ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", ptr %0, i32 0, i32 0
%2 = load double, ptr %1, align 8
ret double %2
}
define linkonce i64 @"main.(*M[int]).Value"(ptr %0) {
define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).Value"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %"main.M[int]", ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0
%2 = load i64, ptr %1, align 4
ret i64 %2
}
define linkonce i64 @"main.(*M[int]).value"(ptr %0) {
define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).value"(ptr %0) {
_llgo_0:
%1 = getelementptr inbounds %"main.M[int]", ptr %0, i32 0, i32 0
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", ptr %0, i32 0, i32 0
%2 = load i64, ptr %1, align 4
ret i64 %2
}
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.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 6 }, i64 25, i64 8, i64 0, i64 2)
%1 = load ptr, ptr @"_llgo_main.M[int]", align 8
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 6 }, i64 25, i64 8, i64 0, i64 2)
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[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.M[int]", align 8
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -235,9 +229,9 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %9, 0
%12 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %11, i64 1, 1
%13 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %12, i64 1, 2
%14 = 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" %13)
store ptr %14, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%15 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %13)
store ptr %14, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
%15 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
br i1 %2, label %_llgo_5, label %_llgo_6
_llgo_5: ; preds = %_llgo_4
@@ -247,8 +241,8 @@ _llgo_5: ; preds = %_llgo_4
br i1 %18, label %_llgo_7, label %_llgo_8
_llgo_6: ; preds = %_llgo_8, %_llgo_4
%19 = 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 6 }, i64 25, i64 8, i64 0, i64 2)
%20 = load ptr, ptr @"*_llgo_main.M[int]", align 8
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 6 }, i64 25, i64 8, i64 0, i64 2)
%20 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8
%21 = icmp eq ptr %20, null
br i1 %21, label %_llgo_9, label %_llgo_10
@@ -271,12 +265,12 @@ _llgo_7: ; preds = %_llgo_5
_llgo_8: ; preds = %_llgo_7, %_llgo_5
%32 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%33 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %32, 1
%34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"main.(*M[int]).Value", 2
%35 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %34, ptr @"main.(*M[int]).Value", 3
%34 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %33, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).Value", 2
%35 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %34, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).Value", 3
%36 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %36, 1
%38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %37, ptr @"main.(*M[int]).value", 2
%39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"main.(*M[int]).value", 3
%37 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 55 }, ptr undef, ptr undef, ptr undef }, ptr %36, 1
%38 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %37, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).value", 2
%39 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %38, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[int]).value", 3
%40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
%41 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %40, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %35, ptr %41, align 8
@@ -291,7 +285,7 @@ _llgo_8: ; preds = %_llgo_7, %_llgo_5
_llgo_9: ; preds = %_llgo_6
%46 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %46)
store ptr %46, ptr @"*_llgo_main.M[int]", align 8
store ptr %46, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[int]", align 8
br label %_llgo_10
_llgo_10: ; preds = %_llgo_9, %_llgo_6
@@ -308,7 +302,7 @@ _llgo_11: ; preds = %_llgo_10
%53 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %51, 0
%54 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %53, i64 1, 1
%55 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, i64 1, 2
%56 = 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" %55)
%56 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %55)
store ptr %56, ptr @"_llgo_iface$Jvxc0PCI_drlfK7S5npMGdZkQLeRkQ_x2e2CifPE6w8", align 8
br label %_llgo_12
@@ -323,13 +317,13 @@ _llgo_13: ; preds = %_llgo_12
br label %_llgo_14
_llgo_14: ; preds = %_llgo_13, %_llgo_12
%60 = 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 @7, i64 10 }, i64 25, i64 8, i64 0, i64 2)
%61 = load ptr, ptr @"_llgo_main.M[float64]", align 8
%60 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2)
%61 = load ptr, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8
%62 = icmp eq ptr %61, null
br i1 %62, label %_llgo_15, label %_llgo_16
_llgo_15: ; preds = %_llgo_14
store ptr %60, ptr @"_llgo_main.M[float64]", align 8
store ptr %60, ptr @"_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8
br label %_llgo_16
_llgo_16: ; preds = %_llgo_15, %_llgo_14
@@ -352,9 +346,9 @@ _llgo_18: ; preds = %_llgo_17, %_llgo_16
%71 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %69, 0
%72 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %71, i64 1, 1
%73 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, i64 1, 2
%74 = 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" %73)
store ptr %74, ptr @"main.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8
%75 = load ptr, ptr @"main.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8
%74 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, i64 8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %73)
store ptr %74, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8
%75 = load ptr, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.struct$7SZ-TjG6e68olyGxlMRRIOYuZz2LaKIpOrZH-w4GiTU", align 8
br i1 %62, label %_llgo_19, label %_llgo_20
_llgo_19: ; preds = %_llgo_18
@@ -364,8 +358,8 @@ _llgo_19: ; preds = %_llgo_18
br i1 %78, label %_llgo_21, label %_llgo_22
_llgo_20: ; preds = %_llgo_22, %_llgo_18
%79 = 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 @7, i64 10 }, i64 25, i64 8, i64 0, i64 2)
%80 = load ptr, ptr @"*_llgo_main.M[float64]", align 8
%79 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.NewNamed"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @7, i64 10 }, i64 25, i64 8, i64 0, i64 2)
%80 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8
%81 = icmp eq ptr %80, null
br i1 %81, label %_llgo_23, label %_llgo_24
@@ -388,12 +382,12 @@ _llgo_21: ; preds = %_llgo_19
_llgo_22: ; preds = %_llgo_21, %_llgo_19
%92 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8
%93 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %92, 1
%94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %93, ptr @"main.(*M[float64]).Value", 2
%95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"main.(*M[float64]).Value", 3
%94 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %93, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).Value", 2
%95 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %94, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).Value", 3
%96 = load ptr, ptr @"_llgo_func$UYiLlmcWxoOKZPPzvR4LByitNeKoVGoTrB_5ubdOWW8", align 8
%97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 10 }, ptr undef, ptr undef, ptr undef }, ptr %96, 1
%98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"main.(*M[float64]).value", 2
%99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"main.(*M[float64]).value", 3
%97 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 55 }, ptr undef, ptr undef, ptr undef }, ptr %96, 1
%98 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %97, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).value", 2
%99 = insertvalue %"github.com/goplus/llgo/runtime/abi.Method" %98, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.(*M[float64]).value", 3
%100 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 80)
%101 = getelementptr %"github.com/goplus/llgo/runtime/abi.Method", ptr %100, i64 0
store %"github.com/goplus/llgo/runtime/abi.Method" %95, ptr %101, align 8
@@ -408,7 +402,7 @@ _llgo_22: ; preds = %_llgo_21, %_llgo_19
_llgo_23: ; preds = %_llgo_20
%106 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.PointerTo"(ptr %79)
call void @"github.com/goplus/llgo/runtime/internal/runtime.SetDirectIface"(ptr %106)
store ptr %106, ptr @"*_llgo_main.M[float64]", align 8
store ptr %106, ptr @"*_llgo_github.com/goplus/llgo/compiler/cl/_testgo/tpinst.M[float64]", align 8
br label %_llgo_24
_llgo_24: ; preds = %_llgo_23, %_llgo_20
@@ -425,21 +419,21 @@ _llgo_25: ; preds = %_llgo_24
%113 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %111, 0
%114 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %113, i64 1, 1
%115 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %114, i64 1, 2
%116 = 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" %115)
%116 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %115)
store ptr %116, ptr @"_llgo_iface$2dxw6yZ6V86Spb7J0dTDIoWqg7ba7UDXlAlpJv3-HLk", align 8
br label %_llgo_26
_llgo_26: ; preds = %_llgo_25, %_llgo_24
%117 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
%118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 10 }, ptr undef }, ptr %117, 1
%118 = insertvalue %"github.com/goplus/llgo/runtime/abi.Imethod" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 55 }, ptr undef }, ptr %117, 1
%119 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 24)
%120 = getelementptr %"github.com/goplus/llgo/runtime/abi.Imethod", ptr %119, i64 0
store %"github.com/goplus/llgo/runtime/abi.Imethod" %118, ptr %120, align 8
%121 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %119, 0
%122 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %121, i64 1, 1
%123 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %122, i64 1, 2
%124 = 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" %123)
store ptr %124, ptr @"main.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8
%124 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Interface"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 49 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %123)
store ptr %124, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpinst.iface$2sV9fFeqOv1SzesvwIdhTqCFzDT8ZX5buKUSAoHNSww", align 8
ret void
}
@@ -472,5 +466,3 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.c
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface")
declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.Implements"(ptr, ptr)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,98 +1,90 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tpnamed'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tpnamed"
%"main.IO[error]" = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[error]" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"main.Future[error]" = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" = type { ptr, ptr }
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
%"main.IO[[0]byte]" = type { ptr, ptr }
%"main.Future[[0]byte]" = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" = type { ptr, ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" = 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/_testgo/tpnamed.init$guard" = global i1 false, align 1
define %"main.IO[error]" @main.WriteFile(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
define %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[error]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0) {
_llgo_0:
ret %"main.IO[error]" { ptr @"__llgo_stub.main.WriteFile$1", ptr null }
ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[error]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1", ptr null }
}
define %"main.Future[error]" @"main.WriteFile$1"() {
define %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1"() {
_llgo_0:
ret %"main.Future[error]" { ptr @"__llgo_stub.main.WriteFile$1$1", ptr null }
ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1", ptr null }
}
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.WriteFile$1$1"() {
define %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1"() {
_llgo_0:
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer
}
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.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/_testgo/tpnamed.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/_testgo/tpnamed.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 [0 x i8] @"main.RunIO[[0]byte]"(%"main.IO[[0]byte]" { ptr @"__llgo_stub.main.main$1", ptr null })
ret i32 0
%0 = call [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.RunIO[[0]byte]"(%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1", ptr null })
ret void
}
define %"main.Future[[0]byte]" @"main.main$1"() {
define %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1"() {
_llgo_0:
ret %"main.Future[[0]byte]" { ptr @"__llgo_stub.main.main$1$1", ptr null }
ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1", ptr null }
}
define [0 x i8] @"main.main$1$1"() {
define [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1"() {
_llgo_0:
ret [0 x i8] zeroinitializer
}
define linkonce %"main.Future[error]" @"__llgo_stub.main.WriteFile$1"(ptr %0) {
define linkonce %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1"(ptr %0) {
_llgo_0:
%1 = tail call %"main.Future[error]" @"main.WriteFile$1"()
ret %"main.Future[error]" %1
%1 = tail call %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1"()
ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[error]" %1
}
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"__llgo_stub.main.WriteFile$1$1"(ptr %0) {
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1"(ptr %0) {
_llgo_0:
%1 = tail call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"main.WriteFile$1$1"()
%1 = tail call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.WriteFile$1$1"()
ret %"github.com/goplus/llgo/runtime/internal/runtime.iface" %1
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define linkonce %"main.Future[[0]byte]" @"__llgo_stub.main.main$1"(ptr %0) {
define linkonce %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1"(ptr %0) {
_llgo_0:
%1 = tail call %"main.Future[[0]byte]" @"main.main$1"()
ret %"main.Future[[0]byte]" %1
%1 = tail call %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1"()
ret %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %1
}
define linkonce [0 x i8] @"main.RunIO[[0]byte]"(%"main.IO[[0]byte]" %0) {
define linkonce [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.RunIO[[0]byte]"(%"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" %0) {
_llgo_0:
%1 = extractvalue %"main.IO[[0]byte]" %0, 1
%2 = extractvalue %"main.IO[[0]byte]" %0, 0
%3 = call %"main.Future[[0]byte]" %2(ptr %1)
%4 = extractvalue %"main.Future[[0]byte]" %3, 1
%5 = extractvalue %"main.Future[[0]byte]" %3, 0
%1 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" %0, 1
%2 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.IO[[0]byte]" %0, 0
%3 = call %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %2(ptr %1)
%4 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %3, 1
%5 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.Future[[0]byte]" %3, 0
%6 = call [0 x i8] %5(ptr %4)
ret [0 x i8] %6
}
define linkonce [0 x i8] @"__llgo_stub.main.main$1$1"(ptr %0) {
define linkonce [0 x i8] @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1"(ptr %0) {
_llgo_0:
%1 = tail call [0 x i8] @"main.main$1$1"()
%1 = tail call [0 x i8] @"github.com/goplus/llgo/compiler/cl/_testgo/tpnamed.main$1$1"()
ret [0 x i8] %1
}

View File

@@ -1,43 +1,37 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tprecur'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tprecur"
%"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/_testgo/tprecur.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
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.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/_testgo/tprecur.init$guard", align 1
call void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.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/_testgo/tprecur.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.recursive()
ret i32 0
call void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recursive"()
ret void
}
define void @main.recursive() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recursive"() {
_llgo_0:
%0 = call i64 @"main.recur1[main.T]"(i64 5)
%0 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 5)
%1 = icmp ne i64 %0, 110
br i1 %1, label %_llgo_1, label %_llgo_2
@@ -54,9 +48,7 @@ _llgo_2: ; preds = %_llgo_0
ret void
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
define linkonce i64 @"main.recur1[main.T]"(i64 %0) {
define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %0) {
_llgo_0:
%1 = icmp eq i64 %0, 0
br i1 %1, label %_llgo_1, label %_llgo_3
@@ -66,7 +58,7 @@ _llgo_1: ; preds = %_llgo_3, %_llgo_0
_llgo_2: ; preds = %_llgo_3
%2 = sub i64 %0, 1
%3 = call i64 @"main.recur2[main.T]"(i64 %2)
%3 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur2[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %2)
%4 = mul i64 %0, %3
ret i64 %4
@@ -75,7 +67,7 @@ _llgo_3: ; preds = %_llgo_0
br i1 %5, label %_llgo_1, label %_llgo_2
}
define void @"main.init$after"() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.init$after"() {
_llgo_0:
%0 = load ptr, ptr @_llgo_string, align 8
%1 = icmp eq ptr %0, null
@@ -96,7 +88,7 @@ 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")
define linkonce i64 @"main.recur2[main.T]"(i64 %0) {
define linkonce i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur2[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %0) {
_llgo_0:
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.MakeSlice"(i64 %0, i64 %0, i64 8)
%2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1
@@ -145,7 +137,7 @@ _llgo_5: ; preds = %_llgo_4
_llgo_6: ; preds = %_llgo_4
%26 = sub i64 %0, 1
%27 = call i64 @"main.recur1[main.T]"(i64 %26)
%27 = call i64 @"github.com/goplus/llgo/compiler/cl/_testgo/tprecur.recur1[github.com/goplus/llgo/compiler/cl/_testgo/tprecur.T]"(i64 %26)
%28 = add i64 %14, %27
ret i64 %28
}

View File

@@ -1,61 +1,53 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn"
%"main.My[int]" = type { { ptr, ptr }, ptr }
%"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]" = type { { 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/_testgo/tprecurfn.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.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/_testgo/tprecurfn.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/_testgo/tprecurfn.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()
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %0, i32 0, i32 1
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%3 = getelementptr inbounds %"main.My[int]", ptr %2, i32 0, i32 1
%4 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%5 = getelementptr inbounds %"main.My[int]", ptr %4, i32 0, i32 0
store { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null }, ptr %5, align 8
store ptr %4, ptr %3, align 8
%6 = getelementptr inbounds %"main.My[int]", ptr %2, i32 0, i32 1
%7 = load ptr, ptr %6, align 8
%8 = getelementptr inbounds %"main.My[int]", ptr %7, i32 0, i32 0
%9 = load { ptr, ptr }, ptr %8, align 8
%10 = extractvalue { ptr, ptr } %9, 1
%11 = extractvalue { ptr, ptr } %9, 0
call void %11(ptr %10, i64 100)
ret i32 0
%3 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %2, i32 0, i32 0
store { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1", ptr null }, ptr %3, align 8
store ptr %2, ptr %1, align 8
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %0, i32 0, i32 1
%5 = load ptr, ptr %4, align 8
%6 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.My[int]", ptr %5, i32 0, i32 0
%7 = load { ptr, ptr }, ptr %6, align 8
%8 = extractvalue { ptr, ptr } %7, 1
%9 = extractvalue { ptr, ptr } %7, 0
call void %9(ptr %8, i64 100)
ret void
}
define void @"main.main$1"(i64 %0) {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1"(i64 %0) {
_llgo_0:
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 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$1"(ptr %0, i64 %1) {
define linkonce void @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1"(ptr %0, i64 %1) {
_llgo_0:
tail call void @"main.main$1"(i64 %1)
tail call void @"github.com/goplus/llgo/compiler/cl/_testgo/tprecurfn.main$1"(i64 %1)
ret void
}

View File

@@ -1,161 +1,153 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testgo/tptypes'
source_filename = "github.com/goplus/llgo/compiler/cl/_testgo/tptypes"
%"main.Data[int]" = type { i64 }
%"main.Data[string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" }
%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]" = type { i64 }
%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
%"main.Slice[[]int,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"main.Slice[[]string,string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
%"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]" = type { %"github.com/goplus/llgo/runtime/internal/runtime.Slice" }
@"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/_testgo/tptypes.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.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/_testgo/tptypes.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/_testgo/tptypes.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.Data[int]", align 8
call void @llvm.memset(ptr %2, i8 0, i64 8, i1 false)
%3 = getelementptr inbounds %"main.Data[int]", ptr %2, i32 0, i32 0
store i64 1, ptr %3, align 4
%4 = load %"main.Data[int]", ptr %2, align 4
%5 = extractvalue %"main.Data[int]" %4, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %5)
%0 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", align 8
call void @llvm.memset(ptr %0, i8 0, i64 8, i1 false)
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %0, i32 0, i32 0
store i64 1, ptr %1, align 4
%2 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %0, align 4
%3 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]" %2, 0
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 = alloca %"main.Data[string]", align 8
call void @llvm.memset(ptr %6, i8 0, i64 16, i1 false)
%7 = getelementptr inbounds %"main.Data[string]", ptr %6, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %7, align 8
%8 = load %"main.Data[string]", ptr %6, align 8
%9 = extractvalue %"main.Data[string]" %8, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %9)
%4 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", align 8
call void @llvm.memset(ptr %4, i8 0, i64 16, i1 false)
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %4, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %5, align 8
%6 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %4, align 8
%7 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]" %6, 0
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)
%10 = alloca %"main.Data[int]", align 8
call void @llvm.memset(ptr %10, i8 0, i64 8, i1 false)
%11 = getelementptr inbounds %"main.Data[int]", ptr %10, i32 0, i32 0
store i64 100, ptr %11, align 4
%12 = load %"main.Data[int]", ptr %10, align 4
%13 = extractvalue %"main.Data[int]" %12, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %13)
%8 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", align 8
call void @llvm.memset(ptr %8, i8 0, i64 8, i1 false)
%9 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %8, i32 0, i32 0
store i64 100, ptr %9, align 4
%10 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]", ptr %8, align 4
%11 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[int]" %10, 0
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 = alloca %"main.Data[string]", align 8
call void @llvm.memset(ptr %14, i8 0, i64 16, i1 false)
%15 = getelementptr inbounds %"main.Data[string]", ptr %14, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %15, align 8
%16 = load %"main.Data[string]", ptr %14, align 8
%17 = extractvalue %"main.Data[string]" %16, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %17)
%12 = alloca %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", align 8
call void @llvm.memset(ptr %12, i8 0, i64 16, i1 false)
%13 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %12, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 }, ptr %13, align 8
%14 = load %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]", ptr %12, align 8
%15 = extractvalue %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Data[string]" %14, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %15)
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)
%18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%20 = getelementptr inbounds i64, ptr %19, i64 0
store i64 100, ptr %20, align 4
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %19, 0
%22 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21, i64 1, 1
%23 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %22, i64 1, 2
%24 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append"(ptr %18, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %23)
%25 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%26 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%27 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %26, i64 0
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.Slice" undef, ptr %26, 0
%29 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28, i64 1, 1
%30 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %29, i64 1, 2
%31 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]string,string]).Append"(ptr %25, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %30)
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%33 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%34 = getelementptr inbounds i64, ptr %33, i64 0
store i64 1, ptr %34, align 4
%35 = getelementptr inbounds i64, ptr %33, i64 1
store i64 2, ptr %35, align 4
%36 = getelementptr inbounds i64, ptr %33, i64 2
store i64 3, ptr %36, align 4
%37 = getelementptr inbounds i64, ptr %33, i64 3
store i64 4, ptr %37, align 4
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %33, 0
%39 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38, i64 4, 1
%40 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %39, i64 4, 2
%41 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append"(ptr %32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %40)
%42 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%43 = getelementptr inbounds i64, ptr %42, i64 0
store i64 1, ptr %43, align 4
%44 = getelementptr inbounds i64, ptr %42, i64 1
store i64 2, ptr %44, align 4
%45 = getelementptr inbounds i64, ptr %42, i64 2
store i64 3, ptr %45, align 4
%46 = getelementptr inbounds i64, ptr %42, i64 3
store i64 4, ptr %46, align 4
%47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %42, 0
%48 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %47, i64 4, 1
%49 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %48, i64 4, 2
%50 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append2"(ptr %32, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %49)
%51 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %18, i32 0, i32 0
%16 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%17 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
%18 = getelementptr inbounds i64, ptr %17, i64 0
store i64 100, ptr %18, align 4
%19 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %17, 0
%20 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, i64 1, 1
%21 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %20, i64 1, 2
%22 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %16, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %21)
%23 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%24 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 16)
%25 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %24, i64 0
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.Slice" undef, ptr %24, 0
%27 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %26, i64 1, 1
%28 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %27, i64 1, 2
%29 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]string,string]).Append"(ptr %23, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %28)
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 24)
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%32 = getelementptr inbounds i64, ptr %31, i64 0
store i64 1, ptr %32, align 4
%33 = getelementptr inbounds i64, ptr %31, i64 1
store i64 2, ptr %33, align 4
%34 = getelementptr inbounds i64, ptr %31, i64 2
store i64 3, ptr %34, align 4
%35 = getelementptr inbounds i64, ptr %31, i64 3
store i64 4, ptr %35, align 4
%36 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %31, 0
%37 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %36, i64 4, 1
%38 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, i64 4, 2
%39 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %38)
%40 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
%41 = getelementptr inbounds i64, ptr %40, i64 0
store i64 1, ptr %41, align 4
%42 = getelementptr inbounds i64, ptr %40, i64 1
store i64 2, ptr %42, align 4
%43 = getelementptr inbounds i64, ptr %40, i64 2
store i64 3, ptr %43, align 4
%44 = getelementptr inbounds i64, ptr %40, i64 3
store i64 4, ptr %44, align 4
%45 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %40, 0
%46 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %45, i64 4, 1
%47 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %46, i64 4, 2
%48 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append2"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %47)
%49 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %16, i32 0, i32 0
%50 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %49, align 8
%51 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %16, i32 0, i32 0
%52 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %51, align 8
%53 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %18, i32 0, i32 0
%54 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %53, align 8
%55 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, 0
%56 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %54, 1
%57 = icmp sge i64 0, %56
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %57)
%58 = getelementptr inbounds i64, ptr %55, i64 0
%59 = load i64, ptr %58, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52)
%53 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, 0
%54 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %52, 1
%55 = icmp sge i64 0, %54
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %55)
%56 = getelementptr inbounds i64, ptr %53, i64 0
%57 = load i64, ptr %56, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %50)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %59)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %57)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%60 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %25, i32 0, i32 0
%58 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %23, i32 0, i32 0
%59 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %58, align 8
%60 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %23, i32 0, i32 0
%61 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %60, align 8
%62 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %25, i32 0, i32 0
%63 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %62, align 8
%64 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %63, 0
%65 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %63, 1
%66 = icmp sge i64 0, %65
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %66)
%67 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %64, i64 0
%68 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %67, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %61)
%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 0, %63
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %64)
%65 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %62, i64 0
%66 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %65, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %59)
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 10)
%69 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %32, i32 0, i32 0
%67 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %30, i32 0, i32 0
%68 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %67, align 8
%69 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %30, i32 0, i32 0
%70 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %69, align 8
%71 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %32, i32 0, i32 0
%72 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %71, align 8
%73 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, 0
%74 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %72, 1
%75 = icmp sge i64 0, %74
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %75)
%76 = getelementptr inbounds i64, ptr %73, i64 0
%77 = load i64, ptr %76, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70)
%71 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, 0
%72 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %70, 1
%73 = icmp sge i64 0, %72
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %73)
%74 = getelementptr inbounds i64, ptr %71, i64 0
%75 = load i64, ptr %74, align 4
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %68)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %77)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %75)
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
@@ -167,44 +159,44 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"gi
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) {
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) {
_llgo_0:
%2 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 0
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1
%6 = 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" %3, ptr %4, i64 %5, i64 8)
%7 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, ptr %7, align 8
%8 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0
%9 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %8, align 8
ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9
}
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]string,string]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) {
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]string,string]).Append"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) {
_llgo_0:
%2 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 0
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1
%6 = 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" %3, ptr %4, i64 %5, i64 16)
%7 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %0, i32 0, i32 0
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, ptr %7, align 8
%8 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %0, i32 0, i32 0
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]string,string]", ptr %0, i32 0, i32 0
%9 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %8, align 8
ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9
}
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) {
define linkonce %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.(*Slice[[]int,int]).Append2"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1) {
_llgo_0:
%2 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
%2 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0
%3 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %2, align 8
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 0
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1, 1
%6 = 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" %3, ptr %4, i64 %5, i64 8)
%7 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
%7 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0
store %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, ptr %7, align 8
%8 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
%8 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testgo/tptypes.Slice[[]int,int]", ptr %0, i32 0, i32 0
%9 = load %"github.com/goplus/llgo/runtime/internal/runtime.Slice", ptr %8, align 8
ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9
}