11; ModuleID = 'github.com/goplus/llgo/cl/_testdata/foo'
22source_filename = "github.com/goplus/llgo/cl/_testdata/foo"
33
4- %"github.com/goplus/llgo/runtime/internal/runtime.eface " = type { ptr , ptr }
5- %"github.com/goplus/llgo/cl/_testdata/foo.Foo " = type { ptr , float }
4+ %"github.com/goplus/llgo/runtime/abi.StructType " = type { % "github.com/goplus/llgo/runtime/abi.Type" , % "github.com/goplus/llgo/runtime/internal/runtime.String" , % "github.com/goplus/llgo/runtime/internal/runtime.Slice" }
5+ %"github.com/goplus/llgo/runtime/abi.Type " = type { i64 , i64 , i32 , i8 , i8 , i8 , i8 , { ptr , ptr }, ptr , % "github.com/goplus/llgo/runtime/internal/runtime.String" , ptr }
66%"github.com/goplus/llgo/runtime/internal/runtime.String" = type { ptr , i64 }
7- %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" , ptr , i64 , %"github.com/goplus/llgo/runtime/internal/runtime.String" , i1 }
87%"github.com/goplus/llgo/runtime/internal/runtime.Slice" = type { ptr , i64 , i64 }
8+ %"github.com/goplus/llgo/runtime/abi.PtrType" = type { %"github.com/goplus/llgo/runtime/abi.Type" , ptr }
9+ %"github.com/goplus/llgo/runtime/abi.StructField" = type { %"github.com/goplus/llgo/runtime/internal/runtime.String" , ptr , i64 , %"github.com/goplus/llgo/runtime/internal/runtime.String" , i1 }
10+ %"github.com/goplus/llgo/runtime/internal/runtime.eface" = type { ptr , ptr }
11+ %"github.com/goplus/llgo/cl/_testdata/foo.Foo" = type { ptr , float }
912
1013@"github.com/goplus/llgo/cl/_testdata/foo.init$guard" = global i1 false , align 1
11- @_llgo_int = linkonce global ptr null , align 8
12- @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = linkonce global ptr null , align 8
13- @0 = private unnamed_addr constant [ 1 x i8 ] c "V " , align 1
14+ @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = weak_odr constant % "github.com/goplus/llgo/runtime/abi.StructType" { % "github.com/goplus/llgo/runtime/abi.Type" { i64 8 , i64 0 , i32 588020711 , i8 8 , i8 8 , i8 8 , i8 57 , { ptr , ptr } { ptr @ "github.com/goplus/llgo/runtime/internal/runtime.structequal" , ptr @ "_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" }, ptr null , % "github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @ 0 , i64 16 }, ptr @ "*_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" }, % "github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @ 1 , i64 39 }, % "github.com/goplus/llgo/runtime/internal/runtime.Slice" { ptr @ "_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk$fields" , i64 1 , i64 1 } } , align 8
15+ @0 = private unnamed_addr constant [ 16 x i8 ] c "struct { V int }" , align 1
16+ @"*_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" = weak_odr constant % "github.com/goplus/llgo/runtime/abi.PtrType" { % "github.com/goplus/llgo/runtime/abi.Type" { i64 8 , i64 8 , i32 2112228924 , i8 10 , i8 8 , i8 8 , i8 54 , { ptr , ptr } { ptr @ "__llgo_stub.github.com/goplus/llgo/runtime/internal/runtime.memequalptr " , ptr null }, ptr null , % "github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @ 0 , i64 16 }, ptr null }, ptr @ "_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" }, align 8
1417@1 = private unnamed_addr constant [39 x i8 ] c "github.com/goplus/llgo/cl/_testdata/foo" , align 1
15- @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null , align 8
16- @2 = private unnamed_addr constant [1 x i8 ] c "v" , align 1
17- @3 = private unnamed_addr constant [4 x i8 ] c "load" , align 1
18+ @2 = private unnamed_addr constant [1 x i8 ] c "V" , align 1
19+ @_llgo_int = weak_odr constant %"github.com/goplus/llgo/runtime/abi.Type" { i64 8 , i64 0 , i32 -25294021 , i8 12 , i8 8 , i8 8 , i8 34 , { ptr , ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/runtime/internal/runtime.memequal64" , ptr null }, ptr null , %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3 , i64 3 }, ptr @"*_llgo_int" }, align 8
20+ @3 = private unnamed_addr constant [3 x i8 ] c "int" , align 1
21+ @"*_llgo_int" = weak_odr constant %"github.com/goplus/llgo/runtime/abi.PtrType" { %"github.com/goplus/llgo/runtime/abi.Type" { i64 8 , i64 8 , i32 -939606833 , i8 10 , i8 8 , i8 8 , i8 54 , { ptr , ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/runtime/internal/runtime.memequalptr" , ptr null }, ptr null , %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3 , i64 3 }, ptr null }, ptr @_llgo_int }, align 8
22+ @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk$fields" = weak_odr constant [1 x %"github.com/goplus/llgo/runtime/abi.StructField" ] [%"github.com/goplus/llgo/runtime/abi.StructField" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2 , i64 1 }, ptr @_llgo_int , i64 0 , %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer , i1 false }], align 8
23+ @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = weak_odr constant %"github.com/goplus/llgo/runtime/abi.StructType" { %"github.com/goplus/llgo/runtime/abi.Type" { i64 8 , i64 0 , i32 835978208 , i8 8 , i8 8 , i8 8 , i8 57 , { ptr , ptr } { ptr @"github.com/goplus/llgo/runtime/internal/runtime.structequal" , ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" }, ptr null , %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4 , i64 16 }, ptr @"*github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" }, %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1 , i64 39 }, %"github.com/goplus/llgo/runtime/internal/runtime.Slice" { ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88$fields" , i64 1 , i64 1 } }, align 8
24+ @4 = private unnamed_addr constant [16 x i8 ] c "struct { v int }" , align 1
25+ @"*github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = weak_odr constant %"github.com/goplus/llgo/runtime/abi.PtrType" { %"github.com/goplus/llgo/runtime/abi.Type" { i64 8 , i64 8 , i32 -837270651 , i8 10 , i8 8 , i8 8 , i8 54 , { ptr , ptr } { ptr @"__llgo_stub.github.com/goplus/llgo/runtime/internal/runtime.memequalptr" , ptr null }, ptr null , %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @4 , i64 16 }, ptr null }, ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" }, align 8
26+ @5 = private unnamed_addr constant [1 x i8 ] c "v" , align 1
27+ @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88$fields" = weak_odr constant [1 x %"github.com/goplus/llgo/runtime/abi.StructField" ] [%"github.com/goplus/llgo/runtime/abi.StructField" { %"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @5 , i64 1 }, ptr @_llgo_int , i64 0 , %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer , i1 false }], align 8
28+ @6 = private unnamed_addr constant [4 x i8 ] c "load" , align 1
1829
1930define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.Bar" () {
2031_llgo_0:
@@ -23,13 +34,10 @@ _llgo_0:
2334 %1 = getelementptr inbounds { i64 }, ptr %0 , i32 0 , i32 0
2435 store i64 1 , ptr %1 , align 4
2536 %2 = load { i64 }, ptr %0 , align 4
26- %3 = load ptr , ptr @_llgo_int , align 8
27- %4 = load ptr , ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" , align 8
28- %5 = extractvalue { i64 } %2 , 0
29- %6 = inttoptr i64 %5 to ptr
30- %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef , ptr %4 , 0
31- %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7 , ptr %6 , 1
32- ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %8
37+ %3 = extractvalue { i64 } %2 , 0
38+ %4 = inttoptr i64 %3 to ptr
39+ %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" { ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" , ptr undef }, ptr %4 , 1
40+ ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5
3341}
3442
3543define %"github.com/goplus/llgo/runtime/internal/runtime.eface" @"github.com/goplus/llgo/cl/_testdata/foo.F" () {
@@ -39,12 +47,10 @@ _llgo_0:
3947 %1 = getelementptr inbounds { i64 }, ptr %0 , i32 0 , i32 0
4048 store i64 1 , ptr %1 , align 4
4149 %2 = load { i64 }, ptr %0 , align 4
42- %3 = load ptr , ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" , align 8
43- %4 = extractvalue { i64 } %2 , 0
44- %5 = inttoptr i64 %4 to ptr
45- %6 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" undef , ptr %3 , 0
46- %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" %6 , ptr %5 , 1
47- ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %7
50+ %3 = extractvalue { i64 } %2 , 0
51+ %4 = inttoptr i64 %3 to ptr
52+ %5 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.eface" { ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" , ptr undef }, ptr %4 , 1
53+ ret %"github.com/goplus/llgo/runtime/internal/runtime.eface" %5
4854}
4955
5056define ptr @"github.com/goplus/llgo/cl/_testdata/foo.Foo.Pb" (%"github.com/goplus/llgo/cl/_testdata/foo.Foo" %0 ) {
@@ -66,7 +72,7 @@ _llgo_0:
6672
6773define void @"github.com/goplus/llgo/cl/_testdata/foo.(*Game).Load" (ptr %0 ) {
6874_llgo_0:
69- call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString" (%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @3 , i64 4 })
75+ call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString" (%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @6 , i64 4 })
7076 call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintByte" (i8 10 )
7177 ret void
7278}
@@ -83,7 +89,6 @@ _llgo_0:
8389
8490_llgo_1: ; preds = %_llgo_0
8591 store i1 true , ptr @"github.com/goplus/llgo/cl/_testdata/foo.init$guard" , align 1
86- call void @"github.com/goplus/llgo/cl/_testdata/foo.init$after" ()
8792 br label %_llgo_2
8893
8994_llgo_2: ; preds = %_llgo_1, %_llgo_0
@@ -93,48 +98,23 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
9398; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
9499declare void @llvm.memset (ptr nocapture writeonly , i8 , i64 , i1 immarg) #0
95100
96- define void @"github.com/goplus/llgo/cl/_testdata/foo.init$after" () {
97- _llgo_0:
98- %0 = load ptr , ptr @_llgo_int , align 8
99- %1 = icmp eq ptr %0 , null
100- br i1 %1 , label %_llgo_1 , label %_llgo_2
101+ declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.structequal" (ptr , ptr , ptr )
101102
102- _llgo_1: ; preds = %_llgo_0
103- %2 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic" (i64 34 )
104- store ptr %2 , ptr @_llgo_int , align 8
105- br label %_llgo_2
103+ declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.memequalptr" (ptr , ptr )
106104
107- _llgo_2: ; preds = %_llgo_1, %_llgo_0
108- %3 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic" (i64 34 )
109- %4 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField" (%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @0 , i64 1 }, ptr %3 , i64 0 , %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer , i1 false )
110- %5 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU" (i64 56 )
111- %6 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField" , ptr %5 , i64 0
112- store %"github.com/goplus/llgo/runtime/abi.StructField" %4 , ptr %6 , align 8
113- %7 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef , ptr %5 , 0
114- %8 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %7 , i64 1 , 1
115- %9 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %8 , i64 1 , 2
116- %10 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct" (%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1 , i64 39 }, i64 8 , %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %9 )
117- store ptr %10 , ptr @"_llgo_struct$K-dZ9QotZfVPz2a0YdRa9vmZUuDXPTqZOlMShKEDJtk" , align 8
118- %11 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic" (i64 34 )
119- %12 = call %"github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField" (%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @2 , i64 1 }, ptr %11 , i64 0 , %"github.com/goplus/llgo/runtime/internal/runtime.String" zeroinitializer , i1 false )
120- %13 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU" (i64 56 )
121- %14 = getelementptr %"github.com/goplus/llgo/runtime/abi.StructField" , ptr %13 , i64 0
122- store %"github.com/goplus/llgo/runtime/abi.StructField" %12 , ptr %14 , align 8
123- %15 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" undef , ptr %13 , 0
124- %16 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %15 , i64 1 , 1
125- %17 = insertvalue %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %16 , i64 1 , 2
126- %18 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.Struct" (%"github.com/goplus/llgo/runtime/internal/runtime.String" { ptr @1 , i64 39 }, i64 8 , %"github.com/goplus/llgo/runtime/internal/runtime.Slice" %17 )
127- store ptr %18 , ptr @"github.com/goplus/llgo/cl/_testdata/foo.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" , align 8
128- ret void
105+ define linkonce i1 @"__llgo_stub.github.com/goplus/llgo/runtime/internal/runtime.memequalptr" (ptr %0 , ptr %1 , ptr %2 ) {
106+ _llgo_0:
107+ %3 = tail call i1 @"github.com/goplus/llgo/runtime/internal/runtime.memequalptr" (ptr %1 , ptr %2 )
108+ ret i1 %3
129109}
130110
131- declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.Basic" ( i64 )
111+ declare i1 @"github.com/goplus/llgo/runtime/internal/runtime.memequal64" ( ptr , ptr )
132112
133- declare ptr @ " github.com/goplus/llgo/runtime/internal/runtime.Struct" (% "github.com/goplus/llgo/runtime/internal/runtime.String" , i64 , % "github.com/goplus/llgo/runtime/internal/runtime.Slice" )
134-
135- declare % "github.com/goplus/llgo/runtime/abi.StructField" @"github.com/goplus/llgo/runtime/internal/runtime.StructField" (% "github.com/goplus/llgo/runtime/internal/runtime.String" , ptr , i64 , % "github.com/goplus/llgo/runtime/internal/runtime.String" , i1 )
136-
137- declare ptr @ "github.com/goplus/llgo/runtime/internal/runtime.AllocU" ( i64 )
113+ define linkonce i1 @ "__llgo_stub. github.com/goplus/llgo/runtime/internal/runtime.memequal64" ( ptr %0 , ptr %1 , ptr %2 ) {
114+ _llgo_0:
115+ %3 = tail call i1 @"github.com/goplus/llgo/runtime/internal/runtime.memequal64" ( ptr %1 , ptr %2 )
116+ ret i1 %3
117+ }
138118
139119declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintString" (%"github.com/goplus/llgo/runtime/internal/runtime.String" )
140120
0 commit comments