test: regenerate test files with gentests
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/intgen'
|
||||
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/intgen"
|
||||
|
||||
%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%main.generator = type { i32 }
|
||||
%"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator" = type { i32 }
|
||||
|
||||
@"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/_testrt/intgen.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
|
||||
|
||||
define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 %0, { ptr, ptr } %1) {
|
||||
define %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 %0, { ptr, ptr } %1) {
|
||||
_llgo_0:
|
||||
%2 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/runtime/internal/runtime.MakeSlice"(i64 %0, i64 %0, i64 4)
|
||||
%3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1
|
||||
@@ -41,123 +39,119 @@ _llgo_3: ; preds = %_llgo_1
|
||||
ret %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2
|
||||
}
|
||||
|
||||
define i32 @"main.(*generator).next"(ptr %0) {
|
||||
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.(*generator).next"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %main.generator, ptr %0, i32 0, i32 0
|
||||
%1 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0
|
||||
%2 = load i32, ptr %1, align 4
|
||||
%3 = add i32 %2, 1
|
||||
%4 = getelementptr inbounds %main.generator, ptr %0, i32 0, i32 0
|
||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0
|
||||
store i32 %3, ptr %4, align 4
|
||||
%5 = getelementptr inbounds %main.generator, ptr %0, i32 0, i32 0
|
||||
%5 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %0, i32 0, i32 0
|
||||
%6 = load i32, ptr %5, align 4
|
||||
ret i32 %6
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
define void @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.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/_testrt/intgen.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/_testrt/intgen.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.Slice" @main.genInts(i64 5, { ptr, ptr } { ptr @__llgo_stub.rand, ptr null })
|
||||
%3 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1
|
||||
%0 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } { ptr @__llgo_stub.rand, ptr null })
|
||||
%1 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %0, 1
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_2, %_llgo_0
|
||||
%4 = phi i64 [ -1, %_llgo_0 ], [ %5, %_llgo_2 ]
|
||||
%5 = add i64 %4, 1
|
||||
%6 = icmp slt i64 %5, %3
|
||||
br i1 %6, label %_llgo_2, label %_llgo_3
|
||||
%2 = phi i64 [ -1, %_llgo_0 ], [ %3, %_llgo_2 ]
|
||||
%3 = add i64 %2, 1
|
||||
%4 = icmp slt i64 %3, %1
|
||||
br i1 %4, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1
|
||||
%7 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 0
|
||||
%8 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %2, 1
|
||||
%9 = icmp slt i64 %5, 0
|
||||
%10 = icmp sge i64 %5, %8
|
||||
%11 = or i1 %10, %9
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %11)
|
||||
%12 = getelementptr inbounds i32, ptr %7, i64 %5
|
||||
%13 = load i32, ptr %12, align 4
|
||||
%14 = call i32 (ptr, ...) @printf(ptr @0, i32 %13)
|
||||
%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/runtime/internal/runtime.AssertIndexRange"(i1 %9)
|
||||
%10 = getelementptr inbounds i32, ptr %5, i64 %3
|
||||
%11 = load i32, ptr %10, align 4
|
||||
%12 = call i32 (ptr, ...) @printf(ptr @0, i32 %11)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
%15 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
|
||||
store i32 1, ptr %15, align 4
|
||||
%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 %15, ptr %17, align 8
|
||||
%18 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %16, 1
|
||||
%19 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 5, { ptr, ptr } %18)
|
||||
%20 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 1
|
||||
%13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
|
||||
store i32 1, ptr %13, align 4
|
||||
%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 %13, ptr %15, align 8
|
||||
%16 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main$1", ptr undef }, ptr %14, 1
|
||||
%17 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %16)
|
||||
%18 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 1
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_5, %_llgo_3
|
||||
%21 = phi i64 [ -1, %_llgo_3 ], [ %22, %_llgo_5 ]
|
||||
%22 = add i64 %21, 1
|
||||
%23 = icmp slt i64 %22, %20
|
||||
br i1 %23, label %_llgo_5, label %_llgo_6
|
||||
%19 = phi i64 [ -1, %_llgo_3 ], [ %20, %_llgo_5 ]
|
||||
%20 = add i64 %19, 1
|
||||
%21 = icmp slt i64 %20, %18
|
||||
br i1 %21, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%24 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 0
|
||||
%25 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %19, 1
|
||||
%26 = icmp slt i64 %22, 0
|
||||
%27 = icmp sge i64 %22, %25
|
||||
%28 = or i1 %27, %26
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %28)
|
||||
%29 = getelementptr inbounds i32, ptr %24, i64 %22
|
||||
%30 = load i32, ptr %29, align 4
|
||||
%31 = call i32 (ptr, ...) @printf(ptr @1, i32 %30)
|
||||
%22 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 0
|
||||
%23 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17, 1
|
||||
%24 = icmp slt i64 %20, 0
|
||||
%25 = icmp sge i64 %20, %23
|
||||
%26 = or i1 %25, %24
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %26)
|
||||
%27 = getelementptr inbounds i32, ptr %22, i64 %20
|
||||
%28 = load i32, ptr %27, align 4
|
||||
%29 = call i32 (ptr, ...) @printf(ptr @1, i32 %28)
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_6: ; preds = %_llgo_4
|
||||
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
|
||||
%33 = getelementptr inbounds %main.generator, ptr %32, i32 0, i32 0
|
||||
store i32 1, ptr %33, align 4
|
||||
%34 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%35 = getelementptr inbounds { ptr }, ptr %34, i32 0, i32 0
|
||||
store ptr %32, ptr %35, align 8
|
||||
%36 = insertvalue { ptr, ptr } { ptr @"main.next$bound", ptr undef }, ptr %34, 1
|
||||
%37 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @main.genInts(i64 5, { ptr, ptr } %36)
|
||||
%38 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, 1
|
||||
%30 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 4)
|
||||
%31 = getelementptr inbounds %"github.com/goplus/llgo/compiler/cl/_testrt/intgen.generator", ptr %30, i32 0, i32 0
|
||||
store i32 1, ptr %31, align 4
|
||||
%32 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8)
|
||||
%33 = getelementptr inbounds { ptr }, ptr %32, i32 0, i32 0
|
||||
store ptr %30, ptr %33, align 8
|
||||
%34 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.next$bound", ptr undef }, ptr %32, 1
|
||||
%35 = call %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.genInts"(i64 5, { ptr, ptr } %34)
|
||||
%36 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 1
|
||||
br label %_llgo_7
|
||||
|
||||
_llgo_7: ; preds = %_llgo_8, %_llgo_6
|
||||
%39 = phi i64 [ -1, %_llgo_6 ], [ %40, %_llgo_8 ]
|
||||
%40 = add i64 %39, 1
|
||||
%41 = icmp slt i64 %40, %38
|
||||
br i1 %41, label %_llgo_8, label %_llgo_9
|
||||
%37 = phi i64 [ -1, %_llgo_6 ], [ %38, %_llgo_8 ]
|
||||
%38 = add i64 %37, 1
|
||||
%39 = icmp slt i64 %38, %36
|
||||
br i1 %39, label %_llgo_8, label %_llgo_9
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7
|
||||
%42 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, 0
|
||||
%43 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %37, 1
|
||||
%44 = icmp slt i64 %40, 0
|
||||
%45 = icmp sge i64 %40, %43
|
||||
%46 = or i1 %45, %44
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %46)
|
||||
%47 = getelementptr inbounds i32, ptr %42, i64 %40
|
||||
%48 = load i32, ptr %47, align 4
|
||||
%49 = call i32 (ptr, ...) @printf(ptr @2, i32 %48)
|
||||
%40 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 0
|
||||
%41 = extractvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %35, 1
|
||||
%42 = icmp slt i64 %38, 0
|
||||
%43 = icmp sge i64 %38, %41
|
||||
%44 = or i1 %43, %42
|
||||
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1 %44)
|
||||
%45 = getelementptr inbounds i32, ptr %40, i64 %38
|
||||
%46 = load i32, ptr %45, align 4
|
||||
%47 = call i32 (ptr, ...) @printf(ptr @2, i32 %46)
|
||||
br label %_llgo_7
|
||||
|
||||
_llgo_9: ; preds = %_llgo_7
|
||||
ret i32 0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @"main.main$1"(ptr %0) {
|
||||
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.main$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
@@ -174,8 +168,6 @@ declare %"github.com/goplus/llgo/runtime/internal/runtime.Slice" @"github.com/go
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
|
||||
|
||||
declare i32 @rand()
|
||||
|
||||
define linkonce i32 @__llgo_stub.rand(ptr %0) {
|
||||
@@ -190,10 +182,10 @@ declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64)
|
||||
|
||||
define i32 @"main.next$bound"(ptr %0) {
|
||||
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.next$bound"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = call i32 @"main.(*generator).next"(ptr %2)
|
||||
%3 = call i32 @"github.com/goplus/llgo/compiler/cl/_testrt/intgen.(*generator).next"(ptr %2)
|
||||
ret i32 %3
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user