Name empty tuples distinctly in SemIR. (#4503)

Building on #4502, give empty tuple values a distinct name, and also
explicitly name tuple types (previously values but not types were
named).
This commit is contained in:
Jon Ross-Perkins
2024-11-08 17:14:52 +00:00
committed by GitHub
parent bbeb66b5fe
commit 10e256a241
585 changed files with 14742 additions and 14732 deletions
+12 -12
View File
@@ -16,15 +16,15 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = fn_type @Add [template]
// CHECK:STDOUT: %Add: %Add.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 2 [template]
// CHECK:STDOUT: %.3: i32 = int_value 3 [template]
// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template]
// CHECK:STDOUT: %.5: type = ptr_type %.4 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -69,14 +69,14 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add]
// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.4]
// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.2]
// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.3]
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32, %.loc13_11.1 [template = i32]
// CHECK:STDOUT: %.loc13_25: type = array_type %int.sadd, i32 [template = constants.%.5]
// CHECK:STDOUT: %arr.var: ref %.5 = var arr
// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var
// CHECK:STDOUT: %.loc13_25: type = array_type %int.sadd, i32 [template = constants.%.4]
// CHECK:STDOUT: %arr.var: ref %.4 = var arr
// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -14,7 +14,7 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = fn_type @Add [template]
// CHECK:STDOUT: %Add: %Add.type = struct_value () [template]
@@ -41,7 +41,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd";
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %A.type: type = fn_type @A [template]
// CHECK:STDOUT: %A: %A.type = struct_value () [template]
@@ -17,7 +17,7 @@ fn UnknownBuiltin() = "unknown.builtin.name";
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %UnknownBuiltin.type: type = fn_type @UnknownBuiltin [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %UnknownBuiltin: %UnknownBuiltin.type = struct_value () [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
+21 -21
View File
@@ -24,21 +24,21 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: %I.type: type = interface_type @I [template]
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template]
// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template]
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template]
// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template]
// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
// CHECK:STDOUT: %.4: <witness> = interface_witness (%F.2) [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: <bound method> = bound_method %.5, %F.2 [template]
// CHECK:STDOUT: %.7: i32 = int_value 2 [template]
// CHECK:STDOUT: %.8: i32 = int_value 3 [template]
// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template]
// CHECK:STDOUT: %.10: type = ptr_type %.9 [template]
// CHECK:STDOUT: %.3: <witness> = interface_witness (%F.2) [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: <bound method> = bound_method %.4, %F.2 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: i32 = int_value 3 [template]
// CHECK:STDOUT: %.8: type = array_type %.7, i32 [template]
// CHECK:STDOUT: %.9: type = ptr_type %.8 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -65,18 +65,18 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc19_16: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc19_16: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type]
// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3]
// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2]
// CHECK:STDOUT: %.loc19_17.2: <bound method> = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.6]
// CHECK:STDOUT: %.loc19_24: i32 = int_value 2 [template = constants.%.7]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.8]
// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2]
// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2]
// CHECK:STDOUT: %.loc19_17.2: <bound method> = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.5]
// CHECK:STDOUT: %.loc19_24: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.7]
// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32, %.loc19_11.1 [template = i32]
// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.9]
// CHECK:STDOUT: %arr.var: ref %.9 = var arr
// CHECK:STDOUT: %arr: ref %.9 = bind_name arr, %arr.var
// CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.8]
// CHECK:STDOUT: %arr.var: ref %.8 = var arr
// CHECK:STDOUT: %arr: ref %.8 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @I {
@@ -105,7 +105,7 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self) = out_param runtime_param2
// CHECK:STDOUT: %return: ref @F.1.%Self (%Self) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3]
// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -138,7 +138,7 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc15_15: <witness> = interface_witness (%F.decl) [template = constants.%.4]
// CHECK:STDOUT: %.loc15_15: <witness> = interface_witness (%F.decl) [template = constants.%.3]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %F.decl
@@ -34,14 +34,14 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = interface_type @Add [template]
// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic]
// CHECK:STDOUT: %Op.type: type = fn_type @Op [template]
// CHECK:STDOUT: %Op: %Op.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template]
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template]
// CHECK:STDOUT: %.1: type = assoc_entity_type %Add.type, %Op.type [template]
// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Add.%Op.decl [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: file {
@@ -85,7 +85,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %return.param: ref @Op.%Self (%Self) = out_param runtime_param2
// CHECK:STDOUT: %return: ref @Op.%Self (%Self) = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc7: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3]
// CHECK:STDOUT: %.loc7: %.1 = assoc_entity element0, %Op.decl [template = constants.%.2]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
@@ -109,7 +109,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = interface_type @Add [template]
// CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic]
@@ -117,21 +117,21 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// 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: %Op.type.2 = struct_value () [template]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Op.1) [template]
// CHECK:STDOUT: %.3: i32 = int_value 1 [template]
// CHECK:STDOUT: %.4: i32 = int_value 2 [template]
// CHECK:STDOUT: %.5: type = assoc_entity_type %Add.type, %Op.type.2 [template]
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.7: <bound method> = bound_method %.3, %Op.1 [template]
// CHECK:STDOUT: %.8: i32 = int_value 3 [template]
// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template]
// CHECK:STDOUT: %.10: type = ptr_type %.9 [template]
// CHECK:STDOUT: %.11: i32 = int_value 4 [template]
// CHECK:STDOUT: %.12: <bound method> = bound_method %.8, %Op.1 [template]
// CHECK:STDOUT: %.13: i32 = int_value 7 [template]
// CHECK:STDOUT: %.14: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.15: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.9 = tuple_value (%.8, %.11, %.13) [template]
// CHECK:STDOUT: %.1: <witness> = interface_witness (%Op.1) [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type.2 [template]
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.6: <bound method> = bound_method %.2, %Op.1 [template]
// CHECK:STDOUT: %.7: i32 = int_value 3 [template]
// CHECK:STDOUT: %.8: type = array_type %.7, i32 [template]
// CHECK:STDOUT: %.9: type = ptr_type %.8 [template]
// CHECK:STDOUT: %.10: i32 = int_value 4 [template]
// CHECK:STDOUT: %.11: <bound method> = bound_method %.7, %Op.1 [template]
// CHECK:STDOUT: %.12: i32 = int_value 7 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.13: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.8 = tuple_value (%.7, %.10, %.12) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -143,7 +143,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//default, inst+5, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: type = import_ref Core//default, inst+9, loaded [template = constants.%Add.type]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+11, unloaded
// CHECK:STDOUT: %import_ref.4: %.5 = import_ref Core//default, inst+39, loaded [template = constants.%.6]
// CHECK:STDOUT: %import_ref.4: %.4 = import_ref Core//default, inst+39, loaded [template = constants.%.5]
// CHECK:STDOUT: %import_ref.5: %Op.type.2 = import_ref Core//default, inst+34, loaded [template = constants.%Op.2]
// CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+34, unloaded
// CHECK:STDOUT: }
@@ -162,16 +162,16 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.2 [template = constants.%Add.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc10_16: i32 = int_value 1 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_20: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_18.2: <bound method> = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.7]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.8]
// CHECK:STDOUT: %.loc10_16: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc10_20: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.1, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_18.2: <bound method> = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.6]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.7]
// CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc10_11.2: type = converted %int.make_type_32, %.loc10_11.1 [template = i32]
// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.9]
// CHECK:STDOUT: %arr.var: ref %.9 = var arr
// CHECK:STDOUT: %arr: ref %.9 = bind_name arr, %arr.var
// CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.8]
// CHECK:STDOUT: %arr.var: ref %.8 = var arr
// CHECK:STDOUT: %arr: ref %.8 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: interface @Add {
@@ -200,7 +200,7 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2
// CHECK:STDOUT: %return: ref i32 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc6_22: <witness> = interface_witness (%Op.decl) [template = constants.%.2]
// CHECK:STDOUT: %.loc6_22: <witness> = interface_witness (%Op.decl) [template = constants.%.1]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %Op.decl
@@ -219,25 +219,25 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc10_26: i32 = int_value 3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_29: i32 = int_value 4 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_32: i32 = int_value 3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_36: i32 = int_value 4 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_34.2: <bound method> = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.12]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.13]
// CHECK:STDOUT: %.loc10_37.1: %.14 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd)
// CHECK:STDOUT: %.loc10_37.2: i32 = int_value 0 [template = constants.%.15]
// CHECK:STDOUT: %.loc10_26: i32 = int_value 3 [template = constants.%.7]
// CHECK:STDOUT: %.loc10_29: i32 = int_value 4 [template = constants.%.10]
// CHECK:STDOUT: %.loc10_32: i32 = int_value 3 [template = constants.%.7]
// CHECK:STDOUT: %.loc10_36: i32 = int_value 4 [template = constants.%.10]
// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.1, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_34.2: <bound method> = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.11]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.12]
// CHECK:STDOUT: %.loc10_37.1: %tuple.type = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd)
// CHECK:STDOUT: %.loc10_37.2: i32 = int_value 0 [template = constants.%.13]
// 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.%.8]
// CHECK:STDOUT: %.loc10_37.5: i32 = int_value 1 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.7]
// CHECK:STDOUT: %.loc10_37.5: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc10_37.6: ref i32 = array_index file.%arr.var, %.loc10_37.5
// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_37.8: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.10]
// CHECK:STDOUT: %.loc10_37.8: i32 = int_value 2 [template = constants.%.3]
// 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.%.13]
// CHECK:STDOUT: %.loc10_37.11: init %.9 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc10_38: init %.9 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array]
// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.12]
// CHECK:STDOUT: %.loc10_37.11: init %.8 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc10_38: init %.8 = converted %.loc10_37.1, %.loc10_37.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%arr.var, %.loc10_38
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -25,7 +25,7 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template]
// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template]
@@ -77,18 +77,18 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template]
// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.5 = tuple_value (%.2, %.3, %.4) [template]
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 2 [template]
// CHECK:STDOUT: %.3: i32 = int_value 3 [template]
// CHECK:STDOUT: %.4: type = array_type %.3, i32 [template]
// CHECK:STDOUT: %.5: type = ptr_type %.4 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.4 = tuple_value (%.1, %.2, %.3) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -110,14 +110,14 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, imports.%import_ref.2 [template = constants.%TestAdd]
// CHECK:STDOUT: %.loc4_29: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_32: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.4]
// CHECK:STDOUT: %.loc4_29: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc4_32: i32 = int_value 2 [template = constants.%.2]
// CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.3]
// 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 %.5 = var arr
// CHECK:STDOUT: %arr: ref %.5 = bind_name arr, %arr.var
// CHECK:STDOUT: %.loc4_34: type = array_type %int.sadd, i32 [template = constants.%.4]
// CHECK:STDOUT: %arr.var: ref %.4 = var arr
// CHECK:STDOUT: %arr: ref %.4 = bind_name arr, %arr.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -126,21 +126,21 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc4_39: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_42: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_45: i32 = int_value 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc4_46.1: %.7 = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45)
// CHECK:STDOUT: %.loc4_46.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc4_39: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc4_42: i32 = int_value 2 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_45: i32 = int_value 3 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.1: %tuple.type = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45)
// CHECK:STDOUT: %.loc4_46.2: i32 = int_value 0 [template = constants.%.6]
// 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]
// CHECK:STDOUT: %.loc4_46.5: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_46.4: init i32 = initialize_from %.loc4_39 to %.loc4_46.3 [template = constants.%.1]
// CHECK:STDOUT: %.loc4_46.5: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc4_46.6: ref i32 = array_index file.%arr.var, %.loc4_46.5
// CHECK:STDOUT: %.loc4_46.7: init i32 = initialize_from %.loc4_42 to %.loc4_46.6 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.8: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.7: init i32 = initialize_from %.loc4_42 to %.loc4_46.6 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_46.8: i32 = int_value 2 [template = constants.%.2]
// 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 %.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: %.loc4_46.10: init i32 = initialize_from %.loc4_45 to %.loc4_46.9 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.11: init %.4 = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array]
// CHECK:STDOUT: %.loc4_47: init %.4 = converted %.loc4_46.1, %.loc4_46.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%arr.var, %.loc4_47
// CHECK:STDOUT: return
// CHECK:STDOUT: }