test: regenerate test files with gentests

This commit is contained in:
Li Jie
2025-01-13 10:38:46 +08:00
parent 85d01d6f28
commit f06d292382
110 changed files with 6107 additions and 6985 deletions

View File

@@ -1,71 +1,65 @@
; ModuleID = 'main'
source_filename = "main"
; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testrt/mask'
source_filename = "github.com/goplus/llgo/compiler/cl/_testrt/mask"
@"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/mask.init$guard" = global i1 false, align 1
define void @main.init() {
define void @"github.com/goplus/llgo/compiler/cl/_testrt/mask.init"() {
_llgo_0:
%0 = load i1, ptr @"main.init$guard", align 1
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testrt/mask.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/mask.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/mask.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 i32 @main.mask(i8 1)
%3 = sext i32 %2 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %3)
%0 = call i32 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask"(i8 1)
%1 = sext i32 %0 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %1)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%4 = call i64 @main.mask_shl(i64 127, i64 5)
%2 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl"(i64 127, i64 5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %2)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%3 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 127, i64 5)
%4 = sext i8 %3 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %4)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%5 = call i8 @main.mask_shl8(i8 127, i64 5)
%6 = sext i8 %5 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %6)
%5 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 127, i64 5)
%6 = zext i8 %5 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %6)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%7 = call i8 @main.mask_shl8u(i8 127, i64 5)
%8 = zext i8 %7 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %8)
%7 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 127, i64 16)
%8 = sext i8 %7 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %8)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%9 = call i8 @main.mask_shl8(i8 127, i64 16)
%10 = sext i8 %9 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %10)
%9 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 127, i64 16)
%10 = zext i8 %9 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %10)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%11 = call i8 @main.mask_shl8u(i8 127, i64 16)
%12 = zext i8 %11 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %12)
%11 = call i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr"(i64 127, i64 5)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %11)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%13 = call i64 @main.mask_shr(i64 127, i64 5)
%12 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 127, i64 5)
%13 = sext i8 %12 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %13)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%14 = call i8 @main.mask_shr8(i8 127, i64 5)
%15 = sext i8 %14 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %15)
%14 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8u"(i8 127, i64 5)
%15 = zext i8 %14 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %15)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%16 = call i8 @main.mask_shr8u(i8 127, i64 5)
%17 = zext i8 %16 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 %17)
%16 = call i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 127, i64 16)
%17 = sext i8 %16 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %17)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
%18 = call i8 @main.mask_shr8(i8 127, i64 16)
%19 = sext i8 %18 to i64
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64 %19)
call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8 10)
ret i32 0
ret void
}
define i32 @main.mask(i8 %0) {
define i32 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask"(i8 %0) {
_llgo_0:
%1 = sext i8 %0 to i32
%2 = shl i32 %1, 31
@@ -74,7 +68,7 @@ _llgo_0:
ret i32 %4
}
define i64 @main.mask_shl(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl"(i64 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -84,7 +78,7 @@ _llgo_0:
ret i64 %5
}
define i8 @main.mask_shl8(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -95,7 +89,7 @@ _llgo_0:
ret i8 %6
}
define i8 @main.mask_shl8u(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shl8u"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -106,7 +100,7 @@ _llgo_0:
ret i8 %6
}
define i64 @main.mask_shr(i64 %0, i64 %1) {
define i64 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr"(i64 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -116,7 +110,7 @@ _llgo_0:
ret i64 %5
}
define i8 @main.mask_shr8(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -127,7 +121,7 @@ _llgo_0:
ret i8 %6
}
define i8 @main.mask_shr8u(i8 %0, i64 %1) {
define i8 @"github.com/goplus/llgo/compiler/cl/_testrt/mask.mask_shr8u"(i8 %0, i64 %1) {
_llgo_0:
%2 = icmp slt i64 %1, 0
call void @"github.com/goplus/llgo/runtime/internal/runtime.AssertNegativeShift"(i1 %2)
@@ -138,8 +132,6 @@ _llgo_0:
ret i8 %6
}
declare void @"github.com/goplus/llgo/runtime/internal/runtime.init"()
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintInt"(i64)
declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte"(i8)