test: regenerate test snapshots with gentests

This commit is contained in:
Li Jie
2025-01-08 15:19:38 +08:00
parent 255cce4f9a
commit 60c430abad
112 changed files with 8989 additions and 8989 deletions

View File

@@ -1,8 +1,8 @@
; ModuleID = 'main'
source_filename = "main"
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/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.Slice" = type { ptr, i64, i64 }
@"main.init$guard" = global i1 false, align 1
@__llgo_argc = global i32 0, align 4
@@ -29,19 +29,19 @@ 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.String", ptr %2, i64 0
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 1 }, ptr %3, align 8
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 1
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 1 }, ptr %4, align 8
%5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 2
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, ptr %5, align 8
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %6, i64 3, 1
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %7, i64 3, 2
%9 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 1
%2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 48)
%3 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, i64 0
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 1 }, ptr %3, align 8
%4 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, i64 1
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 1 }, ptr %4, align 8
%5 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %2, i64 2
store %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 1 }, ptr %5, align 8
%6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef, ptr %2, 0
%7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %6, i64 3, 1
%8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7, i64 3, 2
%9 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, 1
%10 = add i64 %9, 1
%11 = alloca ptr, i64 %10, align 8
br label %_llgo_4
@@ -67,19 +67,19 @@ _llgo_4: ; preds = %_llgo_5, %_llgo_0
br i1 %19, label %_llgo_5, label %_llgo_6
_llgo_5: ; preds = %_llgo_4
%20 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 0
%21 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 1
%20 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, 0
%21 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8, 1
%22 = icmp slt i64 %18, 0
%23 = icmp sge i64 %18, %21
%24 = or i1 %23, %22
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %24)
%25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i64 %18
%26 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %25, align 8
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %24)
%25 = getelementptr inbounds %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %20, i64 %18
%26 = load %"github.com/goplus/llgo/runtime/internal/runtime.String", ptr %25, align 8
%27 = getelementptr ptr, ptr %11, i64 %18
%28 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %26, 1
%28 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.String" %26, 1
%29 = add i64 %28, 1
%30 = alloca i8, i64 %29, align 1
%31 = call ptr @"github.com/goplus/llgo/internal/runtime.CStrCopy"(ptr %30, %"github.com/goplus/llgo/internal/runtime.String" %26)
%31 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.CStrCopy"(ptr %30, %"github.com/goplus/llgo/runtime/internal/runtime.String" %26)
store ptr %31, ptr %27, align 8
%32 = add i64 %18, 1
br label %_llgo_4
@@ -90,12 +90,12 @@ _llgo_6: ; preds = %_llgo_4
br label %_llgo_1
}
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)
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.CStrCopy"(ptr, %"github.com/goplus/llgo/internal/runtime.String")
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.CStrCopy"(ptr, %"github.com/goplus/llgo/runtime/internal/runtime.String")
declare i32 @printf(ptr, ...)

View File

@@ -23,7 +23,7 @@ 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()
br label %_llgo_1
@@ -45,6 +45,6 @@ _llgo_3: ; preds = %_llgo_1
ret i32 0
}
declare void @"github.com/goplus/llgo/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare i32 @printf(ptr, ...)

View File

@@ -27,9 +27,9 @@ 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 8)
%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
%4 = call i32 (ptr, ...) @printf(ptr @0, i64 %3)
@@ -52,8 +52,8 @@ _llgo_0:
ret i32 0
}
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)
declare i32 @printf(ptr, ...)

View File

@@ -1,7 +1,7 @@
; ModuleID = 'main'
source_filename = "main"
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr, i64 }
@"main.init$guard" = global i1 false, align 1
@0 = private unnamed_addr constant [5 x i8] c"addr:", align 1
@@ -13,28 +13,28 @@ source_filename = "main"
define void @main.f({ float, float } %0, { float, float } %1, ptr %2) {
_llgo_0:
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 })
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %2)
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 5 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr %2)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%3 = call float @cabsf({ float, float } %0)
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 10 })
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1, i64 10 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%4 = fpext float %3 to double
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %4)
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%5 = extractvalue { float, float } %1, 0
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 11 })
call void @"github.com/goplus/llgo/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 11 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%6 = fpext float %5 to double
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %6)
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%7 = extractvalue { float, float } %1, 1
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 11 })
call void @"github.com/goplus/llgo/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 11 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 32)
%8 = fpext float %7 to double
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %8)
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret void
}
@@ -55,20 +55,20 @@ 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()
call void @main.f({ float, float } { float 3.000000e+00, float 4.000000e+00 }, { float, float } { float 3.000000e+00, float 4.000000e+00 }, ptr @main.f)
ret i32 0
}
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintPointer"(ptr)
declare float @cabsf({ float, float })
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintFloat"(double)
declare void @"github.com/goplus/llgo/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()

View File

@@ -1,7 +1,7 @@
; ModuleID = 'main'
source_filename = "main"
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, 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
@@ -27,9 +27,9 @@ 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 @_ZN4llvm15itaniumDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 29 }, i1 true)
%2 = call ptr @_ZN4llvm15itaniumDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0, i64 29 }, i1 true)
%3 = icmp ne ptr %2, null
br i1 %3, label %_llgo_1, label %_llgo_3
@@ -41,17 +41,17 @@ _llgo_2: ; preds = %_llgo_3, %_llgo_1
ret i32 0
_llgo_3: ; preds = %_llgo_0
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 18 })
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2, i64 18 })
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
br label %_llgo_2
}
declare void @"github.com/goplus/llgo/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare ptr @_ZN4llvm15itaniumDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb(%"github.com/goplus/llgo/internal/runtime.String", i1)
declare ptr @_ZN4llvm15itaniumDemangleENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEb(%"github.com/goplus/llgo/runtime/internal/runtime.String", i1)
declare i32 @printf(ptr, ...)
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString"(%"github.com/goplus/llgo/runtime/internal/runtime.String")
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)

View File

@@ -39,7 +39,7 @@ 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, i32 } @"github.com/goplus/llgo/c/sqlite.OpenV2"(ptr @1, i32 130, ptr null)
%3 = extractvalue { ptr, i32 } %2, 0
@@ -55,7 +55,7 @@ declare i32 @printf(ptr, ...)
declare void @exit(i32)
declare void @"github.com/goplus/llgo/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare { ptr, i32 } @"github.com/goplus/llgo/c/sqlite.OpenV2"(ptr, i32, ptr)