test: regenerate test snapshots with gentests
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/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 }
|
||||
%"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
|
||||
@@ -31,34 +31,34 @@ 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/internal/runtime.init"()
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48)
|
||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 0
|
||||
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48)
|
||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %2, i64 0
|
||||
%4 = load ptr, ptr @_llgo_int, align 8
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %4, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %6, ptr %3, align 8
|
||||
%7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 1
|
||||
%5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %4, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6, ptr %3, align 8
|
||||
%7 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %2, i64 1
|
||||
%8 = load ptr, ptr @_llgo_int, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %9, ptr inttoptr (i64 2 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %10, ptr %7, align 8
|
||||
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 2
|
||||
%9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %9, ptr inttoptr (i64 2 to ptr), 1
|
||||
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %10, ptr %7, align 8
|
||||
%11 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %2, i64 2
|
||||
%12 = load ptr, ptr @_llgo_int, align 8
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %12, 0
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %13, ptr inttoptr (i64 3 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %14, ptr %11, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %15, i64 3, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, i64 3, 2
|
||||
call void @main.test(%"github.com/goplus/llgo/internal/runtime.Slice" %17)
|
||||
%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 3 to ptr), 1
|
||||
store %"github.com/goplus/llgo/runtime/internal/runtime.eface" %14, ptr %11, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15, i64 3, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16, i64 3, 2
|
||||
call void @main.test(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @main.test(%"github.com/goplus/llgo/internal/runtime.Slice" %0) {
|
||||
define void @main.test(%"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0) {
|
||||
_llgo_0:
|
||||
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1
|
||||
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_4, %_llgo_0
|
||||
@@ -68,15 +68,15 @@ _llgo_1: ; preds = %_llgo_4, %_llgo_0
|
||||
br i1 %4, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 0
|
||||
%6 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1
|
||||
%5 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 0
|
||||
%6 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
|
||||
%7 = icmp slt i64 %3, 0
|
||||
%8 = icmp sge i64 %3, %6
|
||||
%9 = or i1 %8, %7
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %9)
|
||||
%10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %5, i64 %3
|
||||
%11 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, align 8
|
||||
%12 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %11, 0
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %9)
|
||||
%10 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %5, i64 %3
|
||||
%11 = load %"github.com/goplus/llgo/runtime/internal/runtime.eface", ptr %10, align 8
|
||||
%12 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 0
|
||||
%13 = load ptr, ptr @_llgo_int, align 8
|
||||
%14 = icmp eq ptr %12, %13
|
||||
br i1 %14, label %_llgo_4, label %_llgo_5
|
||||
@@ -85,24 +85,24 @@ _llgo_3: ; preds = %_llgo_1
|
||||
ret void
|
||||
|
||||
_llgo_4: ; preds = %_llgo_2
|
||||
%15 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %11, 1
|
||||
%15 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %11, 1
|
||||
%16 = ptrtoint ptr %15 to i64
|
||||
%17 = call i32 (ptr, ...) @printf(ptr @0, i64 %16)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_5: ; preds = %_llgo_2
|
||||
%18 = load ptr, ptr @_llgo_string, align 8
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 21 }, ptr %19, align 8
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %18, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %20, ptr %19, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %21)
|
||||
%19 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, 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)
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
@@ -111,7 +111,7 @@ _llgo_0:
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 34)
|
||||
store ptr %2, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
@@ -121,7 +121,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64 24)
|
||||
store ptr %5, ptr @_llgo_string, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
@@ -129,12 +129,12 @@ _llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.Panic"(%"github.com/goplus/llgo/runtime/internal/runtime.eface")
|
||||
|
||||
declare i32 @printf(ptr, ...)
|
||||
|
||||
Reference in New Issue
Block a user