test: regenerate test files with gentests
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/atomic'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/atomic"
|
||||
|
||||
%"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/_testlibgo/atomic.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [6 x i8] c"store:", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"ret:", align 1
|
||||
@2 = private unnamed_addr constant [2 x i8] c"v:", align 1
|
||||
@3 = private unnamed_addr constant [4 x i8] c"swp:", align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.init$guard", align 1
|
||||
call void @"sync/atomic.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -25,31 +23,37 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/atomic.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 atomic i64 100, ptr %2 seq_cst, align 4
|
||||
%3 = load atomic i64, ptr %2 seq_cst, align 4
|
||||
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8)
|
||||
store atomic i64 100, ptr %0 seq_cst, align 4
|
||||
%1 = load atomic i64, ptr %0 seq_cst, align 4
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%2 = call i64 @"sync/atomic.AddInt64"(ptr %0, i64 1)
|
||||
%3 = load i64, ptr %0, align 4
|
||||
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)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %2)
|
||||
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 @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%4 = call i64 @"sync/atomic.AddInt64"(ptr %2, i64 1)
|
||||
%5 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 4 })
|
||||
%4 = call i1 @"sync/atomic.CompareAndSwapInt64"(ptr %0, i64 100, i64 102)
|
||||
%5 = load i64, ptr %0, align 4
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %4)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %4)
|
||||
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 @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%6 = call i1 @"sync/atomic.CompareAndSwapInt64"(ptr %2, i64 100, i64 102)
|
||||
%7 = load i64, ptr %2, align 4
|
||||
%6 = call i1 @"sync/atomic.CompareAndSwapInt64"(ptr %0, i64 101, i64 102)
|
||||
%7 = load i64, ptr %0, align 4
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %6)
|
||||
@@ -58,33 +62,21 @@ _llgo_0:
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%8 = call i1 @"sync/atomic.CompareAndSwapInt64"(ptr %2, i64 101, i64 102)
|
||||
%9 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 })
|
||||
%8 = call i64 @"sync/atomic.AddInt64"(ptr %0, i64 -1)
|
||||
%9 = load i64, ptr %0, align 4
|
||||
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)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %8)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8)
|
||||
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 @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %9)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%10 = call i64 @"sync/atomic.AddInt64"(ptr %2, i64 -1)
|
||||
%11 = load i64, ptr %2, align 4
|
||||
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)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %10)
|
||||
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 @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"sync/atomic.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
|
||||
|
||||
@@ -1,26 +1,24 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/bytes'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/bytes"
|
||||
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [6 x i8] c"Hello ", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"World", align 1
|
||||
@2 = private unnamed_addr constant [3 x i8] c"buf", align 1
|
||||
@3 = private unnamed_addr constant [2 x i8] c"Go", align 1
|
||||
@4 = private unnamed_addr constant [2 x i8] c"go", align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.init$guard", align 1
|
||||
call void @bytes.init()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -28,36 +26,30 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/bytes.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 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 })
|
||||
%4 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"bytes.(*Buffer).Write"(ptr %2, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3)
|
||||
%5 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"bytes.(*Buffer).WriteString"(ptr %2, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 })
|
||||
%6 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"bytes.(*Buffer).Bytes"(ptr %2)
|
||||
%7 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"bytes.(*Buffer).String"(ptr %2)
|
||||
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 40)
|
||||
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 })
|
||||
%2 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"bytes.(*Buffer).Write"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1)
|
||||
%3 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"bytes.(*Buffer).WriteString"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 })
|
||||
%4 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"bytes.(*Buffer).Bytes"(ptr %0)
|
||||
%5 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"bytes.(*Buffer).String"(ptr %0)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 3 })
|
||||
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" %6)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %4)
|
||||
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" %7)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %5)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%8 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 })
|
||||
%9 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 2 })
|
||||
%10 = call i1 @bytes.EqualFold(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %10)
|
||||
%6 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 2 })
|
||||
%7 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 2 })
|
||||
%8 = call i1 @bytes.EqualFold(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintBool"(i1 %8)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @bytes.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/complex'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/complex"
|
||||
|
||||
%"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/_testlibgo/complex.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [10 x i8] c"abs(3+4i):", align 1
|
||||
@1 = private unnamed_addr constant [11 x i8] c"real(3+4i):", align 1
|
||||
@2 = private unnamed_addr constant [11 x i8] c"imag(3+4i):", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.f({ double, double } %0, { double, double } %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.f"({ double, double } %0, { double, double } %1) {
|
||||
_llgo_0:
|
||||
%2 = call double @cabs({ double, double } %0)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 10 })
|
||||
@@ -30,13 +28,13 @@ _llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.init$guard", align 1
|
||||
call void @"math/cmplx.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -44,14 +42,10 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.main"() {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @main.f({ double, double } { double 3.000000e+00, double 4.000000e+00 }, { double, double } { double 3.000000e+00, double 4.000000e+00 })
|
||||
ret i32 0
|
||||
call void @"github.com/goplus/llgo/compiler/cl/_testlibgo/complex.f"({ double, double } { double 3.000000e+00, double 4.000000e+00 }, { double, double } { double 3.000000e+00, double 4.000000e+00 })
|
||||
ret void
|
||||
}
|
||||
|
||||
declare double @cabs({ double, double })
|
||||
@@ -63,5 +57,3 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"math/cmplx.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/errors'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/errors"
|
||||
|
||||
%"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.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [5 x i8] c"error", align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/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
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/errors.init$guard", align 1
|
||||
call void @errors.init()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -24,25 +22,19 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/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" @errors.New(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 })
|
||||
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, 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
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %6)
|
||||
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.iface" @errors.New(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 })
|
||||
%1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %0)
|
||||
%2 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %0, 1
|
||||
%3 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %1, 0
|
||||
%4 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %3, ptr %2, 1
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %4)
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare void @errors.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare %"github.com/goplus/llgo/runtime/internal/runtime.iface" @errors.New(%"github.com/goplus/llgo/runtime/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface")
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/math'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/math"
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard" = global i1 false, align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.init$guard", align 1
|
||||
call void @math.init()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -19,28 +17,22 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/math.main"() {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call double @sqrt(double 2.000000e+00)
|
||||
%0 = call double @sqrt(double 2.000000e+00)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %0)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%1 = call double @math.Abs(double -1.200000e+00)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %1)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%2 = call double @math.Ldexp(double 1.200000e+00, i64 3)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %2)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%3 = call double @math.Abs(double -1.200000e+00)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %3)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%4 = call double @math.Ldexp(double 1.200000e+00, i64 3)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %4)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @math.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare double @sqrt(double)
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double)
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits"
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init$guard" = global i1 false, align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.init$guard", align 1
|
||||
call void @"math/bits.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -19,25 +17,19 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/mathbits.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 @"math/bits.Len8"(i8 20)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %2)
|
||||
%0 = call i64 @"math/bits.Len8"(i8 20)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %0)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%3 = call i64 @"math/bits.OnesCount"(i64 20)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
|
||||
%1 = call i64 @"math/bits.OnesCount"(i64 20)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"math/bits.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare i64 @"math/bits.Len8"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto"
|
||||
|
||||
%"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/_testlibgo/nettextproto.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [4 x i8] c"host", align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.init$guard", align 1
|
||||
call void @"net/textproto.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -22,22 +20,16 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/nettextproto.main"() {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"net/textproto.CanonicalMIMEHeaderKey"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %2)
|
||||
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"net/textproto.CanonicalMIMEHeaderKey"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 4 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %0)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"net/textproto.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare %"github.com/goplus/llgo/runtime/internal/runtime.String" @"net/textproto.CanonicalMIMEHeaderKey"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/os'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/os"
|
||||
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [4 x i8] c"cwd:", align 1
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.init$guard", align 1
|
||||
call void @os.init()
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -24,46 +22,40 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/os.main"() {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @os.Getwd()
|
||||
%3 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %2, 0
|
||||
%4 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %2, 1
|
||||
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %4)
|
||||
%6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 1
|
||||
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %5, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7, ptr %6, 1
|
||||
%9 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
|
||||
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %9, 0
|
||||
%11 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr null, 1
|
||||
%12 = call i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11)
|
||||
%13 = xor i1 %12, true
|
||||
br i1 %13, label %_llgo_1, label %_llgo_2
|
||||
%0 = call { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @os.Getwd()
|
||||
%1 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %0, 0
|
||||
%2 = extractvalue { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } %0, 1
|
||||
%3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, 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 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" zeroinitializer)
|
||||
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %7, 0
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8, ptr null, 1
|
||||
%10 = 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" %9)
|
||||
%11 = xor i1 %10, true
|
||||
br i1 %11, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%14 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %4)
|
||||
%15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %4, 1
|
||||
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %14, 0
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %16, ptr %15, 1
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %17)
|
||||
%12 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.IfaceType"(%"github.com/goplus/llgo/runtime/internal/runtime.iface" %2)
|
||||
%13 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.iface" %2, 1
|
||||
%14 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %12, 0
|
||||
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %13, 1
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface" %15)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_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 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %3)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %1)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @os.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare { %"github.com/goplus/llgo/runtime/internal/runtime.String", %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @os.Getwd()
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/runtime/internal/runtime.eface", %"github.com/goplus/llgo/runtime/internal/runtime.eface")
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testlibgo/strings'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testlibgo/strings"
|
||||
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.iface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [6 x i8] c"Hello ", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"World", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"len:", align 1
|
||||
@@ -17,13 +15,13 @@ source_filename = "main"
|
||||
@6 = private unnamed_addr constant [12 x i8] c"Hello, world", align 1
|
||||
@unicode.Han = external global ptr, align 8
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.init$guard", align 1
|
||||
call void @strings.init()
|
||||
call void @unicode.init()
|
||||
br label %_llgo_2
|
||||
@@ -32,41 +30,37 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main"() {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
|
||||
%3 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 })
|
||||
%4 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"strings.(*Builder).Write"(ptr %2, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %3)
|
||||
%5 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"strings.(*Builder).WriteString"(ptr %2, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 })
|
||||
%6 = call i64 @"strings.(*Builder).Len"(ptr %2)
|
||||
%7 = call i64 @"strings.(*Builder).Cap"(ptr %2)
|
||||
%8 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"strings.(*Builder).String"(ptr %2)
|
||||
%0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 32)
|
||||
%1 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 6 })
|
||||
%2 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"strings.(*Builder).Write"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %1)
|
||||
%3 = call { i64, %"github.com/goplus/llgo/runtime/internal/runtime.iface" } @"strings.(*Builder).WriteString"(ptr %0, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 5 })
|
||||
%4 = call i64 @"strings.(*Builder).Len"(ptr %0)
|
||||
%5 = call i64 @"strings.(*Builder).Cap"(ptr %0)
|
||||
%6 = call %"github.com/goplus/llgo/runtime/internal/runtime.String" @"strings.(*Builder).String"(ptr %0)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 4 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %6)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %4)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3, i64 4 })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4, i64 7 })
|
||||
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" %8)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" %6)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%9 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 13 }, { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %9)
|
||||
%7 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5, i64 13 }, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1", ptr null })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %7)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
%10 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 12 }, { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %10)
|
||||
%8 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6, i64 12 }, { ptr, ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1", ptr null })
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8)
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i1 @"main.main$1"(i32 %0) {
|
||||
define i1 @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1"(i32 %0) {
|
||||
_llgo_0:
|
||||
%1 = load ptr, ptr @unicode.Han, align 8
|
||||
%2 = call i1 @unicode.Is(ptr %1, i32 %0)
|
||||
@@ -77,8 +71,6 @@ declare void @strings.init()
|
||||
|
||||
declare void @unicode.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
|
||||
@@ -101,9 +93,9 @@ declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare i64 @strings.IndexFunc(%"github.com/goplus/llgo/runtime/internal/runtime.String", { ptr, ptr })
|
||||
|
||||
define linkonce i1 @"__llgo_stub.main.main$1"(ptr %0, i32 %1) {
|
||||
define linkonce i1 @"__llgo_stub.github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1"(ptr %0, i32 %1) {
|
||||
_llgo_0:
|
||||
%2 = tail call i1 @"main.main$1"(i32 %1)
|
||||
%2 = tail call i1 @"github.com/goplus/llgo/compiler/cl/_testlibgo/strings.main$1"(i32 %1)
|
||||
ret i1 %2
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user