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