Format types in SemIR using the formatting for their instruction. (#4035)

Don't use the pretty-printed type name, because that's intended for
diagnostics, not for a theoretically machine-readable format like SemIR.

Types are always constants, so omit the leading `constant.` on the type
instruction name.
This commit is contained in:
Richard Smith
2024-06-06 15:12:48 +00:00
committed by GitHub
parent 9a11e977b3
commit 1c07f959a8
520 changed files with 12043 additions and 12040 deletions
+11 -11
View File
@@ -17,14 +17,14 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = fn_type @Add [template]
// CHECK:STDOUT: %Add: <type of Add> = struct_value () [template]
// CHECK:STDOUT: %Add: %Add.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.4: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -34,10 +34,10 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: .arr = %arr
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Add.decl: <type of Add> = fn_decl @Add [template = constants.%Add] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -53,17 +53,17 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_32.loc11_27, %.loc11_27.1 [template = i32]
// CHECK:STDOUT: @Add.%return: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.4: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Add.ref: <type of Add> = name_ref Add, %Add.decl [template = constants.%Add]
// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add]
// CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_23: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.4]
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32.loc13, %.loc13_11.1 [template = i32]
// CHECK:STDOUT: %.loc13_25: type = array_type %int.sadd, i32 [template = constants.%.5]
// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr
// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var
// CHECK:STDOUT: %arr.var: ref %.5 = var arr
// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -15,9 +15,9 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = fn_type @Add [template]
// CHECK:STDOUT: %Add: <type of Add> = struct_value () [template]
// CHECK:STDOUT: %Add: %Add.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -26,10 +26,10 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: .Add = %Add.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Add.decl: <type of Add> = fn_decl @Add [template = constants.%Add] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Add.decl: %Add.type = fn_decl @Add [template = constants.%Add] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -42,13 +42,13 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: <type of B> = struct_value () [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: <type of C> = struct_value () [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -59,10 +59,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: .C = %C.decl.loc31
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %A.decl.loc11: <type of A> = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %A.decl.loc11: %A.type = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32]
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11_9, %.loc11_9.1 [template = i32]
@@ -78,10 +78,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %.loc11_25.2: type = converted %int.make_type_32.loc11_25, %.loc11_25.1 [template = i32]
// CHECK:STDOUT: %return.var.loc11: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.4: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.5: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.6: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %A.decl.loc19: <type of A> = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %int.make_type_32.loc19_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc19_9.1: type = value_of_initializer %int.make_type_32.loc19_9 [template = i32]
// CHECK:STDOUT: %.loc19_9.2: type = converted %int.make_type_32.loc19_9, %.loc19_9.1 [template = i32]
@@ -97,10 +97,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %.loc19_25.2: type = converted %int.make_type_32.loc19_25, %.loc19_25.1 [template = i32]
// CHECK:STDOUT: @A.%return: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.7: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.8: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.9: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl.loc21: <type of B> = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %import_ref.7: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.8: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.9: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %int.make_type_32.loc21_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc21_9.1: type = value_of_initializer %int.make_type_32.loc21_9 [template = i32]
// CHECK:STDOUT: %.loc21_9.2: type = converted %int.make_type_32.loc21_9, %.loc21_9.1 [template = i32]
@@ -116,10 +116,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %.loc21_25.2: type = converted %int.make_type_32.loc21_25, %.loc21_25.1 [template = i32]
// CHECK:STDOUT: %return.var.loc21: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.10: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.11: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.12: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl.loc29: <type of B> = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %import_ref.10: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.11: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.12: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %int.make_type_32.loc29_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc29_9.1: type = value_of_initializer %int.make_type_32.loc29_9 [template = i32]
// CHECK:STDOUT: %.loc29_9.2: type = converted %int.make_type_32.loc29_9, %.loc29_9.1 [template = i32]
@@ -135,10 +135,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %.loc29_25.2: type = converted %int.make_type_32.loc29_25, %.loc29_25.1 [template = i32]
// CHECK:STDOUT: @B.%return: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.13: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.14: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.15: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %C.decl.loc31: <type of C> = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %import_ref.13: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.14: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.15: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %C.decl.loc31: %C.type = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %int.make_type_32.loc31_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc31_9.1: type = value_of_initializer %int.make_type_32.loc31_9 [template = i32]
// CHECK:STDOUT: %.loc31_9.2: type = converted %int.make_type_32.loc31_9, %.loc31_9.1 [template = i32]
@@ -154,10 +154,10 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT: %.loc31_25.2: type = converted %int.make_type_32.loc31_25, %.loc31_25.1 [template = i32]
// CHECK:STDOUT: %return.var.loc31: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.16: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.17: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.18: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %C.decl.loc38: <type of C> = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %import_ref.16: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.17: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.18: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %C.decl.loc38: %C.type = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %int.make_type_32.loc38_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc38_9.1: type = value_of_initializer %int.make_type_32.loc38_9 [template = i32]
// CHECK:STDOUT: %.loc38_9.2: type = converted %int.make_type_32.loc38_9, %.loc38_9.1 [template = i32]
@@ -18,7 +18,7 @@ fn UnknownBuiltin() = "unknown.builtin.name";
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %UnknownBuiltin.type: type = fn_type @UnknownBuiltin [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %UnknownBuiltin: <type of UnknownBuiltin> = struct_value () [template]
// CHECK:STDOUT: %UnknownBuiltin: %UnknownBuiltin.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -27,7 +27,7 @@ fn UnknownBuiltin() = "unknown.builtin.name";
// CHECK:STDOUT: .UnknownBuiltin = %UnknownBuiltin.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %UnknownBuiltin.decl: <type of UnknownBuiltin> = fn_decl @UnknownBuiltin [template = constants.%UnknownBuiltin] {}
// CHECK:STDOUT: %UnknownBuiltin.decl: %UnknownBuiltin.type = fn_decl @UnknownBuiltin [template = constants.%UnknownBuiltin] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @UnknownBuiltin();
+30 -30
View File
@@ -22,23 +22,23 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = interface_type @I [template]
// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic]
// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic]
// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %F.1: <type of F> = struct_value () [template]
// CHECK:STDOUT: %.3: type = assoc_entity_type @I, <type of F> [template]
// CHECK:STDOUT: %.4: <associated <type of F> in I> = assoc_entity element0, @I.%F.decl [template]
// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template]
// CHECK:STDOUT: %.3: type = assoc_entity_type @I, %F.type.1 [template]
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
// CHECK:STDOUT: %F.2: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
// CHECK:STDOUT: %.5: <witness> = interface_witness (%F.2) [template]
// CHECK:STDOUT: %.6: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.7: <bound method> = bound_method %.6, %F.2 [template]
// CHECK:STDOUT: %.8: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.9: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.10: type = array_type %.9, i32 [template]
// CHECK:STDOUT: %.11: type = ptr_type [i32; 3] [template]
// CHECK:STDOUT: %.11: type = ptr_type %.10 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -49,51 +49,51 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%.1] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: impl_decl @impl {
// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc15_6.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32]
// CHECK:STDOUT: %.loc15_6.2: type = converted %int.make_type_32.loc15, %.loc15_6.1 [template = i32]
// CHECK:STDOUT: %I.ref.loc15: type = name_ref I, %I.decl [template = constants.%.1]
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.4: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.5: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %int.make_type_32.loc19: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.6]
// CHECK:STDOUT: %I.ref.loc19: type = name_ref I, %I.decl [template = constants.%.1]
// CHECK:STDOUT: %F.ref: <associated <type of F> in I> = name_ref F, @I.%.loc12_40 [template = constants.%.4]
// CHECK:STDOUT: %.1: <type of F> = interface_witness_access @impl.%.1, element0 [template = constants.%F.2]
// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12_40 [template = constants.%.4]
// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2]
// CHECK:STDOUT: %.loc19_17: <bound method> = bound_method %.loc19_16, %.1 [template = constants.%.7]
// CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.8]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17(%.loc19_16, %.loc19_24) [template = constants.%.9]
// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32]
// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32]
// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.10]
// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr
// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var
// CHECK:STDOUT: %arr.var: ref %.10 = var arr
// CHECK:STDOUT: %arr: ref %.10 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
// CHECK:STDOUT: %Self: I = bind_symbolic_name Self 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F.1 [template = constants.%F.1] {
// CHECK:STDOUT: %Self.ref.loc12_14: I = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %.1 = bind_symbolic_name Self 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {
// CHECK:STDOUT: %Self.ref.loc12_14: %.1 = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = constants.%Self]
// CHECK:STDOUT: %self.loc12_8.1: Self = param self
// CHECK:STDOUT: %self.loc12_8.2: Self = bind_name self, %self.loc12_8.1
// CHECK:STDOUT: %Self.ref.loc12_27: I = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %self.loc12_8.1: %Self = param self
// CHECK:STDOUT: %self.loc12_8.2: %Self = bind_name self, %self.loc12_8.1
// CHECK:STDOUT: %Self.ref.loc12_27: %.1 = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc12_27.1: type = facet_type_access %Self.ref.loc12_27 [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = constants.%Self]
// CHECK:STDOUT: %other.loc12_20.1: Self = param other
// CHECK:STDOUT: %other.loc12_20.2: Self = bind_name other, %other.loc12_20.1
// CHECK:STDOUT: %Self.ref.loc12_36: I = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %other.loc12_20.1: %Self = param other
// CHECK:STDOUT: %other.loc12_20.2: %Self = bind_name other, %other.loc12_20.1
// CHECK:STDOUT: %Self.ref.loc12_36: %.1 = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc12_36.1: type = facet_type_access %Self.ref.loc12_36 [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = constants.%Self]
// CHECK:STDOUT: %return.var: ref Self = var <return slot>
// CHECK:STDOUT: %return.var: ref %Self = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc12_40: <associated <type of F> in I> = assoc_entity element0, %F.decl [template = constants.%.4]
// CHECK:STDOUT: %.loc12_40: %.3 = assoc_entity element0, %F.decl [template = constants.%.4]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -101,8 +101,8 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: witness = (%F.decl)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl: i32 as I {
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F.2 [template = constants.%F.2] {
// CHECK:STDOUT: impl @impl: i32 as %.1 {
// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {
// CHECK:STDOUT: %int.make_type_32.loc16_14: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc16_14.1: type = value_of_initializer %int.make_type_32.loc16_14 [template = i32]
// CHECK:STDOUT: %.loc16_14.2: type = converted %int.make_type_32.loc16_14, %.loc16_14.1 [template = i32]
@@ -125,7 +125,7 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: witness = %.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F.1[@I.%self.loc12_8.2: Self](@I.%other.loc12_20.2: Self) -> Self;
// CHECK:STDOUT: fn @F.1[@I.%self.loc12_8.2: %Self](@I.%other.loc12_20.2: %Self) -> %Self;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
@@ -35,13 +35,13 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = interface_type @Add [template]
// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic]
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic]
// CHECK:STDOUT: %Op.type: type = fn_type @Op [template]
// CHECK:STDOUT: %Op: <type of Op> = struct_value () [template]
// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, <type of Op> [template]
// CHECK:STDOUT: %.4: <associated <type of Op> in Add> = assoc_entity element0, @Add.%Op.decl [template]
// CHECK:STDOUT: %Op: %Op.type = struct_value () [template]
// CHECK:STDOUT: %.3: type = assoc_entity_type @Add, %Op.type [template]
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @Add.%Op.decl [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -49,31 +49,31 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: .Int32 = %Int32.decl
// CHECK:STDOUT: .Add = %Add.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Int32.decl: <type of Int32> = fn_decl @Int32 [template = constants.%Int32] {
// CHECK:STDOUT: %Int32.decl: %Int32.type = fn_decl @Int32 [template = constants.%Int32] {
// CHECK:STDOUT: @Int32.%return: ref type = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %Add.decl: type = interface_decl @Add [template = constants.%.2] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Add {
// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Op.decl: <type of Op> = fn_decl @Op [template = constants.%Op] {
// CHECK:STDOUT: %Self.ref.loc7_15: Add = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic = constants.%Self]
// CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] {
// CHECK:STDOUT: %Self.ref.loc7_15: %.2 = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc7_15.1: type = facet_type_access %Self.ref.loc7_15 [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc7_15.2: type = converted %Self.ref.loc7_15, %.loc7_15.1 [symbolic = constants.%Self]
// CHECK:STDOUT: %self.loc7_9.1: Self = param self
// CHECK:STDOUT: %self.loc7_9.2: Self = bind_name self, %self.loc7_9.1
// CHECK:STDOUT: %Self.ref.loc7_28: Add = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %self.loc7_9.1: %Self = param self
// CHECK:STDOUT: %self.loc7_9.2: %Self = bind_name self, %self.loc7_9.1
// CHECK:STDOUT: %Self.ref.loc7_28: %.2 = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc7_28.1: type = facet_type_access %Self.ref.loc7_28 [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc7_28.2: type = converted %Self.ref.loc7_28, %.loc7_28.1 [symbolic = constants.%Self]
// CHECK:STDOUT: %other.loc7_21.1: Self = param other
// CHECK:STDOUT: %other.loc7_21.2: Self = bind_name other, %other.loc7_21.1
// CHECK:STDOUT: %Self.ref.loc7_37: Add = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %other.loc7_21.1: %Self = param other
// CHECK:STDOUT: %other.loc7_21.2: %Self = bind_name other, %other.loc7_21.1
// CHECK:STDOUT: %Self.ref.loc7_37: %.2 = name_ref Self, %Self [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc7_37.1: type = facet_type_access %Self.ref.loc7_37 [symbolic = constants.%Self]
// CHECK:STDOUT: %.loc7_37.2: type = converted %Self.ref.loc7_37, %.loc7_37.1 [symbolic = constants.%Self]
// CHECK:STDOUT: %return.var: ref Self = var <return slot>
// CHECK:STDOUT: %return.var: ref %Self = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc7_41: <associated <type of Op> in Add> = assoc_entity element0, %Op.decl [template = constants.%.4]
// CHECK:STDOUT: %.loc7_41: %.3 = assoc_entity element0, %Op.decl [template = constants.%.4]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -83,35 +83,35 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Op[@Add.%self.loc7_9.2: Self](@Add.%other.loc7_21.2: Self) -> Self;
// CHECK:STDOUT: fn @Op[@Add.%self.loc7_9.2: %Self](@Add.%other.loc7_21.2: %Self) -> %Self;
// CHECK:STDOUT:
// CHECK:STDOUT: --- user.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = interface_type @Add [template]
// CHECK:STDOUT: %Self: Add = bind_symbolic_name Self 0 [symbolic]
// CHECK:STDOUT: %Self: %.2 = bind_symbolic_name Self 0 [symbolic]
// CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template]
// CHECK:STDOUT: %Op.1: <type of Op> = struct_value () [template]
// CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template]
// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template]
// CHECK:STDOUT: %Op.2: <type of Op> = struct_value () [template]
// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template]
// CHECK:STDOUT: %.3: <witness> = interface_witness (%Op.1) [template]
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.6: type = assoc_entity_type @Add, <type of Op> [template]
// CHECK:STDOUT: %.7: <associated <type of Op> in Add> = assoc_entity element0, file.%import_ref.8 [template]
// CHECK:STDOUT: %.6: type = assoc_entity_type @Add, %Op.type.2 [template]
// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, file.%import_ref.8 [template]
// CHECK:STDOUT: %.8: <bound method> = bound_method %.4, %Op.1 [template]
// CHECK:STDOUT: %.9: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.10: type = array_type %.9, i32 [template]
// CHECK:STDOUT: %.11: type = ptr_type [i32; 3] [template]
// CHECK:STDOUT: %.11: type = ptr_type %.10 [template]
// CHECK:STDOUT: %.12: i32 = int_literal 4 [template]
// CHECK:STDOUT: %.13: <bound method> = bound_method %.9, %Op.1 [template]
// CHECK:STDOUT: %.14: i32 = int_literal 7 [template]
// CHECK:STDOUT: %.15: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.16: i32 = int_literal 0 [template]
// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.9, %.12, %.14) [template]
// CHECK:STDOUT: %array: %.10 = tuple_value (%.9, %.12, %.14) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -120,11 +120,11 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: .arr = %arr
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir1, inst+2, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir1, inst+2, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: type = import_ref ir1, inst+6, loaded [template = constants.%.2]
// CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+8, unloaded
// CHECK:STDOUT: %import_ref.4: <associated <type of Op> in Add> = import_ref ir1, inst+28, loaded [template = constants.%.7]
// CHECK:STDOUT: %import_ref.5: <type of Op> = import_ref ir1, inst+24, loaded [template = constants.%Op.2]
// CHECK:STDOUT: %import_ref.4: %.6 = import_ref ir1, inst+28, loaded [template = constants.%.7]
// CHECK:STDOUT: %import_ref.5: %Op.type.2 = import_ref ir1, inst+24, loaded [template = constants.%Op.2]
// CHECK:STDOUT: impl_decl @impl {
// CHECK:STDOUT: %int.make_type_32.loc6: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc6_6.1: type = value_of_initializer %int.make_type_32.loc6 [template = i32]
@@ -132,20 +132,20 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, %Core [template = %Core]
// CHECK:STDOUT: %Add.ref: type = name_ref Add, %import_ref.2 [template = constants.%.2]
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.6: <type of Int32> = import_ref ir1, inst+2, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir1, inst+2, loaded [template = constants.%Int32]
// CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.5]
// CHECK:STDOUT: %import_ref.7: type = import_ref ir1, inst+6, loaded [template = constants.%.2]
// CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+24, unloaded
// CHECK:STDOUT: %.1: <type of Op> = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_18: <bound method> = bound_method %.loc10_16, %.1 [template = constants.%.8]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18(%.loc10_16, %.loc10_20) [template = constants.%.9]
// CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32]
// CHECK:STDOUT: %.loc10_11.2: type = converted %int.make_type_32.loc10, %.loc10_11.1 [template = i32]
// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.10]
// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr
// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var
// CHECK:STDOUT: %arr.var: ref %.10 = var arr
// CHECK:STDOUT: %arr: ref %.10 = bind_name arr, %arr.var
// CHECK:STDOUT: %import_ref.9: type = import_ref ir1, inst+6, loaded [template = constants.%.2]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -156,8 +156,8 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: witness = (file.%import_ref.5)
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @impl: i32 as Add {
// CHECK:STDOUT: %Op.decl: <type of Op> = fn_decl @Op.1 [template = constants.%Op.1] {
// CHECK:STDOUT: impl @impl: i32 as %.2 {
// CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] {
// CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, i32 [template = i32]
// CHECK:STDOUT: %self.loc7_9.1: i32 = param self
// CHECK:STDOUT: %self.loc7_9.2: i32 = bind_name self, %self.loc7_9.1
@@ -178,7 +178,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Op.1[@impl.%self.loc7_9.2: i32](@impl.%other.loc7_21.2: i32) -> i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Op.2[%self: Self](%other: Self) -> Self;
// CHECK:STDOUT: fn @Op.2[%self: %Self](%other: %Self) -> %Self;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
@@ -186,10 +186,10 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.12]
// CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.9]
// CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.12]
// CHECK:STDOUT: %.1: <type of Op> = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_34: <bound method> = bound_method %.loc10_32, %.1 [template = constants.%.13]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34(%.loc10_32, %.loc10_36) [template = constants.%.14]
// CHECK:STDOUT: %.loc10_37.1: (i32, i32, i32) = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd)
// CHECK:STDOUT: %.loc10_37.1: %.15 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd)
// CHECK:STDOUT: %.loc10_37.2: i32 = int_literal 0 [template = constants.%.16]
// CHECK:STDOUT: %.loc10_37.3: ref i32 = array_index file.%arr.var, %.loc10_37.2
// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.9]
@@ -199,8 +199,8 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %.loc10_37.8: i32 = int_literal 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc10_37.9: ref i32 = array_index file.%arr.var, %.loc10_37.8
// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.14]
// CHECK:STDOUT: %.loc10_37.11: init [i32; 3] = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc10_38: init [i32; 3] = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array]
// CHECK:STDOUT: %.loc10_37.11: init %.10 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc10_38: init %.10 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%arr.var, %.loc10_38
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -26,9 +26,9 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template]
// CHECK:STDOUT: %TestAdd: <type of TestAdd> = struct_value () [template]
// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -36,10 +36,10 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: .Int32 = %Int32.decl
// CHECK:STDOUT: .TestAdd = %TestAdd.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Int32.decl: <type of Int32> = fn_decl @Int32 [template = constants.%Int32] {
// CHECK:STDOUT: %Int32.decl: %Int32.type = fn_decl @Int32 [template = constants.%Int32] {
// CHECK:STDOUT: @Int32.%return: ref type = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %TestAdd.decl: <type of TestAdd> = fn_decl @TestAdd [template = constants.%TestAdd] {
// CHECK:STDOUT: %TestAdd.decl: %TestAdd.type = fn_decl @TestAdd [template = constants.%TestAdd] {
// CHECK:STDOUT: %int.make_type_32.loc5_15: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_32.loc5_15 [template = i32]
// CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_32.loc5_15, %.loc5_15.1 [template = i32]
@@ -66,17 +66,17 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template]
// CHECK:STDOUT: %TestAdd: <type of TestAdd> = struct_value () [template]
// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.4: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type [i32; 3] [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_literal 0 [template]
// CHECK:STDOUT: %array: [i32; 3] = tuple_value (%.2, %.3, %.4) [template]
// CHECK:STDOUT: %array: %.5 = tuple_value (%.2, %.3, %.4) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -85,19 +85,19 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: .arr = %arr
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir1, inst+2, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir1, inst+2, loaded [template = constants.%Int32]
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, %Core [template = %Core]
// CHECK:STDOUT: %import_ref.2: <type of TestAdd> = import_ref ir1, inst+20, loaded [template = constants.%TestAdd]
// CHECK:STDOUT: %TestAdd.ref: <type of TestAdd> = name_ref TestAdd, %import_ref.2 [template = constants.%TestAdd]
// CHECK:STDOUT: %import_ref.2: %TestAdd.type = import_ref ir1, inst+20, loaded [template = constants.%TestAdd]
// CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, %import_ref.2 [template = constants.%TestAdd]
// CHECK:STDOUT: %.loc4_29: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_32: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.4]
// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32]
// CHECK:STDOUT: %.loc4_34: type = array_type %int.sadd, i32 [template = constants.%.5]
// CHECK:STDOUT: %arr.var: ref [i32; 3] = var arr
// CHECK:STDOUT: %arr: ref [i32; 3] = bind_name arr, %arr.var
// CHECK:STDOUT: %arr.var: ref %.5 = var arr
// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -109,7 +109,7 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: %.loc4_39: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_42: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_45: i32 = int_literal 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc4_46.1: (i32, i32, i32) = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45)
// CHECK:STDOUT: %.loc4_46.1: %.7 = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45)
// CHECK:STDOUT: %.loc4_46.2: i32 = int_literal 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc4_46.3: ref i32 = array_index file.%arr.var, %.loc4_46.2
// CHECK:STDOUT: %.loc4_46.4: init i32 = initialize_from %.loc4_39 to %.loc4_46.3 [template = constants.%.2]
@@ -119,8 +119,8 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: %.loc4_46.8: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.9: ref i32 = array_index file.%arr.var, %.loc4_46.8
// CHECK:STDOUT: %.loc4_46.10: init i32 = initialize_from %.loc4_45 to %.loc4_46.9 [template = constants.%.4]
// CHECK:STDOUT: %.loc4_46.11: init [i32; 3] = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc4_47: init [i32; 3] = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array]
// CHECK:STDOUT: %.loc4_46.11: init %.5 = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc4_47: init %.5 = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%arr.var, %.loc4_47
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -20,9 +20,9 @@ fn Run() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Run: <type of Run> = struct_value () [template]
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = ptr_type String [template]
// CHECK:STDOUT: %.3: String = string_literal "hello" [template]
// CHECK:STDOUT: }
@@ -33,8 +33,8 @@ fn Run() {
// CHECK:STDOUT: .Run = %Run.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Run.decl: <type of Run> = fn_decl @Run [template = constants.%Run] {}
// CHECK:STDOUT: %import_ref: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {}
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
@@ -69,15 +69,15 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Run0.type: type = fn_type @Run0 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Run0: <type of Run0> = struct_value () [template]
// CHECK:STDOUT: %Run0: %Run0.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Run1.type: type = fn_type @Run1 [template]
// CHECK:STDOUT: %Run1: <type of Run1> = struct_value () [template]
// CHECK:STDOUT: %Run1: %Run1.type = struct_value () [template]
// CHECK:STDOUT: %Run2.type: type = fn_type @Run2 [template]
// CHECK:STDOUT: %Run2: <type of Run2> = struct_value () [template]
// CHECK:STDOUT: %Run2: %Run2.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 0 [template]
// CHECK:STDOUT: }
@@ -91,18 +91,18 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Run0.decl: <type of Run0> = fn_decl @Run0 [template = constants.%Run0] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Run1.decl: <type of Run1> = fn_decl @Run1 [template = constants.%Run1] {
// CHECK:STDOUT: %Run0.decl: %Run0.type = fn_decl @Run0 [template = constants.%Run0] {}
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Run1.decl: %Run1.type = fn_decl @Run1 [template = constants.%Run1] {
// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc12_12.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32]
// CHECK:STDOUT: %.loc12_12.2: type = converted %int.make_type_32.loc12, %.loc12_12.1 [template = i32]
// CHECK:STDOUT: %a.loc12_9.1: i32 = param a
// CHECK:STDOUT: @Run1.%a: i32 = bind_name a, %a.loc12_9.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Run2.decl: <type of Run2> = fn_decl @Run2 [template = constants.%Run2] {
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Run2.decl: %Run2.type = fn_decl @Run2 [template = constants.%Run2] {
// CHECK:STDOUT: %int.make_type_32.loc13_12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %int.make_type_32.loc13_12 [template = i32]
// CHECK:STDOUT: %.loc13_12.2: type = converted %int.make_type_32.loc13_12, %.loc13_12.1 [template = i32]
@@ -114,7 +114,7 @@ fn Main() {
// CHECK:STDOUT: %b.loc13_17.1: i32 = param b
// CHECK:STDOUT: @Run2.%b: i32 = bind_name b, %b.loc13_17.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run0() {
@@ -136,24 +136,24 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Run0.ref.loc23: <type of Run0> = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
// CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
// CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Run0.call.loc23: init () = call %Run0.ref.loc23(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run0.ref.loc31: <type of Run0> = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
// CHECK:STDOUT: %Run0.call.loc23: init %.1 = call %Run0.ref.loc23(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
// CHECK:STDOUT: %.loc31_8: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc31_11: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Run0.call.loc31: init () = call %Run0.ref.loc31(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run1.ref.loc40: <type of Run1> = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
// CHECK:STDOUT: %Run1.call.loc40: init () = call %Run1.ref.loc40(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run1.ref.loc48: <type of Run1> = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
// CHECK:STDOUT: %Run0.call.loc31: init %.1 = call %Run0.ref.loc31(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
// CHECK:STDOUT: %Run1.call.loc40: init %.1 = call %Run1.ref.loc40(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
// CHECK:STDOUT: %.loc48_8: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc48_11: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Run1.call.loc48: init () = call %Run1.ref.loc48(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run2.ref.loc57: <type of Run2> = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
// CHECK:STDOUT: %Run2.call.loc57: init () = call %Run2.ref.loc57(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run2.ref.loc64: <type of Run2> = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
// CHECK:STDOUT: %Run1.call.loc48: init %.1 = call %Run1.ref.loc48(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
// CHECK:STDOUT: %Run2.call.loc57: init %.1 = call %Run2.ref.loc57(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
// CHECK:STDOUT: %.loc64: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %Run2.call.loc64: init () = call %Run2.ref.loc64(<invalid>) [template = <error>]
// CHECK:STDOUT: %Run2.call.loc64: init %.1 = call %Run2.ref.loc64(<invalid>) [template = <error>]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -25,11 +25,11 @@ fn F() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.2: f64 = float_literal 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -40,15 +40,15 @@ fn F() {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32, %.loc11_9.1 [template = i32]
// CHECK:STDOUT: %a.loc11_6.1: i32 = param a
// CHECK:STDOUT: @G.%a: i32 = bind_name a, %a.loc11_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -60,9 +60,9 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %G.ref: <type of G> = name_ref G, file.%G.decl [template = constants.%G]
// CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G]
// CHECK:STDOUT: %.loc20: f64 = float_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %G.call: init () = call %G.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: %G.call: init %.1 = call %G.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -23,14 +23,14 @@ fn Run() {
// CHECK:STDOUT: %.1: i32 = int_literal 64 [template]
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %Float: <type of Float> = struct_value () [template]
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %.3: f64 = float_literal 1 [template]
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
// CHECK:STDOUT: %Run: <type of Run> = struct_value () [template]
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -40,16 +40,16 @@ fn Run() {
// CHECK:STDOUT: .Run = %Run.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Float> = import_ref ir3, inst+31, loaded [template = constants.%Float]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref ir3, inst+31, loaded [template = constants.%Float]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1]
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64]
// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64]
// CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64]
// CHECK:STDOUT: @Foo.%return: ref f64 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %Run.decl: <type of Run> = fn_decl @Run [template = constants.%Run] {}
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {}
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Float(%size: i32) -> type = "float.make_type";
@@ -67,7 +67,7 @@ fn Run() {
// CHECK:STDOUT: %.loc17_10.2: type = converted %int.make_type_32, %.loc17_10.1 [template = i32]
// CHECK:STDOUT: %x.var: ref i32 = var x
// CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var
// CHECK:STDOUT: %Foo.ref: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.call: init f64 = call %Foo.ref()
// CHECK:STDOUT: assign %x.var, <error>
// CHECK:STDOUT: return
+9 -9
View File
@@ -21,11 +21,11 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template]
// CHECK:STDOUT: %Echo: <type of Echo> = struct_value () [template]
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -36,9 +36,9 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Echo.decl: <type of Echo> = fn_decl @Echo [template = constants.%Echo] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] {
// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_12.1: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32]
// CHECK:STDOUT: %.loc11_12.2: type = converted %int.make_type_32.loc11_12, %.loc11_12.1 [template = i32]
@@ -49,8 +49,8 @@ fn Main() {
// CHECK:STDOUT: %.loc11_20.2: type = converted %int.make_type_32.loc11_20, %.loc11_20.1 [template = i32]
// CHECK:STDOUT: @Echo.%return: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -68,7 +68,7 @@ fn Main() {
// CHECK:STDOUT: %.loc16_10.2: type = converted %int.make_type_32, %.loc16_10.1 [template = i32]
// CHECK:STDOUT: %b.var: ref i32 = var b
// CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
// CHECK:STDOUT: %Echo.ref: <type of Echo> = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %.loc16_21: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Echo.call: init i32 = call %Echo.ref(%.loc16_21)
// CHECK:STDOUT: assign %b.var, %Echo.call
+18 -18
View File
@@ -21,15 +21,15 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.4) [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
// CHECK:STDOUT: %.5: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.6: i32 = int_literal 6 [template]
// CHECK:STDOUT: }
@@ -41,9 +41,9 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -55,8 +55,8 @@ fn Main() {
// CHECK:STDOUT: %b.loc11_16.1: i32 = param b
// CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -69,24 +69,24 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_15.1: (type,) = tuple_literal (%int.make_type_32)
// CHECK:STDOUT: %.loc14_15.1: %.2 = tuple_literal (%int.make_type_32)
// CHECK:STDOUT: %.loc14_15.2: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc14_15.3: type = converted %int.make_type_32, %.loc14_15.2 [template = i32]
// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %x.var: ref (i32,) = var x
// CHECK:STDOUT: %x: ref (i32,) = bind_name x, %x.var
// CHECK:STDOUT: %x.var: ref %.3 = var x
// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var
// CHECK:STDOUT: %.loc14_20: i32 = int_literal 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_22.1: (i32,) = tuple_literal (%.loc14_20)
// CHECK:STDOUT: %.loc14_22.2: init (i32,) = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_23: init (i32,) = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_22.1: %.3 = tuple_literal (%.loc14_20)
// CHECK:STDOUT: %.loc14_22.2: init %.3 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_23: init %.3 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple]
// CHECK:STDOUT: assign %x.var, %.loc14_23
// CHECK:STDOUT: %Foo.ref: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %x.ref: ref (i32,) = name_ref x, %x
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, %x
// CHECK:STDOUT: %.loc16_9: i32 = int_literal 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_10.1: ref i32 = tuple_index %x.ref, %.loc16_9
// CHECK:STDOUT: %.loc16_13: i32 = int_literal 6 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_10.2: i32 = bind_value %.loc16_10.1
// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc16_10.2, %.loc16_13)
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc16_10.2, %.loc16_13)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -21,10 +21,10 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %tuple: () = tuple_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -33,32 +33,32 @@ fn Main() {
// CHECK:STDOUT: .B = %B
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %.loc11_12.1: () = tuple_literal ()
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {
// CHECK:STDOUT: %.loc11_12.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc11_12.2: type = converted %.loc11_12.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: @A.%return: ref () = var <return slot>
// CHECK:STDOUT: @A.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.ref: <type of A> = name_ref A, %A.decl [template = constants.%A]
// CHECK:STDOUT: %B: <type of A> = bind_alias B, %A.decl [template = constants.%A]
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A]
// CHECK:STDOUT: %B: %A.type = bind_alias B, %A.decl [template = constants.%A]
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() -> () {
// CHECK:STDOUT: fn @A() -> %.1 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_24: () = tuple_literal ()
// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_25: () = converted %.loc11_24, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_24: %.1 = tuple_literal ()
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_25: %.1 = converted %.loc11_24, %tuple [template = constants.%tuple]
// CHECK:STDOUT: return %.loc11_25
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc16_11.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc16_11.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %b.var: ref () = var b
// CHECK:STDOUT: %b: ref () = bind_name b, %b.var
// CHECK:STDOUT: %B.ref: <type of A> = name_ref B, file.%B [template = constants.%A]
// CHECK:STDOUT: %A.call: init () = call %B.ref()
// CHECK:STDOUT: %b.var: ref %.1 = var b
// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var
// CHECK:STDOUT: %B.ref: %A.type = name_ref B, file.%B [template = constants.%A]
// CHECK:STDOUT: %A.call: init %.1 = call %B.ref()
// CHECK:STDOUT: assign %b.var, %A.call
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -22,10 +22,10 @@ fn Main() {
// CHECK:STDOUT: %.1: type = struct_type {} [template]
// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %Echo: <type of Echo> = struct_value () [template]
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %struct: {} = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %struct: %.1 = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -33,31 +33,31 @@ fn Main() {
// CHECK:STDOUT: .Echo = %Echo.decl
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Echo.decl: <type of Echo> = fn_decl @Echo [template = constants.%Echo] {
// CHECK:STDOUT: %.loc11_13.1: {} = struct_literal ()
// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] {
// CHECK:STDOUT: %.loc11_13.1: %.1 = struct_literal ()
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %a.loc11_9.1: {} = param a
// CHECK:STDOUT: @Echo.%a: {} = bind_name a, %a.loc11_9.1
// CHECK:STDOUT: %.loc11_20.1: {} = struct_literal ()
// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a
// CHECK:STDOUT: @Echo.%a: %.1 = bind_name a, %a.loc11_9.1
// CHECK:STDOUT: %.loc11_20.1: %.1 = struct_literal ()
// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: @Echo.%return: ref {} = var <return slot>
// CHECK:STDOUT: @Echo.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Echo(%a: {}) -> {} {
// CHECK:STDOUT: fn @Echo(%a: %.1) -> %.1 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: {} = name_ref a, %a
// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a
// CHECK:STDOUT: return %a.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Echo.ref: <type of Echo> = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %.loc16_9: {} = struct_literal ()
// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct]
// CHECK:STDOUT: %.loc16_7: {} = converted %.loc16_9, %struct [template = constants.%struct]
// CHECK:STDOUT: %Echo.call: init {} = call %Echo.ref(%.loc16_7)
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %.loc16_9: %.1 = struct_literal ()
// CHECK:STDOUT: %struct: %.1 = struct_value () [template = constants.%struct]
// CHECK:STDOUT: %.loc16_7: %.1 = converted %.loc16_9, %struct [template = constants.%struct]
// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_7)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -21,10 +21,10 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Echo.type: type = fn_type @Echo [template]
// CHECK:STDOUT: %Echo: <type of Echo> = struct_value () [template]
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %tuple: () = tuple_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -32,31 +32,31 @@ fn Main() {
// CHECK:STDOUT: .Echo = %Echo.decl
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Echo.decl: <type of Echo> = fn_decl @Echo [template = constants.%Echo] {
// CHECK:STDOUT: %.loc11_13.1: () = tuple_literal ()
// CHECK:STDOUT: %Echo.decl: %Echo.type = fn_decl @Echo [template = constants.%Echo] {
// CHECK:STDOUT: %.loc11_13.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %a.loc11_9.1: () = param a
// CHECK:STDOUT: @Echo.%a: () = bind_name a, %a.loc11_9.1
// CHECK:STDOUT: %.loc11_20.1: () = tuple_literal ()
// CHECK:STDOUT: %a.loc11_9.1: %.1 = param a
// CHECK:STDOUT: @Echo.%a: %.1 = bind_name a, %a.loc11_9.1
// CHECK:STDOUT: %.loc11_20.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: @Echo.%return: ref () = var <return slot>
// CHECK:STDOUT: @Echo.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Echo(%a: ()) -> () {
// CHECK:STDOUT: fn @Echo(%a: %.1) -> %.1 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %a.ref: () = name_ref a, %a
// CHECK:STDOUT: %a.ref: %.1 = name_ref a, %a
// CHECK:STDOUT: return %a.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Echo.ref: <type of Echo> = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %.loc16_9: () = tuple_literal ()
// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple]
// CHECK:STDOUT: %.loc16_7: () = converted %.loc16_9, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %Echo.call: init () = call %Echo.ref(%.loc16_7)
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %.loc16_9: %.1 = tuple_literal ()
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple]
// CHECK:STDOUT: %.loc16_7: %.1 = converted %.loc16_9, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %Echo.call: init %.1 = call %Echo.ref(%.loc16_7)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -19,9 +19,9 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -29,8 +29,8 @@ fn Main() {
// CHECK:STDOUT: .Foo = %Foo.decl
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() {
@@ -40,8 +40,8 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref()
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -20,9 +20,9 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %MakeImplicitEmptyTuple.type: type = fn_type @MakeImplicitEmptyTuple [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %MakeImplicitEmptyTuple: <type of MakeImplicitEmptyTuple> = struct_value () [template]
// CHECK:STDOUT: %MakeImplicitEmptyTuple: %MakeImplicitEmptyTuple.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -30,8 +30,8 @@ fn Main() {
// CHECK:STDOUT: .MakeImplicitEmptyTuple = %MakeImplicitEmptyTuple.decl
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %MakeImplicitEmptyTuple.decl: <type of MakeImplicitEmptyTuple> = fn_decl @MakeImplicitEmptyTuple [template = constants.%MakeImplicitEmptyTuple] {}
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %MakeImplicitEmptyTuple.decl: %MakeImplicitEmptyTuple.type = fn_decl @MakeImplicitEmptyTuple [template = constants.%MakeImplicitEmptyTuple] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @MakeImplicitEmptyTuple() {
@@ -41,12 +41,12 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc15_11.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc15_11.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %b.var: ref () = var b
// CHECK:STDOUT: %b: ref () = bind_name b, %b.var
// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: <type of MakeImplicitEmptyTuple> = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple]
// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init () = call %MakeImplicitEmptyTuple.ref()
// CHECK:STDOUT: %b.var: ref %.1 = var b
// CHECK:STDOUT: %b: ref %.1 = bind_name b, %b.var
// CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: %MakeImplicitEmptyTuple.type = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple]
// CHECK:STDOUT: %MakeImplicitEmptyTuple.call: init %.1 = call %MakeImplicitEmptyTuple.ref()
// CHECK:STDOUT: assign %b.var, %MakeImplicitEmptyTuple.call
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+8 -8
View File
@@ -19,11 +19,11 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -34,15 +34,15 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32]
// CHECK:STDOUT: %a.loc11_8.1: i32 = param a
// CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -54,9 +54,9 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc14)
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -20,11 +20,11 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -35,15 +35,15 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32]
// CHECK:STDOUT: %a.loc11_8.1: i32 = param a
// CHECK:STDOUT: @Foo.%a: i32 = bind_name a, %a.loc11_8.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -55,12 +55,12 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref.loc14: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Foo.call.loc14: init () = call %Foo.ref.loc14(%.loc14)
// CHECK:STDOUT: %Foo.ref.loc15: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14)
// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc15: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %Foo.call.loc15: init () = call %Foo.ref.loc15(%.loc15)
// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+9 -9
View File
@@ -19,11 +19,11 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: }
@@ -35,9 +35,9 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -49,7 +49,7 @@ fn Main() {
// CHECK:STDOUT: %b.loc11_16.1: i32 = param b
// CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -61,10 +61,10 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %Foo.call: init () = call %Foo.ref(%.loc14_7, %.loc14_10)
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14_7, %.loc14_10)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -20,11 +20,11 @@ fn Main() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: <type of Main> = struct_value () [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: }
@@ -36,9 +36,9 @@ fn Main() {
// CHECK:STDOUT: .Main = %Main.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -50,7 +50,7 @@ fn Main() {
// CHECK:STDOUT: %b.loc11_16.1: i32 = param b
// CHECK:STDOUT: @Foo.%b: i32 = bind_name b, %b.loc11_16.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %Main.decl: <type of Main> = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -62,14 +62,14 @@ fn Main() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref.loc14: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %Foo.call.loc14: init () = call %Foo.ref.loc14(%.loc14_7, %.loc14_10)
// CHECK:STDOUT: %Foo.ref.loc15: <type of Foo> = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14_7, %.loc14_10)
// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc15_7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc15_10: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %Foo.call.loc15: init () = call %Foo.ref.loc15(%.loc15_7, %.loc15_10)
// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15_7, %.loc15_10)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -18,9 +18,9 @@ fn F(n: i32, a: [i32; n]*);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -29,9 +29,9 @@ fn F(n: i32, a: [i32; n]*);
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %int.make_type_32.loc14_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14_9 [template = i32]
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14_9, %.loc14_9.1 [template = i32]
@@ -21,9 +21,9 @@ fn F(n: i32, n: i32);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -32,9 +32,9 @@ fn F(n: i32, n: i32);
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %int.make_type_32.loc17_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc17_9.1: type = value_of_initializer %int.make_type_32.loc17_9 [template = i32]
// CHECK:STDOUT: %.loc17_9.2: type = converted %int.make_type_32.loc17_9, %.loc17_9.1 [template = i32]
File diff suppressed because it is too large Load Diff
@@ -43,14 +43,14 @@ var f: () = F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
@@ -60,15 +60,15 @@ var f: () = F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of F> = import_ref ir1, inst+1, loaded [template = constants.%F]
// CHECK:STDOUT: %F: <type of F> = export F, %import_ref [template = constants.%F]
// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+1, loaded [template = constants.%F]
// CHECK:STDOUT: %F: %F.type = export F, %import_ref [template = constants.%F]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
@@ -78,7 +78,7 @@ var f: () = F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -86,19 +86,19 @@ var f: () = F();
// CHECK:STDOUT: .F = %import_ref
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of F> = import_ref ir1, inst+6, loaded [template = constants.%F]
// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal ()
// CHECK:STDOUT: %import_ref: %F.type = import_ref ir1, inst+6, loaded [template = constants.%F]
// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%import_ref [template = constants.%F]
// CHECK:STDOUT: %F.call: init () = call %F.ref()
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%import_ref [template = constants.%F]
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref()
// CHECK:STDOUT: assign file.%f.var, %F.call
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -61,14 +61,14 @@ class C {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @F();
@@ -78,15 +78,15 @@ class C {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @F();
@@ -96,15 +96,15 @@ class C {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl.loc12
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
@@ -115,9 +115,9 @@ class C {
// CHECK:STDOUT: %C: type = class_type @C [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = struct_type {} [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -129,11 +129,11 @@ class C {
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C]
// CHECK:STDOUT: %self.loc11_15.1: C = param self
// CHECK:STDOUT: %self.loc11_15.2: C = bind_name self, %self.loc11_15.1
// CHECK:STDOUT: %self.loc11_15.1: %C = param self
// CHECK:STDOUT: %self.loc11_15.2: %C = bind_name self, %self.loc11_15.1
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
@@ -144,5 +144,5 @@ class C {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G[@C.%self.loc11_15.2: C]();
// CHECK:STDOUT: fn @G[@C.%self.loc11_15.2: %C]();
// CHECK:STDOUT:
@@ -82,15 +82,15 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: %D: type = class_type @D [template]
// CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %ReturnCUnused: <type of ReturnCUnused> = struct_value () [template]
// CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template]
// CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template]
// CHECK:STDOUT: %ReturnCUsed: <type of ReturnCUsed> = struct_value () [template]
// CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template]
// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template]
// CHECK:STDOUT: %ReturnDUnused: <type of ReturnDUnused> = struct_value () [template]
// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template]
// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template]
// CHECK:STDOUT: %ReturnDUsed: <type of ReturnDUsed> = struct_value () [template]
// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template]
// CHECK:STDOUT: %Call.type: type = fn_type @Call [template]
// CHECK:STDOUT: %Call: <type of Call> = struct_value () [template]
// CHECK:STDOUT: %Call: %Call.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = struct_type {} [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -106,23 +106,23 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %D.decl.loc5: type = class_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %ReturnCUnused.decl: <type of ReturnCUnused> = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] {
// CHECK:STDOUT: %ReturnCUnused.decl: %ReturnCUnused.type = fn_decl @ReturnCUnused [template = constants.%ReturnCUnused] {
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, %C.decl [template = constants.%C]
// CHECK:STDOUT: @ReturnCUnused.%return: ref C = var <return slot>
// CHECK:STDOUT: @ReturnCUnused.%return: ref %C = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %ReturnCUsed.decl: <type of ReturnCUsed> = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] {
// CHECK:STDOUT: %ReturnCUsed.decl: %ReturnCUsed.type = fn_decl @ReturnCUsed [template = constants.%ReturnCUsed] {
// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C]
// CHECK:STDOUT: @ReturnCUsed.%return: ref C = var <return slot>
// CHECK:STDOUT: @ReturnCUsed.%return: ref %C = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %ReturnDUnused.decl: <type of ReturnDUnused> = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] {
// CHECK:STDOUT: %ReturnDUnused.decl: %ReturnDUnused.type = fn_decl @ReturnDUnused [template = constants.%ReturnDUnused] {
// CHECK:STDOUT: %D.ref.loc9: type = name_ref D, %D.decl.loc5 [template = constants.%D]
// CHECK:STDOUT: @ReturnDUnused.%return: ref D = var <return slot>
// CHECK:STDOUT: @ReturnDUnused.%return: ref %D = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %ReturnDUsed.decl: <type of ReturnDUsed> = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] {
// CHECK:STDOUT: %ReturnDUsed.decl: %ReturnDUsed.type = fn_decl @ReturnDUsed [template = constants.%ReturnDUsed] {
// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, %D.decl.loc5 [template = constants.%D]
// CHECK:STDOUT: @ReturnDUsed.%return: ref D = var <return slot>
// CHECK:STDOUT: @ReturnDUsed.%return: ref %D = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %Call.decl: <type of Call> = fn_decl @Call [template = constants.%Call] {}
// CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] {}
// CHECK:STDOUT: %D.decl.loc37: type = class_decl @D [template = constants.%D] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -133,19 +133,19 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: .Self = constants.%D
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnCUnused() -> C;
// CHECK:STDOUT: fn @ReturnCUnused() -> %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnCUsed() -> C;
// CHECK:STDOUT: fn @ReturnCUsed() -> %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnDUnused() -> D;
// CHECK:STDOUT: fn @ReturnDUnused() -> %D;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnDUsed() -> D;
// CHECK:STDOUT: fn @ReturnDUsed() -> %D;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Call() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ReturnCUsed.ref: <type of ReturnCUsed> = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed]
// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%ReturnCUsed.decl [template = constants.%ReturnCUsed]
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
// CHECK:STDOUT: %ReturnDUsed.ref: <type of ReturnDUsed> = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed]
// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%ReturnDUsed.decl [template = constants.%ReturnDUsed]
// CHECK:STDOUT: %ReturnDUsed.call: init <error> = call %ReturnDUsed.ref()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -155,19 +155,19 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %CallFAndGIncomplete.type: type = fn_type @CallFAndGIncomplete [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %CallFAndGIncomplete: <type of CallFAndGIncomplete> = struct_value () [template]
// CHECK:STDOUT: %CallFAndGIncomplete: %CallFAndGIncomplete.type = struct_value () [template]
// CHECK:STDOUT: %C: type = class_type @C [template]
// CHECK:STDOUT: %ReturnCUnused.type: type = fn_type @ReturnCUnused [template]
// CHECK:STDOUT: %ReturnCUnused: <type of ReturnCUnused> = struct_value () [template]
// CHECK:STDOUT: %ReturnCUnused: %ReturnCUnused.type = struct_value () [template]
// CHECK:STDOUT: %ReturnCUsed.type: type = fn_type @ReturnCUsed [template]
// CHECK:STDOUT: %ReturnCUsed: <type of ReturnCUsed> = struct_value () [template]
// CHECK:STDOUT: %ReturnCUsed: %ReturnCUsed.type = struct_value () [template]
// CHECK:STDOUT: %D: type = class_type @D [template]
// CHECK:STDOUT: %.2: type = struct_type {} [template]
// CHECK:STDOUT: %ReturnDUnused.type: type = fn_type @ReturnDUnused [template]
// CHECK:STDOUT: %ReturnDUnused: <type of ReturnDUnused> = struct_value () [template]
// CHECK:STDOUT: %.3: type = ptr_type {} [template]
// CHECK:STDOUT: %ReturnDUnused: %ReturnDUnused.type = struct_value () [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [template]
// CHECK:STDOUT: %ReturnDUsed: <type of ReturnDUsed> = struct_value () [template]
// CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -183,12 +183,12 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+1, unloaded
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+3, unloaded
// CHECK:STDOUT: %import_ref.3: <type of ReturnCUnused> = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused]
// CHECK:STDOUT: %import_ref.4: <type of ReturnCUsed> = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed]
// CHECK:STDOUT: %import_ref.5: <type of ReturnDUnused> = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused]
// CHECK:STDOUT: %import_ref.6: <type of ReturnDUsed> = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed]
// CHECK:STDOUT: %import_ref.3: %ReturnCUnused.type = import_ref ir1, inst+7, loaded [template = constants.%ReturnCUnused]
// CHECK:STDOUT: %import_ref.4: %ReturnCUsed.type = import_ref ir1, inst+13, loaded [template = constants.%ReturnCUsed]
// CHECK:STDOUT: %import_ref.5: %ReturnDUnused.type = import_ref ir1, inst+18, loaded [template = constants.%ReturnDUnused]
// CHECK:STDOUT: %import_ref.6: %ReturnDUsed.type = import_ref ir1, inst+23, loaded [template = constants.%ReturnDUsed]
// CHECK:STDOUT: %import_ref.7 = import_ref ir1, inst+26, unloaded
// CHECK:STDOUT: %CallFAndGIncomplete.decl: <type of CallFAndGIncomplete> = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {}
// CHECK:STDOUT: %CallFAndGIncomplete.decl: %CallFAndGIncomplete.type = fn_decl @CallFAndGIncomplete [template = constants.%CallFAndGIncomplete] {}
// CHECK:STDOUT: %import_ref.8 = import_ref ir1, inst+4, unloaded
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -201,24 +201,24 @@ fn CallFAndGIncomplete() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @CallFAndGIncomplete() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ReturnCUnused.ref: <type of ReturnCUnused> = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused]
// CHECK:STDOUT: %ReturnCUnused.ref: %ReturnCUnused.type = name_ref ReturnCUnused, file.%import_ref.3 [template = constants.%ReturnCUnused]
// CHECK:STDOUT: %ReturnCUnused.call: init <error> = call %ReturnCUnused.ref()
// CHECK:STDOUT: %ReturnCUsed.ref: <type of ReturnCUsed> = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed]
// CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, file.%import_ref.4 [template = constants.%ReturnCUsed]
// CHECK:STDOUT: %ReturnCUsed.call: init <error> = call %ReturnCUsed.ref()
// CHECK:STDOUT: %ReturnDUnused.ref: <type of ReturnDUnused> = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused]
// CHECK:STDOUT: %.loc24_16.1: ref D = temporary_storage
// CHECK:STDOUT: %ReturnDUnused.call: init D = call %ReturnDUnused.ref() to %.loc24_16.1
// CHECK:STDOUT: %.loc24_16.2: ref D = temporary %.loc24_16.1, %ReturnDUnused.call
// CHECK:STDOUT: %ReturnDUsed.ref: <type of ReturnDUsed> = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed]
// CHECK:STDOUT: %ReturnDUnused.ref: %ReturnDUnused.type = name_ref ReturnDUnused, file.%import_ref.5 [template = constants.%ReturnDUnused]
// CHECK:STDOUT: %.loc24_16.1: ref %D = temporary_storage
// CHECK:STDOUT: %ReturnDUnused.call: init %D = call %ReturnDUnused.ref() to %.loc24_16.1
// CHECK:STDOUT: %.loc24_16.2: ref %D = temporary %.loc24_16.1, %ReturnDUnused.call
// CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, file.%import_ref.6 [template = constants.%ReturnDUsed]
// CHECK:STDOUT: %ReturnDUsed.call: init <error> = call %ReturnDUsed.ref()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnCUnused() -> C;
// CHECK:STDOUT: fn @ReturnCUnused() -> %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnCUsed() -> C;
// CHECK:STDOUT: fn @ReturnCUsed() -> %C;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnDUnused() -> D;
// CHECK:STDOUT: fn @ReturnDUnused() -> %D;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ReturnDUsed() -> D;
// CHECK:STDOUT: fn @ReturnDUsed() -> %D;
// CHECK:STDOUT:
@@ -99,19 +99,19 @@ extern private fn ExternOrderAndConflict() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %WrongOrder.type: type = fn_type @WrongOrder [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %WrongOrder: <type of WrongOrder> = struct_value () [template]
// CHECK:STDOUT: %WrongOrder: %WrongOrder.type = struct_value () [template]
// CHECK:STDOUT: %DuplicateVirtual.type: type = fn_type @DuplicateVirtual [template]
// CHECK:STDOUT: %DuplicateVirtual: <type of DuplicateVirtual> = struct_value () [template]
// CHECK:STDOUT: %DuplicateVirtual: %DuplicateVirtual.type = struct_value () [template]
// CHECK:STDOUT: %TwoAccess.type: type = fn_type @TwoAccess [template]
// CHECK:STDOUT: %TwoAccess: <type of TwoAccess> = struct_value () [template]
// CHECK:STDOUT: %TwoAccess: %TwoAccess.type = struct_value () [template]
// CHECK:STDOUT: %ModifiersConflict.type: type = fn_type @ModifiersConflict [template]
// CHECK:STDOUT: %ModifiersConflict: <type of ModifiersConflict> = struct_value () [template]
// CHECK:STDOUT: %ModifiersConflict: %ModifiersConflict.type = struct_value () [template]
// CHECK:STDOUT: %InvalidModifier.type: type = fn_type @InvalidModifier [template]
// CHECK:STDOUT: %InvalidModifier: <type of InvalidModifier> = struct_value () [template]
// CHECK:STDOUT: %InvalidModifier: %InvalidModifier.type = struct_value () [template]
// CHECK:STDOUT: %ModifiersConflict2.type: type = fn_type @ModifiersConflict2 [template]
// CHECK:STDOUT: %ModifiersConflict2: <type of ModifiersConflict2> = struct_value () [template]
// CHECK:STDOUT: %ModifiersConflict2: %ModifiersConflict2.type = struct_value () [template]
// CHECK:STDOUT: %ExternOrderAndConflict.type: type = fn_type @ExternOrderAndConflict [template]
// CHECK:STDOUT: %ExternOrderAndConflict: <type of ExternOrderAndConflict> = struct_value () [template]
// CHECK:STDOUT: %ExternOrderAndConflict: %ExternOrderAndConflict.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -124,13 +124,13 @@ extern private fn ExternOrderAndConflict() {}
// CHECK:STDOUT: .ModifiersConflict2 = %ModifiersConflict2.decl
// CHECK:STDOUT: .ExternOrderAndConflict = %ExternOrderAndConflict.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %WrongOrder.decl: <type of WrongOrder> = fn_decl @WrongOrder [template = constants.%WrongOrder] {}
// CHECK:STDOUT: %DuplicateVirtual.decl: <type of DuplicateVirtual> = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {}
// CHECK:STDOUT: %TwoAccess.decl: <type of TwoAccess> = fn_decl @TwoAccess [template = constants.%TwoAccess] {}
// CHECK:STDOUT: %ModifiersConflict.decl: <type of ModifiersConflict> = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {}
// CHECK:STDOUT: %InvalidModifier.decl: <type of InvalidModifier> = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {}
// CHECK:STDOUT: %ModifiersConflict2.decl: <type of ModifiersConflict2> = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {}
// CHECK:STDOUT: %ExternOrderAndConflict.decl: <type of ExternOrderAndConflict> = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {}
// CHECK:STDOUT: %WrongOrder.decl: %WrongOrder.type = fn_decl @WrongOrder [template = constants.%WrongOrder] {}
// CHECK:STDOUT: %DuplicateVirtual.decl: %DuplicateVirtual.type = fn_decl @DuplicateVirtual [template = constants.%DuplicateVirtual] {}
// CHECK:STDOUT: %TwoAccess.decl: %TwoAccess.type = fn_decl @TwoAccess [template = constants.%TwoAccess] {}
// CHECK:STDOUT: %ModifiersConflict.decl: %ModifiersConflict.type = fn_decl @ModifiersConflict [template = constants.%ModifiersConflict] {}
// CHECK:STDOUT: %InvalidModifier.decl: %InvalidModifier.type = fn_decl @InvalidModifier [template = constants.%InvalidModifier] {}
// CHECK:STDOUT: %ModifiersConflict2.decl: %ModifiersConflict2.type = fn_decl @ModifiersConflict2 [template = constants.%ModifiersConflict2] {}
// CHECK:STDOUT: %ExternOrderAndConflict.decl: %ExternOrderAndConflict.type = fn_decl @ExternOrderAndConflict [template = constants.%ExternOrderAndConflict] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @WrongOrder();
@@ -62,17 +62,17 @@ fn E() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: <type of B> = struct_value () [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: <type of C> = struct_value () [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
// CHECK:STDOUT: %.2: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
// CHECK:STDOUT: %D.type: type = fn_type @D [template]
// CHECK:STDOUT: %D: <type of D> = struct_value () [template]
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
// CHECK:STDOUT: %E.type: type = fn_type @E [template]
// CHECK:STDOUT: %E: <type of E> = struct_value () [template]
// CHECK:STDOUT: %E: %E.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -83,40 +83,40 @@ fn E() {}
// CHECK:STDOUT: .D = %D.decl.loc41
// CHECK:STDOUT: .E = %E.decl.loc51
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl.loc11: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl.loc19: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %B.decl.loc21: <type of B> = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %.loc21_10.1: () = tuple_literal ()
// CHECK:STDOUT: %A.decl.loc11: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl.loc19: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %B.decl.loc21: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %x.loc21_6.1: () = param x
// CHECK:STDOUT: @B.%x: () = bind_name x, %x.loc21_6.1
// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x
// CHECK:STDOUT: @B.%x: %.1 = bind_name x, %x.loc21_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %B.decl.loc29: <type of B> = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %.loc29_10.1: () = tuple_literal ()
// CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %.loc29_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %x.loc29_6.1: () = param x
// CHECK:STDOUT: %x.loc29_6.2: () = bind_name x, %x.loc29_6.1
// CHECK:STDOUT: %x.loc29_6.1: %.1 = param x
// CHECK:STDOUT: %x.loc29_6.2: %.1 = bind_name x, %x.loc29_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %C.decl: <type of C> = fn_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %.decl: <type of <invalid>> = fn_decl @.1 [template = constants.%.2] {
// CHECK:STDOUT: %.loc39_10.1: () = tuple_literal ()
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {}
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {
// CHECK:STDOUT: %.loc39_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %x.loc39_6.1: () = param x
// CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc39_6.1
// CHECK:STDOUT: %x.loc39_6.1: %.1 = param x
// CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc39_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl.loc41: <type of D> = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %D.decl.loc49: <type of D> = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %E.decl.loc51: <type of E> = fn_decl @E [template = constants.%E] {}
// CHECK:STDOUT: %E.decl.loc58: <type of E> = fn_decl @E [template = constants.%E] {}
// CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %D.decl.loc49: %D.type = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %E.decl.loc51: %E.type = fn_decl @E [template = constants.%E] {}
// CHECK:STDOUT: %E.decl.loc58: %E.type = fn_decl @E [template = constants.%E] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B(%x: ());
// CHECK:STDOUT: fn @B(%x: %.1);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.1(%x: ());
// CHECK:STDOUT: fn @.1(%x: %.1);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D() {
// CHECK:STDOUT: !entry:
@@ -45,14 +45,14 @@ fn A => 0;
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -62,14 +62,14 @@ fn A => 0;
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -82,14 +82,14 @@ fn A => 0;
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -68,14 +68,14 @@ extern fn A();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -85,15 +85,15 @@ extern fn A();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -103,14 +103,14 @@ extern fn A();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @A();
@@ -120,15 +120,15 @@ extern fn A();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -138,14 +138,14 @@ extern fn A();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -155,15 +155,15 @@ extern fn A();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @A();
@@ -17,9 +17,9 @@ fn G() { F(); }
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -27,16 +27,16 @@ fn G() { F(); }
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: .G = %G.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.call: init () = call %F.ref()
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref()
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -17,11 +17,11 @@ fn G(a: i32);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -31,16 +31,16 @@ fn G(a: i32);
// CHECK:STDOUT: .G = %G.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %int.make_type_32.loc11 [template = i32]
// CHECK:STDOUT: %.loc11_9.2: type = converted %int.make_type_32.loc11, %.loc11_9.1 [template = i32]
// CHECK:STDOUT: %a.loc11_6.1: i32 = param a
// CHECK:STDOUT: @F.%a: i32 = bind_name a, %a.loc11_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc13_9.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
// CHECK:STDOUT: %.loc13_9.2: type = converted %int.make_type_32.loc13, %.loc13_9.1 [template = i32]
+65 -65
View File
@@ -99,19 +99,19 @@ fn D() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: <type of B> = struct_value () [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: <type of C> = struct_value () [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 0 [template]
// CHECK:STDOUT: %D.type: type = fn_type @D [template]
// CHECK:STDOUT: %D: <type of D> = struct_value () [template]
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -123,10 +123,10 @@ fn D() {}
// CHECK:STDOUT: .D = %D.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl: <type of B> = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %int.make_type_32.loc5_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc5_9.1: type = value_of_initializer %int.make_type_32.loc5_9 [template = i32]
// CHECK:STDOUT: %.loc5_9.2: type = converted %int.make_type_32.loc5_9, %.loc5_9.1 [template = i32]
@@ -137,23 +137,23 @@ fn D() {}
// CHECK:STDOUT: %.loc5_17.2: type = converted %int.make_type_32.loc5_17, %.loc5_17.1 [template = i32]
// CHECK:STDOUT: @B.%return: ref i32 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.3: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.4: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %C.decl: <type of C> = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %import_ref.3: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.4: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {
// CHECK:STDOUT: %int.make_type_32.loc6_10: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc6_14.1: (type,) = tuple_literal (%int.make_type_32.loc6_10)
// CHECK:STDOUT: %.loc6_14.1: %.2 = tuple_literal (%int.make_type_32.loc6_10)
// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %int.make_type_32.loc6_10 [template = i32]
// CHECK:STDOUT: %.loc6_14.3: type = converted %int.make_type_32.loc6_10, %.loc6_14.2 [template = i32]
// CHECK:STDOUT: %.loc6_14.4: type = converted %.loc6_14.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %c.loc6_6.1: (i32,) = param c
// CHECK:STDOUT: @C.%c: (i32,) = bind_name c, %c.loc6_6.1
// CHECK:STDOUT: %c.loc6_6.1: %.3 = param c
// CHECK:STDOUT: @C.%c: %.3 = bind_name c, %c.loc6_6.1
// CHECK:STDOUT: %int.make_type_32.loc6_25: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc6_25.1: type = value_of_initializer %int.make_type_32.loc6_25 [template = i32]
// CHECK:STDOUT: %.loc6_25.2: type = converted %int.make_type_32.loc6_25, %.loc6_25.1 [template = i32]
// CHECK:STDOUT: %.loc6_28: type = struct_type {.c: i32} [template = constants.%.4]
// CHECK:STDOUT: @C.%return: ref {.c: i32} = var <return slot>
// CHECK:STDOUT: @C.%return: ref %.4 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %D.decl: <type of D> = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -169,14 +169,14 @@ fn D() {}
// CHECK:STDOUT: return %b.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32} {
// CHECK:STDOUT: fn @C(%c: %.3) -> %.4 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %c.ref: (i32,) = name_ref c, %c
// CHECK:STDOUT: %c.ref: %.3 = name_ref c, %c
// CHECK:STDOUT: %.loc6_47: i32 = int_literal 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc6_48: i32 = tuple_index %c.ref, %.loc6_47
// CHECK:STDOUT: %.loc6_49: {.c: i32} = struct_literal (%.loc6_48)
// CHECK:STDOUT: %struct: {.c: i32} = struct_value (%.loc6_48)
// CHECK:STDOUT: %.loc6_50: {.c: i32} = converted %.loc6_49, %struct
// CHECK:STDOUT: %.loc6_49: %.4 = struct_literal (%.loc6_48)
// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc6_48)
// CHECK:STDOUT: %.loc6_50: %.4 = converted %.loc6_49, %struct
// CHECK:STDOUT: return %.loc6_50
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -187,7 +187,7 @@ fn D() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -196,7 +196,7 @@ fn D() {}
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @A();
@@ -206,17 +206,17 @@ fn D() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: <type of B> = struct_value () [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %.4: type = tuple_type (i32) [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: <type of C> = struct_value () [template]
// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.2) [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.2) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -230,28 +230,28 @@ fn D() {}
// CHECK:STDOUT: .b = %b
// CHECK:STDOUT: .c = %c
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: <type of A> = import_ref ir1, inst+2, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: <type of B> = import_ref ir1, inst+22, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: <type of C> = import_ref ir1, inst+46, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+22, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3: %C.type = import_ref ir1, inst+46, loaded [template = constants.%C]
// CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+58, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc6_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc6_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %a.var: ref () = var a
// CHECK:STDOUT: %a: ref () = bind_name a, %a.var
// CHECK:STDOUT: %import_ref.5: <type of Int32> = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %a.var: ref %.1 = var a
// CHECK:STDOUT: %a: ref %.1 = bind_name a, %a.var
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32]
// CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32]
// CHECK:STDOUT: %b.var: ref i32 = var b
// CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
// CHECK:STDOUT: %import_ref.6: <type of Int32> = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc8_13.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32]
// CHECK:STDOUT: %.loc8_13.2: type = converted %int.make_type_32.loc8, %.loc8_13.1 [template = i32]
// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: i32} [template = constants.%.3]
// CHECK:STDOUT: %c.var: ref {.c: i32} = var c
// CHECK:STDOUT: %c: ref {.c: i32} = bind_name c, %c.var
// CHECK:STDOUT: %c.var: ref %.3 = var c
// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -260,23 +260,23 @@ fn D() {}
// CHECK:STDOUT:
// CHECK:STDOUT: fn @B(%b: i32) -> i32;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @C(%c: (i32,)) -> {.c: i32};
// CHECK:STDOUT: fn @C(%c: %.4) -> %.3;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %A.ref: <type of A> = name_ref A, file.%import_ref.1 [template = constants.%A]
// CHECK:STDOUT: %A.call: init () = call %A.ref()
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%import_ref.1 [template = constants.%A]
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: <type of B> = name_ref B, file.%import_ref.2 [template = constants.%B]
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%import_ref.2 [template = constants.%B]
// CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: <type of C> = name_ref C, file.%import_ref.3 [template = constants.%C]
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%import_ref.3 [template = constants.%C]
// CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc8_25: (i32,) = tuple_literal (%.loc8_23)
// CHECK:STDOUT: %tuple: (i32,) = tuple_value (%.loc8_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc8_21: (i32,) = converted %.loc8_25, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %C.call: init {.c: i32} = call %C.ref(%.loc8_21)
// CHECK:STDOUT: %.loc8_25: %.4 = tuple_literal (%.loc8_23)
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc8_21: %.4 = converted %.loc8_25, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %C.call: init %.3 = call %C.ref(%.loc8_21)
// CHECK:STDOUT: assign file.%c.var, %C.call
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -286,11 +286,11 @@ fn D() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: <type of B> = struct_value () [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -301,15 +301,15 @@ fn D() {}
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: .B = %B.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: <type of A> = import_ref ir1, inst+2, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: <type of B> = import_ref ir1, inst+22, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.1: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref.2: %B.type = import_ref ir1, inst+22, loaded [template = constants.%B]
// CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+46, unloaded
// CHECK:STDOUT: %import_ref.4 = import_ref ir1, inst+58, unloaded
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref.5: <type of Int32> = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.6: <type of Int32> = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl: <type of B> = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref.5: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.6: %Int32.type = import_ref ir4, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {
// CHECK:STDOUT: %int.make_type_32.loc27_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc27_9.1: type = value_of_initializer %int.make_type_32.loc27_9 [template = i32]
// CHECK:STDOUT: %.loc27_9.2: type = converted %int.make_type_32.loc27_9, %.loc27_9.1 [template = i32]
@@ -336,7 +336,7 @@ fn D() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -344,10 +344,10 @@ fn D() {}
// CHECK:STDOUT: .Core = %Core
// CHECK:STDOUT: .A = %A.decl.loc6
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir1, inst+2, loaded [template = constants.%A]
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir1, inst+2, loaded [template = constants.%A]
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %A.decl.loc6: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl.loc7: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl.loc6: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl.loc7: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -360,7 +360,7 @@ fn D() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %D.type: type = fn_type @D [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %D: <type of D> = struct_value () [template]
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -374,10 +374,10 @@ fn D() {}
// CHECK:STDOUT: %import_ref.1 = import_ref ir1, inst+2, unloaded
// CHECK:STDOUT: %import_ref.2 = import_ref ir1, inst+22, unloaded
// CHECK:STDOUT: %import_ref.3 = import_ref ir1, inst+46, unloaded
// CHECK:STDOUT: %import_ref.4: <type of D> = import_ref ir1, inst+58, loaded [template = constants.%D]
// CHECK:STDOUT: %import_ref.4: %D.type = import_ref ir1, inst+58, loaded [template = constants.%D]
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %D.decl.loc6: <type of D> = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %D.decl.loc13: <type of D> = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %D.decl.loc6: %D.type = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: %D.decl.loc13: %D.type = fn_decl @D [template = constants.%D] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @D() {
@@ -152,7 +152,7 @@ private fn Redecl() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Def.type: type = fn_type @Def [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Def: <type of Def> = struct_value () [template]
// CHECK:STDOUT: %Def: %Def.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -161,7 +161,7 @@ private fn Redecl() {}
// CHECK:STDOUT: .Def [private] = %Def.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Def.decl: <type of Def> = fn_decl @Def [template = constants.%Def] {}
// CHECK:STDOUT: %Def.decl: %Def.type = fn_decl @Def [template = constants.%Def] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Def() {
@@ -174,7 +174,7 @@ private fn Redecl() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %ForwardWithDef.type: type = fn_type @ForwardWithDef [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %ForwardWithDef: <type of ForwardWithDef> = struct_value () [template]
// CHECK:STDOUT: %ForwardWithDef: %ForwardWithDef.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -183,8 +183,8 @@ private fn Redecl() {}
// CHECK:STDOUT: .ForwardWithDef [private] = %ForwardWithDef.decl.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %ForwardWithDef.decl.loc4: <type of ForwardWithDef> = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {}
// CHECK:STDOUT: %ForwardWithDef.decl.loc6: <type of ForwardWithDef> = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {}
// CHECK:STDOUT: %ForwardWithDef.decl.loc4: %ForwardWithDef.type = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {}
// CHECK:STDOUT: %ForwardWithDef.decl.loc6: %ForwardWithDef.type = fn_decl @ForwardWithDef [template = constants.%ForwardWithDef] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @ForwardWithDef() {
@@ -197,7 +197,7 @@ private fn Redecl() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Forward: <type of Forward> = struct_value () [template]
// CHECK:STDOUT: %Forward: %Forward.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -206,7 +206,7 @@ private fn Redecl() {}
// CHECK:STDOUT: .Forward [private] = %Forward.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Forward.decl: <type of Forward> = fn_decl @Forward [template = constants.%Forward] {}
// CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Forward();
@@ -223,10 +223,10 @@ private fn Redecl() {}
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -248,10 +248,10 @@ private fn Redecl() {}
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -275,10 +275,10 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Test: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -301,10 +301,10 @@ private fn Redecl() {}
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -326,10 +326,10 @@ private fn Redecl() {}
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -353,10 +353,10 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Test: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -372,7 +372,7 @@ private fn Redecl() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Forward.type: type = fn_type @Forward [template]
// CHECK:STDOUT: %Forward: <type of Forward> = struct_value () [template]
// CHECK:STDOUT: %Forward: %Forward.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -382,11 +382,11 @@ private fn Redecl() {}
// CHECK:STDOUT: .Forward = %Forward.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc8_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc8_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %Forward.decl: <type of Forward> = fn_decl @Forward [template = constants.%Forward] {}
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Forward() {
@@ -413,10 +413,10 @@ private fn Redecl() {}
// CHECK:STDOUT: .f = %f
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc10_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -440,10 +440,10 @@ private fn Redecl() {}
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Test: <namespace> = namespace [template] {}
// CHECK:STDOUT: %.loc9_9.1: () = tuple_literal ()
// CHECK:STDOUT: %.loc9_9.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %f.var: ref () = var f
// CHECK:STDOUT: %f: ref () = bind_name f, %f.var
// CHECK:STDOUT: %f.var: ref %.1 = var f
// CHECK:STDOUT: %f: ref %.1 = bind_name f, %f.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
@@ -459,7 +459,7 @@ private fn Redecl() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Redecl.type: type = fn_type @Redecl [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Redecl: <type of Redecl> = struct_value () [template]
// CHECK:STDOUT: %Redecl: %Redecl.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -468,8 +468,8 @@ private fn Redecl() {}
// CHECK:STDOUT: .Redecl [private] = %Redecl.decl.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %Redecl.decl.loc4: <type of Redecl> = fn_decl @Redecl [template = constants.%Redecl] {}
// CHECK:STDOUT: %Redecl.decl.loc6: <type of Redecl> = fn_decl @Redecl [template = constants.%Redecl] {}
// CHECK:STDOUT: %Redecl.decl.loc4: %Redecl.type = fn_decl @Redecl [template = constants.%Redecl] {}
// CHECK:STDOUT: %Redecl.decl.loc6: %Redecl.type = fn_decl @Redecl [template = constants.%Redecl] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Redecl() {
@@ -65,14 +65,14 @@ extern fn F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
@@ -85,15 +85,15 @@ extern fn F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl.loc12
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
@@ -106,16 +106,16 @@ extern fn F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl.loc12
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc13: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc12: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc13: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
@@ -128,15 +128,15 @@ extern fn F();
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc11: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc11: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
@@ -69,32 +69,32 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.type.1: type = fn_type @.1 [template]
// CHECK:STDOUT: %.2: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.2: %.type.1 = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: <type of G> = struct_value () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %.type.2: type = fn_type @.2 [template]
// CHECK:STDOUT: %.3: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.3: %.type.2 = struct_value () [template]
// CHECK:STDOUT: %H.type: type = fn_type @H [template]
// CHECK:STDOUT: %H: <type of H> = struct_value () [template]
// CHECK:STDOUT: %H: %H.type = struct_value () [template]
// CHECK:STDOUT: %.type.3: type = fn_type @.3 [template]
// CHECK:STDOUT: %.4: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.4: %.type.3 = struct_value () [template]
// CHECK:STDOUT: %I.type: type = fn_type @I [template]
// CHECK:STDOUT: %I: <type of I> = struct_value () [template]
// CHECK:STDOUT: %I: %I.type = struct_value () [template]
// CHECK:STDOUT: %.type.4: type = fn_type @.4 [template]
// CHECK:STDOUT: %.5: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %tuple: () = tuple_value () [template]
// CHECK:STDOUT: %.5: %.type.4 = struct_value () [template]
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
// CHECK:STDOUT: %J.type: type = fn_type @J [template]
// CHECK:STDOUT: %J: <type of J> = struct_value () [template]
// CHECK:STDOUT: %J: %J.type = struct_value () [template]
// CHECK:STDOUT: %.type.5: type = fn_type @.5 [template]
// CHECK:STDOUT: %.6: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.6: %.type.5 = struct_value () [template]
// CHECK:STDOUT: %K.type: type = fn_type @K [template]
// CHECK:STDOUT: %K: <type of K> = struct_value () [template]
// CHECK:STDOUT: %K: %K.type = struct_value () [template]
// CHECK:STDOUT: %.7: type = struct_type {} [template]
// CHECK:STDOUT: %.type.6: type = fn_type @.6 [template]
// CHECK:STDOUT: %.8: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %struct: {} = struct_value () [template]
// CHECK:STDOUT: %.8: %.type.6 = struct_value () [template]
// CHECK:STDOUT: %struct: %.7 = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -106,69 +106,69 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT: .J = %J.decl
// CHECK:STDOUT: .K = %K.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %.decl.loc19: <type of <invalid>> = fn_decl @.1 [template = constants.%.2] {
// CHECK:STDOUT: %.loc19_10.1: () = tuple_literal ()
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %.decl.loc19: %.type.1 = fn_decl @.1 [template = constants.%.2] {
// CHECK:STDOUT: %.loc19_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %x.loc19_6.1: () = param x
// CHECK:STDOUT: @.1.%x: () = bind_name x, %x.loc19_6.1
// CHECK:STDOUT: %x.loc19_6.1: %.1 = param x
// CHECK:STDOUT: @.1.%x: %.1 = bind_name x, %x.loc19_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: <type of G> = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %.loc21_10.1: () = tuple_literal ()
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
// CHECK:STDOUT: %.loc21_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %x.loc21_6.1: () = param x
// CHECK:STDOUT: @G.%x: () = bind_name x, %x.loc21_6.1
// CHECK:STDOUT: %x.loc21_6.1: %.1 = param x
// CHECK:STDOUT: @G.%x: %.1 = bind_name x, %x.loc21_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl.loc29: <type of <invalid>> = fn_decl @.2 [template = constants.%.3] {}
// CHECK:STDOUT: %H.decl: <type of H> = fn_decl @H [template = constants.%H] {
// CHECK:STDOUT: %.loc31_10.1: () = tuple_literal ()
// CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.3] {}
// CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {
// CHECK:STDOUT: %.loc31_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %x.loc31_6.1: () = param x
// CHECK:STDOUT: @H.%x: () = bind_name x, %x.loc31_6.1
// CHECK:STDOUT: %x.loc31_6.1: %.1 = param x
// CHECK:STDOUT: @H.%x: %.1 = bind_name x, %x.loc31_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl.loc36: <type of <invalid>> = fn_decl @.3 [template = constants.%.4] {
// CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.4] {
// CHECK:STDOUT: %x.loc36_6.1: <error> = param x
// CHECK:STDOUT: @.3.%x: <error> = bind_name x, %x.loc36_6.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %I.decl: <type of I> = fn_decl @I [template = constants.%I] {}
// CHECK:STDOUT: %.decl.loc46: <type of <invalid>> = fn_decl @.4 [template = constants.%.5] {
// CHECK:STDOUT: %.loc46_12.1: () = tuple_literal ()
// CHECK:STDOUT: %I.decl: %I.type = fn_decl @I [template = constants.%I] {}
// CHECK:STDOUT: %.decl.loc46: %.type.4 = fn_decl @.4 [template = constants.%.5] {
// CHECK:STDOUT: %.loc46_12.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc46_12.2: type = converted %.loc46_12.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: @.4.%return: ref () = var <return slot>
// CHECK:STDOUT: @.4.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %J.decl: <type of J> = fn_decl @J [template = constants.%J] {
// CHECK:STDOUT: %.loc48_12.1: () = tuple_literal ()
// CHECK:STDOUT: %J.decl: %J.type = fn_decl @J [template = constants.%J] {
// CHECK:STDOUT: %.loc48_12.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc48_12.2: type = converted %.loc48_12.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: @J.%return: ref () = var <return slot>
// CHECK:STDOUT: @J.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl.loc56: <type of <invalid>> = fn_decl @.5 [template = constants.%.6] {}
// CHECK:STDOUT: %K.decl: <type of K> = fn_decl @K [template = constants.%K] {
// CHECK:STDOUT: %.loc58_12.1: () = tuple_literal ()
// CHECK:STDOUT: %.decl.loc56: %.type.5 = fn_decl @.5 [template = constants.%.6] {}
// CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [template = constants.%K] {
// CHECK:STDOUT: %.loc58_12.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc58_12.2: type = converted %.loc58_12.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: @K.%return: ref () = var <return slot>
// CHECK:STDOUT: @K.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl.loc65: <type of <invalid>> = fn_decl @.6 [template = constants.%.8] {
// CHECK:STDOUT: %.loc65_12.1: {} = struct_literal ()
// CHECK:STDOUT: %.decl.loc65: %.type.6 = fn_decl @.6 [template = constants.%.8] {
// CHECK:STDOUT: %.loc65_12.1: %.7 = struct_literal ()
// CHECK:STDOUT: %.loc65_12.2: type = converted %.loc65_12.1, constants.%.7 [template = constants.%.7]
// CHECK:STDOUT: @.6.%return: ref {} = var <return slot>
// CHECK:STDOUT: @.6.%return: ref %.7 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.1(%x: ()) {
// CHECK:STDOUT: fn @.1(%x: %.1) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G(%x: ());
// CHECK:STDOUT: fn @G(%x: %.1);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.2() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @H(%x: ());
// CHECK:STDOUT: fn @H(%x: %.1);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.3(%x: <error>) {
// CHECK:STDOUT: !entry:
@@ -177,28 +177,28 @@ fn K() -> {} { return {}; }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @I();
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.4() -> () {
// CHECK:STDOUT: fn @.4() -> %.1 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc46_24: () = tuple_literal ()
// CHECK:STDOUT: %tuple: () = tuple_value () [template = constants.%tuple]
// CHECK:STDOUT: %.loc46_25: () = converted %.loc46_24, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %.loc46_24: %.1 = tuple_literal ()
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple]
// CHECK:STDOUT: %.loc46_25: %.1 = converted %.loc46_24, %tuple [template = constants.%tuple]
// CHECK:STDOUT: return %.loc46_25
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @J() -> ();
// CHECK:STDOUT: fn @J() -> %.1;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.5() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @K() -> ();
// CHECK:STDOUT: fn @K() -> %.1;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.6() -> {} {
// CHECK:STDOUT: fn @.6() -> %.7 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc65_24: {} = struct_literal ()
// CHECK:STDOUT: %struct: {} = struct_value () [template = constants.%struct]
// CHECK:STDOUT: %.loc65_25: {} = converted %.loc65_24, %struct [template = constants.%struct]
// CHECK:STDOUT: %.loc65_24: %.7 = struct_literal ()
// CHECK:STDOUT: %struct: %.7 = struct_value () [template = constants.%struct]
// CHECK:STDOUT: %.loc65_25: %.7 = converted %.loc65_24, %struct [template = constants.%struct]
// CHECK:STDOUT: return %.loc65_25
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -22,15 +22,15 @@ fn F() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl.loc11
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc11: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc18: <type of F> = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc11: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: %F.decl.loc18: %F.type = fn_decl @F [template = constants.%F] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() {
@@ -17,15 +17,15 @@ fn Foo() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .Foo = %Foo.decl.loc11
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl.loc11: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Foo.decl.loc13: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Foo.decl.loc11: %Foo.type = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Foo.decl.loc13: %Foo.type = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() {
@@ -129,14 +129,14 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -146,15 +146,15 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -167,14 +167,14 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: extern fn @A();
@@ -184,15 +184,15 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -205,14 +205,14 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -222,15 +222,15 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -243,14 +243,14 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -263,15 +263,15 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -281,14 +281,14 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -301,15 +301,15 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref: <type of A> = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %import_ref: %A.type = import_ref ir0, inst+1, loaded [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A() {
@@ -322,7 +322,7 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -330,9 +330,9 @@ fn B() {}
// CHECK:STDOUT: .A = %A.decl
// CHECK:STDOUT: .B = %B
// CHECK:STDOUT: }
// CHECK:STDOUT: %A.decl: <type of A> = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.ref: <type of A> = name_ref A, %A.decl [template = constants.%A]
// CHECK:STDOUT: %B: <type of A> = bind_alias B, %A.decl [template = constants.%A]
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {}
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [template = constants.%A]
// CHECK:STDOUT: %B: %A.type = bind_alias B, %A.decl [template = constants.%A]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -342,9 +342,9 @@ fn B() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %A: <type of A> = struct_value () [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
// CHECK:STDOUT: %.2: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.2: %.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -353,8 +353,8 @@ fn B() {}
// CHECK:STDOUT: .B = %import_ref.2
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1 = import_ref ir0, inst+1, unloaded
// CHECK:STDOUT: %import_ref.2: <type of A> = import_ref ir0, inst+6, loaded [template = constants.%A]
// CHECK:STDOUT: %.decl: <type of <invalid>> = fn_decl @.1 [template = constants.%.2] {}
// CHECK:STDOUT: %import_ref.2: %A.type = import_ref ir0, inst+6, loaded [template = constants.%A]
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.2] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @A();
@@ -17,11 +17,11 @@ fn Baz() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Bar.type: type = fn_type @Bar [template]
// CHECK:STDOUT: %Bar: <type of Bar> = struct_value () [template]
// CHECK:STDOUT: %Bar: %Bar.type = struct_value () [template]
// CHECK:STDOUT: %Baz.type: type = fn_type @Baz [template]
// CHECK:STDOUT: %Baz: <type of Baz> = struct_value () [template]
// CHECK:STDOUT: %Baz: %Baz.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -30,9 +30,9 @@ fn Baz() {}
// CHECK:STDOUT: .Bar = %Bar.decl
// CHECK:STDOUT: .Baz = %Baz.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Bar.decl: <type of Bar> = fn_decl @Bar [template = constants.%Bar] {}
// CHECK:STDOUT: %Baz.decl: <type of Baz> = fn_decl @Baz [template = constants.%Baz] {}
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] {}
// CHECK:STDOUT: %Baz.decl: %Baz.type = fn_decl @Baz [template = constants.%Baz] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() {
@@ -15,14 +15,14 @@ fn Foo() {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .Foo = %Foo.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Foo() {
@@ -15,9 +15,9 @@ fn Foo(a: i32) {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -26,8 +26,8 @@ fn Foo(a: i32) {}
// CHECK:STDOUT: .Foo = %Foo.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32]
@@ -15,9 +15,9 @@ fn Foo(a: i32,) {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -26,8 +26,8 @@ fn Foo(a: i32,) {}
// CHECK:STDOUT: .Foo = %Foo.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32, %.loc11_11.1 [template = i32]
@@ -15,9 +15,9 @@ fn Foo(a: i32, b: i32) {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -26,9 +26,9 @@ fn Foo(a: i32, b: i32) {}
// CHECK:STDOUT: .Foo = %Foo.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -15,9 +15,9 @@ fn Foo(a: i32, b: i32,) {}
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Foo.type: type = fn_type @Foo [template]
// CHECK:STDOUT: %Foo: <type of Foo> = struct_value () [template]
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -26,9 +26,9 @@ fn Foo(a: i32, b: i32,) {}
// CHECK:STDOUT: .Foo = %Foo.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: <type of Foo> = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %Foo.decl: %Foo.type = fn_decl @Foo [template = constants.%Foo] {
// CHECK:STDOUT: %int.make_type_32.loc11_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %int.make_type_32.loc11_11 [template = i32]
// CHECK:STDOUT: %.loc11_11.2: type = converted %int.make_type_32.loc11_11, %.loc11_11.1 [template = i32]
@@ -18,10 +18,10 @@ fn F(N:! i32, a: [i32; N]*);
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: <type of Int32> = struct_value () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %N: i32 = bind_symbolic_name N 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -30,9 +30,9 @@ fn F(N:! i32, a: [i32; N]*);
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %import_ref.1: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: <type of Int32> = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref ir3, inst+3, loaded [template = constants.%Int32]
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %int.make_type_32.loc14_10: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %int.make_type_32.loc14_10 [template = i32]
// CHECK:STDOUT: %.loc14_10.2: type = converted %int.make_type_32.loc14_10, %.loc14_10.1 [template = i32]
@@ -23,15 +23,15 @@ fn F(T:! type, U:! type) {
// CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %.2: type = ptr_type T [symbolic]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc11_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: %U.loc11_16.1: type = param U
@@ -42,14 +42,14 @@ fn F(T:! type, U:! type) {
// CHECK:STDOUT: fn @F(%T: type, %U: type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T]
// CHECK:STDOUT: %.loc12: type = ptr_type T [symbolic = constants.%.2]
// CHECK:STDOUT: %p.var: ref T* = var p
// CHECK:STDOUT: %p: ref T* = bind_name p, %p.var
// CHECK:STDOUT: %.loc12: type = ptr_type %T [symbolic = constants.%.2]
// CHECK:STDOUT: %p.var: ref %.2 = var p
// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var
// CHECK:STDOUT: %U.ref: type = name_ref U, %U [symbolic = constants.%U]
// CHECK:STDOUT: %p.ref: ref T* = name_ref p, %p
// CHECK:STDOUT: %.loc16_15: T* = bind_value %p.ref
// CHECK:STDOUT: %.loc16_14: ref T = deref %.loc16_15
// CHECK:STDOUT: %n: U = bind_name n, <error>
// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p
// CHECK:STDOUT: %.loc16_15: %.2 = bind_value %p.ref
// CHECK:STDOUT: %.loc16_14: ref %T = deref %.loc16_15
// CHECK:STDOUT: %n: %U = bind_name n, <error>
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -19,15 +19,15 @@ fn F(T:! type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %.2: type = ptr_type T [symbolic]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = ptr_type %T [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc11_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: }
@@ -36,15 +36,15 @@ fn F(T:! type) {
// CHECK:STDOUT: fn @F(%T: type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T [symbolic = constants.%T]
// CHECK:STDOUT: %.loc12: type = ptr_type T [symbolic = constants.%.2]
// CHECK:STDOUT: %p.var: ref T* = var p
// CHECK:STDOUT: %p: ref T* = bind_name p, %p.var
// CHECK:STDOUT: %.loc12: type = ptr_type %T [symbolic = constants.%.2]
// CHECK:STDOUT: %p.var: ref %.2 = var p
// CHECK:STDOUT: %p: ref %.2 = bind_name p, %p.var
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T [symbolic = constants.%T]
// CHECK:STDOUT: %p.ref: ref T* = name_ref p, %p
// CHECK:STDOUT: %.loc13_15: T* = bind_value %p.ref
// CHECK:STDOUT: %.loc13_14.1: ref T = deref %.loc13_15
// CHECK:STDOUT: %.loc13_14.2: T = bind_value %.loc13_14.1
// CHECK:STDOUT: %n: T = bind_name n, %.loc13_14.2
// CHECK:STDOUT: %p.ref: ref %.2 = name_ref p, %p
// CHECK:STDOUT: %.loc13_15: %.2 = bind_value %p.ref
// CHECK:STDOUT: %.loc13_14.1: ref %T = deref %.loc13_15
// CHECK:STDOUT: %.loc13_14.2: %T = bind_value %.loc13_14.1
// CHECK:STDOUT: %n: %T = bind_name n, %.loc13_14.2
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -19,30 +19,30 @@ fn F(T:! type, n: T) -> T {
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [template] {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc11_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc11_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, @F.%T [symbolic = constants.%T]
// CHECK:STDOUT: %n.loc11_16.1: T = param n
// CHECK:STDOUT: @F.%n: T = bind_name n, %n.loc11_16.1
// CHECK:STDOUT: %n.loc11_16.1: %T = param n
// CHECK:STDOUT: @F.%n: %T = bind_name n, %n.loc11_16.1
// CHECK:STDOUT: %T.ref.loc11_25: type = name_ref T, @F.%T [symbolic = constants.%T]
// CHECK:STDOUT: @F.%return: ref T = var <return slot>
// CHECK:STDOUT: @F.%return: ref %T = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%T: type, %n: T) -> T {
// CHECK:STDOUT: fn @F(%T: type, %n: %T) -> %T {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T]
// CHECK:STDOUT: %n.ref: T = name_ref n, %n
// CHECK:STDOUT: %m: T = bind_name m, %n.ref
// CHECK:STDOUT: %m.ref: T = name_ref m, %m
// CHECK:STDOUT: %n.ref: %T = name_ref n, %n
// CHECK:STDOUT: %m: %T = bind_name m, %n.ref
// CHECK:STDOUT: %m.ref: %T = name_ref m, %m
// CHECK:STDOUT: return %m.ref
// CHECK:STDOUT: }
// CHECK:STDOUT:
+55 -55
View File
@@ -105,10 +105,10 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type T [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -117,29 +117,29 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: .F = %F.decl.loc4
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %F.decl.loc4: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl.loc4: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc4_6.1: type = param T
// CHECK:STDOUT: %T.loc4_6.2: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, %T.loc4_6.2 [symbolic = constants.%T]
// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1]
// CHECK:STDOUT: %return.var.loc4: ref T* = var <return slot>
// CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = constants.%.1]
// CHECK:STDOUT: %return.var.loc4: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl.loc6: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl.loc6: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc6_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc6_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @F.%T [symbolic = constants.%T]
// CHECK:STDOUT: %.loc6: type = ptr_type T [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref T* = var <return slot>
// CHECK:STDOUT: %.loc6: type = ptr_type %T [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%T: type) -> T* {
// CHECK:STDOUT: fn @F(%T: type) -> %.1 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%F.decl.loc4 [template = constants.%F]
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl.loc4 [template = constants.%F]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T]
// CHECK:STDOUT: %F.call: init T* = call %F.ref(%T.ref)
// CHECK:STDOUT: %.loc7_14.1: T* = value_of_initializer %F.call
// CHECK:STDOUT: %.loc7_14.2: T* = converted %F.call, %.loc7_14.1
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(%T.ref)
// CHECK:STDOUT: %.loc7_14.1: %.1 = value_of_initializer %F.call
// CHECK:STDOUT: %.loc7_14.2: %.1 = converted %F.call, %.loc7_14.1
// CHECK:STDOUT: return %.loc7_14.2
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -148,13 +148,13 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %T: type = bind_symbolic_name T 0 [symbolic]
// CHECK:STDOUT: %U: type = bind_symbolic_name U 1 [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type T [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type %T [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %.3: type = ptr_type U [symbolic]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.3: type = ptr_type %U [symbolic]
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
// CHECK:STDOUT: %.4: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.4: %.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -163,33 +163,33 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc4_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: %U.loc4_16.1: type = param U
// CHECK:STDOUT: @F.%U: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = constants.%U]
// CHECK:STDOUT: %T.ref: type = name_ref T, @F.%T [symbolic = constants.%T]
// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref T* = var <return slot>
// CHECK:STDOUT: %.loc4: type = ptr_type %T [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: <type of <invalid>> = fn_decl @.1 [template = constants.%.4] {
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {
// CHECK:STDOUT: %T.loc13_6.1: type = param T
// CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 0, %T.loc13_6.1 [symbolic = constants.%T]
// CHECK:STDOUT: %U.loc13_16.1: type = param U
// CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 1, %U.loc13_16.1 [symbolic = constants.%U]
// CHECK:STDOUT: %U.ref: type = name_ref U, @.1.%U [symbolic = constants.%U]
// CHECK:STDOUT: %.loc13: type = ptr_type U [symbolic = constants.%.3]
// CHECK:STDOUT: @.1.%return: ref U* = var <return slot>
// CHECK:STDOUT: %.loc13: type = ptr_type %U [symbolic = constants.%.3]
// CHECK:STDOUT: @.1.%return: ref %.3 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%T: type, %U: type) -> T*;
// CHECK:STDOUT: fn @F(%T: type, %U: type) -> %.1;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.1(%T: type, %U: type) -> U* {
// CHECK:STDOUT: fn @.1(%T: type, %U: type) -> %.3 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T]
// CHECK:STDOUT: %F.call: init T* = call %F.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -198,15 +198,15 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic]
// CHECK:STDOUT: %U.1: type = bind_symbolic_name U 1 [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type T [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %U.2: type = bind_symbolic_name U 0 [symbolic]
// CHECK:STDOUT: %T.2: type = bind_symbolic_name T 1 [symbolic]
// CHECK:STDOUT: %.3: type = ptr_type T [symbolic]
// CHECK:STDOUT: %.3: type = ptr_type %T.2 [symbolic]
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
// CHECK:STDOUT: %.4: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.4: %.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -215,33 +215,33 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc4_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T.1]
// CHECK:STDOUT: %U.loc4_16.1: type = param U
// CHECK:STDOUT: @F.%U: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = constants.%U.1]
// CHECK:STDOUT: %T.ref.loc4: type = name_ref T, @F.%T [symbolic = constants.%T.1]
// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref T* = var <return slot>
// CHECK:STDOUT: %.loc4: type = ptr_type %T.1 [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: <type of <invalid>> = fn_decl @.1 [template = constants.%.4] {
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {
// CHECK:STDOUT: %U.loc13_6.1: type = param U
// CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = constants.%U.2]
// CHECK:STDOUT: %T.loc13_16.1: type = param T
// CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 1, %T.loc13_16.1 [symbolic = constants.%T.2]
// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @.1.%T [symbolic = constants.%T.2]
// CHECK:STDOUT: %.loc13: type = ptr_type T [symbolic = constants.%.3]
// CHECK:STDOUT: @.1.%return: ref T* = var <return slot>
// CHECK:STDOUT: %.loc13: type = ptr_type %T.2 [symbolic = constants.%.3]
// CHECK:STDOUT: @.1.%return: ref %.3 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%T: type, %U: type) -> T*;
// CHECK:STDOUT: fn @F(%T: type, %U: type) -> %.1;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> T* {
// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> %.3 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.2]
// CHECK:STDOUT: %F.call: init T* = call %F.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -250,15 +250,15 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %T.1: type = bind_symbolic_name T 0 [symbolic]
// CHECK:STDOUT: %U.1: type = bind_symbolic_name U 1 [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type T [symbolic]
// CHECK:STDOUT: %.1: type = ptr_type %T.1 [symbolic]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %F: <type of F> = struct_value () [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %U.2: type = bind_symbolic_name U 0 [symbolic]
// CHECK:STDOUT: %T.2: type = bind_symbolic_name T 1 [symbolic]
// CHECK:STDOUT: %.3: type = ptr_type U [symbolic]
// CHECK:STDOUT: %.3: type = ptr_type %U.2 [symbolic]
// CHECK:STDOUT: %.type: type = fn_type @.1 [template]
// CHECK:STDOUT: %.4: <type of <invalid>> = struct_value () [template]
// CHECK:STDOUT: %.4: %.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -267,33 +267,33 @@ fn F(U:! type, T:! type) -> U* {
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
// CHECK:STDOUT: %F.decl: <type of F> = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %T.loc4_6.1: type = param T
// CHECK:STDOUT: @F.%T: type = bind_symbolic_name T 0, %T.loc4_6.1 [symbolic = constants.%T.1]
// CHECK:STDOUT: %U.loc4_16.1: type = param U
// CHECK:STDOUT: @F.%U: type = bind_symbolic_name U 1, %U.loc4_16.1 [symbolic = constants.%U.1]
// CHECK:STDOUT: %T.ref: type = name_ref T, @F.%T [symbolic = constants.%T.1]
// CHECK:STDOUT: %.loc4: type = ptr_type T [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref T* = var <return slot>
// CHECK:STDOUT: %.loc4: type = ptr_type %T.1 [symbolic = constants.%.1]
// CHECK:STDOUT: @F.%return: ref %.1 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: %.decl: <type of <invalid>> = fn_decl @.1 [template = constants.%.4] {
// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.4] {
// CHECK:STDOUT: %U.loc13_6.1: type = param U
// CHECK:STDOUT: @.1.%U: type = bind_symbolic_name U 0, %U.loc13_6.1 [symbolic = constants.%U.2]
// CHECK:STDOUT: %T.loc13_16.1: type = param T
// CHECK:STDOUT: @.1.%T: type = bind_symbolic_name T 1, %T.loc13_16.1 [symbolic = constants.%T.2]
// CHECK:STDOUT: %U.ref: type = name_ref U, @.1.%U [symbolic = constants.%U.2]
// CHECK:STDOUT: %.loc13: type = ptr_type U [symbolic = constants.%.3]
// CHECK:STDOUT: @.1.%return: ref U* = var <return slot>
// CHECK:STDOUT: %.loc13: type = ptr_type %U.2 [symbolic = constants.%.3]
// CHECK:STDOUT: @.1.%return: ref %.3 = var <return slot>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%T: type, %U: type) -> T*;
// CHECK:STDOUT: fn @F(%T: type, %U: type) -> %.1;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> U* {
// CHECK:STDOUT: fn @.1(%U: type, %T: type) -> %.3 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: <type of F> = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T.2]
// CHECK:STDOUT: %F.call: init T* = call %F.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: %F.call: init %.1 = call %F.ref(<invalid>) [template = <error>]
// CHECK:STDOUT: return <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: