cl: compileInstrOrValue bugfix

This commit is contained in:
xushiwei
2024-04-28 22:20:46 +08:00
parent 70623dd554
commit ba94d6f04e
4 changed files with 23 additions and 23 deletions

View File

@@ -39,10 +39,9 @@ _llgo_0:
br i1 %7, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%8 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %8, i32 0, i32 1
%10 = load ptr, ptr %9, align 8
%castInt = sext ptr %10 to i64
%8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %2, i32 0, i32 1
%9 = load ptr, ptr %8, align 8
%castInt = sext ptr %9 to i64
%mrv = insertvalue { i64, i1 } poison, i64 %castInt, 0
%mrv1 = insertvalue { i64, i1 } %mrv, i1 true, 1
ret { i64, i1 } %mrv1
@@ -74,14 +73,13 @@ _llgo_0:
br i1 %7, label %_llgo_1, label %_llgo_2
_llgo_1: ; preds = %_llgo_0
%8 = alloca %"github.com/goplus/llgo/internal/runtime.iface", align 8
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %8, i32 0, i32 1
%10 = load ptr, ptr %9, align 8
%castInt = sext ptr %10 to i64
%8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.iface", ptr %2, i32 0, i32 1
%9 = load ptr, ptr %8, align 8
%castInt = sext ptr %9 to i64
ret i64 %castInt
_llgo_2: ; preds = %_llgo_0
%11 = call %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyString"([21 x i8] c"I2Int: type mismatch\00")
%10 = call %"github.com/goplus/llgo/internal/runtime.iface" @"github.com/goplus/llgo/internal/runtime.MakeAnyString"([21 x i8] c"I2Int: type mismatch\00")
call void @abort()
}