|
|
|
|
@@ -75,124 +75,124 @@ _llgo_0:
|
|
|
|
|
%24 = call i32 @"github.com/goplus/llgo/internal/runtime.CreateThread"(ptr %19, ptr null, %"github.com/goplus/llgo/c/pthread.RoutineFunc" %23, ptr %17)
|
|
|
|
|
%25 = load ptr, ptr %2, align 8
|
|
|
|
|
%26 = alloca {}, align 8
|
|
|
|
|
%27 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %26, i64 0)
|
|
|
|
|
store {} zeroinitializer, ptr %27, align 1
|
|
|
|
|
%28 = call i1 @"github.com/goplus/llgo/internal/runtime.ChanSend"(ptr %25, ptr %27, i64 0)
|
|
|
|
|
%29 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 0
|
|
|
|
|
store ptr @0, ptr %30, align 8
|
|
|
|
|
%31 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %29, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %31, align 4
|
|
|
|
|
%32 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %29, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %32)
|
|
|
|
|
call void @llvm.memset(ptr %26, i8 0, i64 0, i1 false)
|
|
|
|
|
store {} zeroinitializer, ptr %26, align 1
|
|
|
|
|
%27 = call i1 @"github.com/goplus/llgo/internal/runtime.ChanSend"(ptr %25, ptr %26, i64 0)
|
|
|
|
|
%28 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 0
|
|
|
|
|
store ptr @0, ptr %29, align 8
|
|
|
|
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %28, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %30, align 4
|
|
|
|
|
%31 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %28, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %31)
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
%33 = load ptr, ptr %4, align 8
|
|
|
|
|
%34 = alloca {}, align 8
|
|
|
|
|
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %34, i64 0)
|
|
|
|
|
%36 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %36, i32 0, i32 0
|
|
|
|
|
store ptr %33, ptr %37, align 8
|
|
|
|
|
%38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %36, i32 0, i32 1
|
|
|
|
|
store ptr %35, ptr %38, align 8
|
|
|
|
|
%39 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %36, i32 0, i32 2
|
|
|
|
|
store i64 0, ptr %39, align 4
|
|
|
|
|
%40 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %36, i32 0, i32 3
|
|
|
|
|
store i1 false, ptr %40, align 1
|
|
|
|
|
%41 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %36, align 8
|
|
|
|
|
%42 = alloca {}, align 8
|
|
|
|
|
%43 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %42, i64 0)
|
|
|
|
|
%44 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %44, i32 0, i32 0
|
|
|
|
|
store ptr %8, ptr %45, align 8
|
|
|
|
|
%46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %44, i32 0, i32 1
|
|
|
|
|
store ptr %43, ptr %46, align 8
|
|
|
|
|
%47 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %44, i32 0, i32 2
|
|
|
|
|
store i64 0, ptr %47, align 4
|
|
|
|
|
%48 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %44, i32 0, i32 3
|
|
|
|
|
store i1 false, ptr %48, align 1
|
|
|
|
|
%49 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %44, align 8
|
|
|
|
|
%50 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
|
|
|
|
%51 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %50, i64 0
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %41, ptr %51, align 8
|
|
|
|
|
%52 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %50, i64 1
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %49, ptr %52, align 8
|
|
|
|
|
%53 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
|
|
|
%54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, i32 0, i32 0
|
|
|
|
|
store ptr %50, ptr %54, align 8
|
|
|
|
|
%55 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, i32 0, i32 1
|
|
|
|
|
store i64 2, ptr %55, align 4
|
|
|
|
|
%56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, i32 0, i32 2
|
|
|
|
|
store i64 2, ptr %56, align 4
|
|
|
|
|
%57 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, align 8
|
|
|
|
|
%58 = call { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice" %57)
|
|
|
|
|
%59 = extractvalue { i64, i1 } %58, 0
|
|
|
|
|
%60 = extractvalue { i64, i1 } %58, 1
|
|
|
|
|
%61 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %41, 1
|
|
|
|
|
%62 = load {}, ptr %61, align 1
|
|
|
|
|
%63 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %49, 1
|
|
|
|
|
%64 = load {}, ptr %63, align 1
|
|
|
|
|
%65 = alloca { i64, i1, {}, {} }, align 8
|
|
|
|
|
%66 = getelementptr inbounds { i64, i1, {}, {} }, ptr %65, i32 0, i32 0
|
|
|
|
|
store i64 %59, ptr %66, align 4
|
|
|
|
|
%67 = getelementptr inbounds { i64, i1, {}, {} }, ptr %65, i32 0, i32 1
|
|
|
|
|
store i1 %60, ptr %67, align 1
|
|
|
|
|
%68 = getelementptr inbounds { i64, i1, {}, {} }, ptr %65, i32 0, i32 2
|
|
|
|
|
store {} %62, ptr %68, align 1
|
|
|
|
|
%69 = getelementptr inbounds { i64, i1, {}, {} }, ptr %65, i32 0, i32 3
|
|
|
|
|
store {} %64, ptr %69, align 1
|
|
|
|
|
%70 = load { i64, i1, {}, {} }, ptr %65, align 4
|
|
|
|
|
%71 = extractvalue { i64, i1, {}, {} } %70, 0
|
|
|
|
|
%72 = icmp eq i64 %71, 0
|
|
|
|
|
br i1 %72, label %_llgo_2, label %_llgo_3
|
|
|
|
|
%32 = load ptr, ptr %4, align 8
|
|
|
|
|
%33 = alloca {}, align 8
|
|
|
|
|
call void @llvm.memset(ptr %33, i8 0, i64 0, i1 false)
|
|
|
|
|
%34 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %34, i32 0, i32 0
|
|
|
|
|
store ptr %32, ptr %35, align 8
|
|
|
|
|
%36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %34, i32 0, i32 1
|
|
|
|
|
store ptr %33, ptr %36, align 8
|
|
|
|
|
%37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %34, i32 0, i32 2
|
|
|
|
|
store i64 0, ptr %37, align 4
|
|
|
|
|
%38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %34, i32 0, i32 3
|
|
|
|
|
store i1 false, ptr %38, align 1
|
|
|
|
|
%39 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %34, align 8
|
|
|
|
|
%40 = alloca {}, align 8
|
|
|
|
|
call void @llvm.memset(ptr %40, i8 0, i64 0, i1 false)
|
|
|
|
|
%41 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%42 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %41, i32 0, i32 0
|
|
|
|
|
store ptr %8, ptr %42, align 8
|
|
|
|
|
%43 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %41, i32 0, i32 1
|
|
|
|
|
store ptr %40, ptr %43, align 8
|
|
|
|
|
%44 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %41, i32 0, i32 2
|
|
|
|
|
store i64 0, ptr %44, align 4
|
|
|
|
|
%45 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %41, i32 0, i32 3
|
|
|
|
|
store i1 false, ptr %45, align 1
|
|
|
|
|
%46 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %41, align 8
|
|
|
|
|
%47 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
|
|
|
|
%48 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %47, i64 0
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %39, ptr %48, align 8
|
|
|
|
|
%49 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %47, i64 1
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %46, ptr %49, align 8
|
|
|
|
|
%50 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
|
|
|
%51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, i32 0, i32 0
|
|
|
|
|
store ptr %47, ptr %51, align 8
|
|
|
|
|
%52 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, i32 0, i32 1
|
|
|
|
|
store i64 2, ptr %52, align 4
|
|
|
|
|
%53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, i32 0, i32 2
|
|
|
|
|
store i64 2, ptr %53, align 4
|
|
|
|
|
%54 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, align 8
|
|
|
|
|
%55 = call { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice" %54)
|
|
|
|
|
%56 = extractvalue { i64, i1 } %55, 0
|
|
|
|
|
%57 = extractvalue { i64, i1 } %55, 1
|
|
|
|
|
%58 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %39, 1
|
|
|
|
|
%59 = load {}, ptr %58, align 1
|
|
|
|
|
%60 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %46, 1
|
|
|
|
|
%61 = load {}, ptr %60, align 1
|
|
|
|
|
%62 = alloca { i64, i1, {}, {} }, align 8
|
|
|
|
|
%63 = getelementptr inbounds { i64, i1, {}, {} }, ptr %62, i32 0, i32 0
|
|
|
|
|
store i64 %56, ptr %63, align 4
|
|
|
|
|
%64 = getelementptr inbounds { i64, i1, {}, {} }, ptr %62, i32 0, i32 1
|
|
|
|
|
store i1 %57, ptr %64, align 1
|
|
|
|
|
%65 = getelementptr inbounds { i64, i1, {}, {} }, ptr %62, i32 0, i32 2
|
|
|
|
|
store {} %59, ptr %65, align 1
|
|
|
|
|
%66 = getelementptr inbounds { i64, i1, {}, {} }, ptr %62, i32 0, i32 3
|
|
|
|
|
store {} %61, ptr %66, align 1
|
|
|
|
|
%67 = load { i64, i1, {}, {} }, ptr %62, align 4
|
|
|
|
|
%68 = extractvalue { i64, i1, {}, {} } %67, 0
|
|
|
|
|
%69 = icmp eq i64 %68, 0
|
|
|
|
|
br i1 %69, label %_llgo_2, label %_llgo_3
|
|
|
|
|
|
|
|
|
|
_llgo_1: ; preds = %_llgo_4, %_llgo_2
|
|
|
|
|
ret i32 0
|
|
|
|
|
|
|
|
|
|
_llgo_2: ; preds = %_llgo_0
|
|
|
|
|
%73 = extractvalue { i64, i1, {}, {} } %70, 2
|
|
|
|
|
%74 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%75 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %74, i32 0, i32 0
|
|
|
|
|
store ptr @1, ptr %75, align 8
|
|
|
|
|
%76 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %74, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %76, align 4
|
|
|
|
|
%77 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %74, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %77)
|
|
|
|
|
%70 = extractvalue { i64, i1, {}, {} } %67, 2
|
|
|
|
|
%71 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%72 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %71, i32 0, i32 0
|
|
|
|
|
store ptr @1, ptr %72, align 8
|
|
|
|
|
%73 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %71, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %73, align 4
|
|
|
|
|
%74 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %71, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %74)
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
br label %_llgo_1
|
|
|
|
|
|
|
|
|
|
_llgo_3: ; preds = %_llgo_0
|
|
|
|
|
%78 = icmp eq i64 %71, 1
|
|
|
|
|
br i1 %78, label %_llgo_4, label %_llgo_5
|
|
|
|
|
%75 = icmp eq i64 %68, 1
|
|
|
|
|
br i1 %75, label %_llgo_4, label %_llgo_5
|
|
|
|
|
|
|
|
|
|
_llgo_4: ; preds = %_llgo_3
|
|
|
|
|
%79 = extractvalue { i64, i1, {}, {} } %70, 3
|
|
|
|
|
%80 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%81 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %80, i32 0, i32 0
|
|
|
|
|
store ptr @2, ptr %81, align 8
|
|
|
|
|
%82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %80, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %82, align 4
|
|
|
|
|
%83 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %80, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %83)
|
|
|
|
|
%76 = extractvalue { i64, i1, {}, {} } %67, 3
|
|
|
|
|
%77 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%78 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %77, i32 0, i32 0
|
|
|
|
|
store ptr @2, ptr %78, align 8
|
|
|
|
|
%79 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %77, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %79, align 4
|
|
|
|
|
%80 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %77, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %80)
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
br label %_llgo_1
|
|
|
|
|
|
|
|
|
|
_llgo_5: ; preds = %_llgo_3
|
|
|
|
|
%84 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%85 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 0
|
|
|
|
|
store ptr @3, ptr %85, align 8
|
|
|
|
|
%86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %84, i32 0, i32 1
|
|
|
|
|
store i64 31, ptr %86, align 4
|
|
|
|
|
%87 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %84, align 8
|
|
|
|
|
%88 = load ptr, ptr @_llgo_string, align 8
|
|
|
|
|
%89 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.String" %87, ptr %89, align 8
|
|
|
|
|
%90 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
|
|
|
%91 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %90, i32 0, i32 0
|
|
|
|
|
store ptr %88, ptr %91, align 8
|
|
|
|
|
%92 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %90, i32 0, i32 1
|
|
|
|
|
store ptr %89, ptr %92, align 8
|
|
|
|
|
%93 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %90, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %93)
|
|
|
|
|
%81 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 0
|
|
|
|
|
store ptr @3, ptr %82, align 8
|
|
|
|
|
%83 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %81, i32 0, i32 1
|
|
|
|
|
store i64 31, ptr %83, align 4
|
|
|
|
|
%84 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %81, align 8
|
|
|
|
|
%85 = load ptr, ptr @_llgo_string, align 8
|
|
|
|
|
%86 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.String" %84, ptr %86, align 8
|
|
|
|
|
%87 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
|
|
|
%88 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %87, i32 0, i32 0
|
|
|
|
|
store ptr %85, ptr %88, align 8
|
|
|
|
|
%89 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %87, i32 0, i32 1
|
|
|
|
|
store ptr %86, ptr %89, align 8
|
|
|
|
|
%90 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %87, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %90)
|
|
|
|
|
unreachable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -202,123 +202,123 @@ _llgo_0:
|
|
|
|
|
%2 = extractvalue { ptr, ptr, ptr } %1, 0
|
|
|
|
|
%3 = load ptr, ptr %2, align 8
|
|
|
|
|
%4 = alloca {}, align 8
|
|
|
|
|
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %4, i64 0)
|
|
|
|
|
%6 = call i1 @"github.com/goplus/llgo/internal/runtime.ChanRecv"(ptr %3, ptr %5, i64 0)
|
|
|
|
|
%7 = load {}, ptr %5, align 1
|
|
|
|
|
%8 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %8, i32 0, i32 0
|
|
|
|
|
store ptr @4, ptr %9, align 8
|
|
|
|
|
%10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %8, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %10, align 4
|
|
|
|
|
%11 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %8, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %11)
|
|
|
|
|
call void @llvm.memset(ptr %4, i8 0, i64 0, i1 false)
|
|
|
|
|
%5 = call i1 @"github.com/goplus/llgo/internal/runtime.ChanRecv"(ptr %3, ptr %4, i64 0)
|
|
|
|
|
%6 = load {}, ptr %4, align 1
|
|
|
|
|
%7 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%8 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 0
|
|
|
|
|
store ptr @4, ptr %8, align 8
|
|
|
|
|
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %7, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %9, align 4
|
|
|
|
|
%10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %7, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %10)
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
%12 = extractvalue { ptr, ptr, ptr } %1, 1
|
|
|
|
|
%13 = load ptr, ptr %12, align 8
|
|
|
|
|
%14 = extractvalue { ptr, ptr, ptr } %1, 2
|
|
|
|
|
%15 = load ptr, ptr %14, align 8
|
|
|
|
|
%16 = alloca {}, align 8
|
|
|
|
|
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %16, i64 0)
|
|
|
|
|
store {} zeroinitializer, ptr %17, align 1
|
|
|
|
|
%18 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %18, i32 0, i32 0
|
|
|
|
|
store ptr %13, ptr %19, align 8
|
|
|
|
|
%20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %18, i32 0, i32 1
|
|
|
|
|
store ptr %17, ptr %20, align 8
|
|
|
|
|
%21 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %18, i32 0, i32 2
|
|
|
|
|
store i32 0, ptr %21, align 4
|
|
|
|
|
%22 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %18, i32 0, i32 3
|
|
|
|
|
store i1 true, ptr %22, align 1
|
|
|
|
|
%23 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %18, align 8
|
|
|
|
|
%24 = alloca {}, align 8
|
|
|
|
|
%25 = call ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr %24, i64 0)
|
|
|
|
|
%26 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %26, i32 0, i32 0
|
|
|
|
|
store ptr %15, ptr %27, align 8
|
|
|
|
|
%28 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %26, i32 0, i32 1
|
|
|
|
|
store ptr %25, ptr %28, align 8
|
|
|
|
|
%29 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %26, i32 0, i32 2
|
|
|
|
|
store i64 0, ptr %29, align 4
|
|
|
|
|
%30 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %26, i32 0, i32 3
|
|
|
|
|
store i1 false, ptr %30, align 1
|
|
|
|
|
%31 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %26, align 8
|
|
|
|
|
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
|
|
|
|
%33 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %32, i64 0
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %23, ptr %33, align 8
|
|
|
|
|
%34 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %32, i64 1
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %31, ptr %34, align 8
|
|
|
|
|
%35 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
|
|
|
%36 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %35, i32 0, i32 0
|
|
|
|
|
store ptr %32, ptr %36, align 8
|
|
|
|
|
%37 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %35, i32 0, i32 1
|
|
|
|
|
store i64 2, ptr %37, align 4
|
|
|
|
|
%38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %35, i32 0, i32 2
|
|
|
|
|
store i64 2, ptr %38, align 4
|
|
|
|
|
%39 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %35, align 8
|
|
|
|
|
%40 = call { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice" %39)
|
|
|
|
|
%41 = extractvalue { i64, i1 } %40, 0
|
|
|
|
|
%42 = extractvalue { i64, i1 } %40, 1
|
|
|
|
|
%43 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %31, 1
|
|
|
|
|
%44 = load {}, ptr %43, align 1
|
|
|
|
|
%45 = alloca { i64, i1, {} }, align 8
|
|
|
|
|
%46 = getelementptr inbounds { i64, i1, {} }, ptr %45, i32 0, i32 0
|
|
|
|
|
store i64 %41, ptr %46, align 4
|
|
|
|
|
%47 = getelementptr inbounds { i64, i1, {} }, ptr %45, i32 0, i32 1
|
|
|
|
|
store i1 %42, ptr %47, align 1
|
|
|
|
|
%48 = getelementptr inbounds { i64, i1, {} }, ptr %45, i32 0, i32 2
|
|
|
|
|
store {} %44, ptr %48, align 1
|
|
|
|
|
%49 = load { i64, i1, {} }, ptr %45, align 4
|
|
|
|
|
%50 = extractvalue { i64, i1, {} } %49, 0
|
|
|
|
|
%51 = icmp eq i64 %50, 0
|
|
|
|
|
br i1 %51, label %_llgo_2, label %_llgo_3
|
|
|
|
|
%11 = extractvalue { ptr, ptr, ptr } %1, 1
|
|
|
|
|
%12 = load ptr, ptr %11, align 8
|
|
|
|
|
%13 = extractvalue { ptr, ptr, ptr } %1, 2
|
|
|
|
|
%14 = load ptr, ptr %13, align 8
|
|
|
|
|
%15 = alloca {}, align 8
|
|
|
|
|
call void @llvm.memset(ptr %15, i8 0, i64 0, i1 false)
|
|
|
|
|
store {} zeroinitializer, ptr %15, align 1
|
|
|
|
|
%16 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%17 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %16, i32 0, i32 0
|
|
|
|
|
store ptr %12, ptr %17, align 8
|
|
|
|
|
%18 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %16, i32 0, i32 1
|
|
|
|
|
store ptr %15, ptr %18, align 8
|
|
|
|
|
%19 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %16, i32 0, i32 2
|
|
|
|
|
store i32 0, ptr %19, align 4
|
|
|
|
|
%20 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %16, i32 0, i32 3
|
|
|
|
|
store i1 true, ptr %20, align 1
|
|
|
|
|
%21 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %16, align 8
|
|
|
|
|
%22 = alloca {}, align 8
|
|
|
|
|
call void @llvm.memset(ptr %22, i8 0, i64 0, i1 false)
|
|
|
|
|
%23 = alloca %"github.com/goplus/llgo/internal/runtime.ChanOp", align 8
|
|
|
|
|
%24 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %23, i32 0, i32 0
|
|
|
|
|
store ptr %14, ptr %24, align 8
|
|
|
|
|
%25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %23, i32 0, i32 1
|
|
|
|
|
store ptr %22, ptr %25, align 8
|
|
|
|
|
%26 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %23, i32 0, i32 2
|
|
|
|
|
store i64 0, ptr %26, align 4
|
|
|
|
|
%27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %23, i32 0, i32 3
|
|
|
|
|
store i1 false, ptr %27, align 1
|
|
|
|
|
%28 = load %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %23, align 8
|
|
|
|
|
%29 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
|
|
|
|
%30 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %29, i64 0
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %21, ptr %30, align 8
|
|
|
|
|
%31 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %29, i64 1
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %28, ptr %31, align 8
|
|
|
|
|
%32 = alloca %"github.com/goplus/llgo/internal/runtime.Slice", align 8
|
|
|
|
|
%33 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, i32 0, i32 0
|
|
|
|
|
store ptr %29, ptr %33, align 8
|
|
|
|
|
%34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, i32 0, i32 1
|
|
|
|
|
store i64 2, ptr %34, align 4
|
|
|
|
|
%35 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, i32 0, i32 2
|
|
|
|
|
store i64 2, ptr %35, align 4
|
|
|
|
|
%36 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %32, align 8
|
|
|
|
|
%37 = call { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice" %36)
|
|
|
|
|
%38 = extractvalue { i64, i1 } %37, 0
|
|
|
|
|
%39 = extractvalue { i64, i1 } %37, 1
|
|
|
|
|
%40 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %28, 1
|
|
|
|
|
%41 = load {}, ptr %40, align 1
|
|
|
|
|
%42 = alloca { i64, i1, {} }, align 8
|
|
|
|
|
%43 = getelementptr inbounds { i64, i1, {} }, ptr %42, i32 0, i32 0
|
|
|
|
|
store i64 %38, ptr %43, align 4
|
|
|
|
|
%44 = getelementptr inbounds { i64, i1, {} }, ptr %42, i32 0, i32 1
|
|
|
|
|
store i1 %39, ptr %44, align 1
|
|
|
|
|
%45 = getelementptr inbounds { i64, i1, {} }, ptr %42, i32 0, i32 2
|
|
|
|
|
store {} %41, ptr %45, align 1
|
|
|
|
|
%46 = load { i64, i1, {} }, ptr %42, align 4
|
|
|
|
|
%47 = extractvalue { i64, i1, {} } %46, 0
|
|
|
|
|
%48 = icmp eq i64 %47, 0
|
|
|
|
|
br i1 %48, label %_llgo_2, label %_llgo_3
|
|
|
|
|
|
|
|
|
|
_llgo_1: ; preds = %_llgo_4, %_llgo_2
|
|
|
|
|
ret void
|
|
|
|
|
|
|
|
|
|
_llgo_2: ; preds = %_llgo_0
|
|
|
|
|
%52 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%53 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %52, i32 0, i32 0
|
|
|
|
|
store ptr @5, ptr %53, align 8
|
|
|
|
|
%54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %52, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %54, align 4
|
|
|
|
|
%55 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %52, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %55)
|
|
|
|
|
%49 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %49, i32 0, i32 0
|
|
|
|
|
store ptr @5, ptr %50, align 8
|
|
|
|
|
%51 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %49, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %51, align 4
|
|
|
|
|
%52 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %49, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %52)
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
br label %_llgo_1
|
|
|
|
|
|
|
|
|
|
_llgo_3: ; preds = %_llgo_0
|
|
|
|
|
%56 = icmp eq i64 %50, 1
|
|
|
|
|
br i1 %56, label %_llgo_4, label %_llgo_5
|
|
|
|
|
%53 = icmp eq i64 %47, 1
|
|
|
|
|
br i1 %53, label %_llgo_4, label %_llgo_5
|
|
|
|
|
|
|
|
|
|
_llgo_4: ; preds = %_llgo_3
|
|
|
|
|
%57 = extractvalue { i64, i1, {} } %49, 2
|
|
|
|
|
%58 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%59 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %58, i32 0, i32 0
|
|
|
|
|
store ptr @6, ptr %59, align 8
|
|
|
|
|
%60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %58, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %60, align 4
|
|
|
|
|
%61 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %58, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %61)
|
|
|
|
|
%54 = extractvalue { i64, i1, {} } %46, 2
|
|
|
|
|
%55 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%56 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %55, i32 0, i32 0
|
|
|
|
|
store ptr @6, ptr %56, align 8
|
|
|
|
|
%57 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %55, i32 0, i32 1
|
|
|
|
|
store i64 4, ptr %57, align 4
|
|
|
|
|
%58 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %55, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %58)
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
|
|
|
|
br label %_llgo_1
|
|
|
|
|
|
|
|
|
|
_llgo_5: ; preds = %_llgo_3
|
|
|
|
|
%62 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%63 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %62, i32 0, i32 0
|
|
|
|
|
store ptr @3, ptr %63, align 8
|
|
|
|
|
%64 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %62, i32 0, i32 1
|
|
|
|
|
store i64 31, ptr %64, align 4
|
|
|
|
|
%65 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %62, align 8
|
|
|
|
|
%66 = load ptr, ptr @_llgo_string, align 8
|
|
|
|
|
%67 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.String" %65, ptr %67, align 8
|
|
|
|
|
%68 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
|
|
|
%69 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i32 0, i32 0
|
|
|
|
|
store ptr %66, ptr %69, align 8
|
|
|
|
|
%70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, i32 0, i32 1
|
|
|
|
|
store ptr %67, ptr %70, align 8
|
|
|
|
|
%71 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %68, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %71)
|
|
|
|
|
%59 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
|
|
|
|
|
%60 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %59, i32 0, i32 0
|
|
|
|
|
store ptr @3, ptr %60, align 8
|
|
|
|
|
%61 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %59, i32 0, i32 1
|
|
|
|
|
store i64 31, ptr %61, align 4
|
|
|
|
|
%62 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %59, align 8
|
|
|
|
|
%63 = load ptr, ptr @_llgo_string, align 8
|
|
|
|
|
%64 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
|
|
|
|
store %"github.com/goplus/llgo/internal/runtime.String" %62, ptr %64, align 8
|
|
|
|
|
%65 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
|
|
|
%66 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, i32 0, i32 0
|
|
|
|
|
store ptr %63, ptr %66, align 8
|
|
|
|
|
%67 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, i32 0, i32 1
|
|
|
|
|
store ptr %64, ptr %67, align 8
|
|
|
|
|
%68 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, align 8
|
|
|
|
|
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %68)
|
|
|
|
|
unreachable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -355,7 +355,8 @@ _llgo_0:
|
|
|
|
|
|
|
|
|
|
declare i1 @"github.com/goplus/llgo/internal/runtime.ChanSend"(ptr, ptr, i64)
|
|
|
|
|
|
|
|
|
|
declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64)
|
|
|
|
|
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
|
|
|
|
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
|
|
|
|
|
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
|
|
|
|
|
|
|
|
|
@@ -383,3 +384,5 @@ declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
|
|
|
|
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
|
|
|
|
|
|
|
|
|
declare i1 @"github.com/goplus/llgo/internal/runtime.ChanRecv"(ptr, ptr, i64)
|
|
|
|
|
|
|
|
|
|
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
|
|
|
|
|