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
+34 -34
View File
@@ -18,21 +18,21 @@ fn G() {
// 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: %.2: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %.4: i32 = int_value 2 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, %.3 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.7: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.8: type = tuple_type (%.3, %.3) [template]
// CHECK:STDOUT: %.9: i32 = int_value 0 [template]
// CHECK:STDOUT: %.10: i32 = int_value 1 [template]
// CHECK:STDOUT: %.1: i32 = int_value 2 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, %tuple.type.2 [template]
// CHECK:STDOUT: %.3: type = ptr_type %tuple.type.2 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.2 [template]
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.2, %tuple.type.2) [template]
// CHECK:STDOUT: %.5: i32 = int_value 0 [template]
// CHECK:STDOUT: %.6: i32 = int_value 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -52,62 +52,62 @@ fn G() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param0
// CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc11_17: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc11_22: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_25.1: %.2 = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17, %int.make_type_32.loc11_22)
// CHECK:STDOUT: %.loc11_25.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_12, %int.make_type_32.loc11_17, %int.make_type_32.loc11_22)
// CHECK:STDOUT: %.loc11_25.2: type = value_of_initializer %int.make_type_32.loc11_12 [template = i32]
// CHECK:STDOUT: %.loc11_25.3: type = converted %int.make_type_32.loc11_12, %.loc11_25.2 [template = i32]
// CHECK:STDOUT: %.loc11_25.4: type = value_of_initializer %int.make_type_32.loc11_17 [template = i32]
// CHECK:STDOUT: %.loc11_25.5: type = converted %int.make_type_32.loc11_17, %.loc11_25.4 [template = i32]
// CHECK:STDOUT: %.loc11_25.6: type = value_of_initializer %int.make_type_32.loc11_22 [template = i32]
// CHECK:STDOUT: %.loc11_25.7: type = converted %int.make_type_32.loc11_22, %.loc11_25.6 [template = i32]
// CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0
// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param
// CHECK:STDOUT: %.loc11_25.8: type = converted %.loc11_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0
// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() -> %.3;
// CHECK:STDOUT: fn @F() -> %tuple.type.2;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @G() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int.make_type_32.loc14_12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc14_17: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_25.1: %.2 = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22)
// CHECK:STDOUT: %.loc14_28: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22)
// CHECK:STDOUT: %.loc14_28: i32 = int_value 2 [template = constants.%.1]
// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_32.loc14_12 [template = i32]
// CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_32.loc14_12, %.loc14_25.2 [template = i32]
// CHECK:STDOUT: %.loc14_25.4: type = value_of_initializer %int.make_type_32.loc14_17 [template = i32]
// CHECK:STDOUT: %.loc14_25.5: type = converted %int.make_type_32.loc14_17, %.loc14_25.4 [template = i32]
// CHECK:STDOUT: %.loc14_25.6: type = value_of_initializer %int.make_type_32.loc14_22 [template = i32]
// CHECK:STDOUT: %.loc14_25.7: type = converted %int.make_type_32.loc14_22, %.loc14_25.6 [template = i32]
// CHECK:STDOUT: %.loc14_25.8: type = converted %.loc14_25.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %.loc14_29: type = array_type %.loc14_28, %.3 [template = constants.%.5]
// CHECK:STDOUT: %v.var: ref %.5 = var v
// CHECK:STDOUT: %v: ref %.5 = bind_name v, %v.var
// CHECK:STDOUT: %.loc14_25.8: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %.loc14_29: type = array_type %.loc14_28, %tuple.type.2 [template = constants.%.2]
// CHECK:STDOUT: %v.var: ref %.2 = var v
// CHECK:STDOUT: %v: ref %.2 = bind_name v, %v.var
// CHECK:STDOUT: %F.ref.loc14_34: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %.loc14_42.3: ref %.3 = splice_block %.loc14_42.2 {
// CHECK:STDOUT: %.loc14_42.1: i32 = int_value 0 [template = constants.%.9]
// CHECK:STDOUT: %.loc14_42.2: ref %.3 = array_index %v.var, %.loc14_42.1
// CHECK:STDOUT: %.loc14_42.3: ref %tuple.type.2 = splice_block %.loc14_42.2 {
// CHECK:STDOUT: %.loc14_42.1: i32 = int_value 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_42.2: ref %tuple.type.2 = array_index %v.var, %.loc14_42.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.call.loc14_35: init %.3 = call %F.ref.loc14_34() to %.loc14_42.3
// CHECK:STDOUT: %F.call.loc14_35: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.3
// CHECK:STDOUT: %F.ref.loc14_39: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %.loc14_42.6: ref %.3 = splice_block %.loc14_42.5 {
// CHECK:STDOUT: %.loc14_42.4: i32 = int_value 1 [template = constants.%.10]
// CHECK:STDOUT: %.loc14_42.5: ref %.3 = array_index %v.var, %.loc14_42.4
// CHECK:STDOUT: %.loc14_42.6: ref %tuple.type.2 = splice_block %.loc14_42.5 {
// CHECK:STDOUT: %.loc14_42.4: i32 = int_value 1 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_42.5: ref %tuple.type.2 = array_index %v.var, %.loc14_42.4
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.call.loc14_40: init %.3 = call %F.ref.loc14_39() to %.loc14_42.6
// CHECK:STDOUT: %.loc14_42.7: %.8 = tuple_literal (%F.call.loc14_35, %F.call.loc14_40)
// CHECK:STDOUT: %.loc14_42.8: init %.5 = array_init (%F.call.loc14_35, %F.call.loc14_40) to %v.var
// CHECK:STDOUT: %.loc14_43: init %.5 = converted %.loc14_42.7, %.loc14_42.8
// CHECK:STDOUT: %F.call.loc14_40: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.6
// CHECK:STDOUT: %.loc14_42.7: %tuple.type.3 = tuple_literal (%F.call.loc14_35, %F.call.loc14_40)
// CHECK:STDOUT: %.loc14_42.8: init %.2 = array_init (%F.call.loc14_35, %F.call.loc14_40) to %v.var
// CHECK:STDOUT: %.loc14_43: init %.2 = converted %.loc14_42.7, %.loc14_42.8
// CHECK:STDOUT: assign %v.var, %.loc14_43
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+41 -41
View File
@@ -18,21 +18,21 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_value 3 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template]
// CHECK:STDOUT: %.9: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %.10: type = ptr_type %.7 [template]
// CHECK:STDOUT: %tuple: %.7 = tuple_value (%.5, %.6, %.2) [template]
// CHECK:STDOUT: %.1: i32 = int_value 3 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %.7: type = ptr_type %tuple.type.1 [template]
// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -56,53 +56,53 @@ fn G() {
// CHECK:STDOUT: fn @G() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc13_16: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_16: i32 = int_value 3 [template = constants.%.1]
// 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_17: type = array_type %.loc13_16, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc13_22: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_25: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_28: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_29.1: %.7 = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28)
// CHECK:STDOUT: %.loc13_29.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc13_17: type = array_type %.loc13_16, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: %.loc13_22: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc13_25: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_28: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28)
// CHECK:STDOUT: %.loc13_29.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_29.3: ref i32 = array_index %a.var, %.loc13_29.2
// CHECK:STDOUT: %.loc13_29.4: init i32 = initialize_from %.loc13_22 to %.loc13_29.3 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.5: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.4: init i32 = initialize_from %.loc13_22 to %.loc13_29.3 [template = constants.%.4]
// CHECK:STDOUT: %.loc13_29.5: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc13_29.6: ref i32 = array_index %a.var, %.loc13_29.5
// CHECK:STDOUT: %.loc13_29.7: init i32 = initialize_from %.loc13_25 to %.loc13_29.6 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_29.8: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_29.7: init i32 = initialize_from %.loc13_25 to %.loc13_29.6 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.8: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.9: ref i32 = array_index %a.var, %.loc13_29.8
// CHECK:STDOUT: %.loc13_29.10: init i32 = initialize_from %.loc13_28 to %.loc13_29.9 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_29.11: init %.3 = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array]
// CHECK:STDOUT: %.loc13_30: init %.3 = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array]
// CHECK:STDOUT: %.loc13_29.10: init i32 = initialize_from %.loc13_28 to %.loc13_29.9 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_29.11: init %.2 = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array]
// CHECK:STDOUT: %.loc13_30: init %.2 = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc13_30
// CHECK:STDOUT: %int.make_type_32.loc14_11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc14_16: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc14_21: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_24.1: %.9 = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16, %int.make_type_32.loc14_21)
// CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%int.make_type_32.loc14_11, %int.make_type_32.loc14_16, %int.make_type_32.loc14_21)
// CHECK:STDOUT: %.loc14_24.2: type = value_of_initializer %int.make_type_32.loc14_11 [template = i32]
// CHECK:STDOUT: %.loc14_24.3: type = converted %int.make_type_32.loc14_11, %.loc14_24.2 [template = i32]
// CHECK:STDOUT: %.loc14_24.4: type = value_of_initializer %int.make_type_32.loc14_16 [template = i32]
// CHECK:STDOUT: %.loc14_24.5: type = converted %int.make_type_32.loc14_16, %.loc14_24.4 [template = i32]
// CHECK:STDOUT: %.loc14_24.6: type = value_of_initializer %int.make_type_32.loc14_21 [template = i32]
// CHECK:STDOUT: %.loc14_24.7: type = converted %int.make_type_32.loc14_21, %.loc14_24.6 [template = i32]
// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%.7 [template = constants.%.7]
// CHECK:STDOUT: %b.var: ref %.7 = var b
// CHECK:STDOUT: %b: ref %.7 = bind_name b, %b.var
// CHECK:STDOUT: %.loc14_29: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_32: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_35: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_36.1: %.7 = tuple_literal (%.loc14_29, %.loc14_32, %.loc14_35)
// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%tuple.type.1 [template = constants.%tuple.type.1]
// CHECK:STDOUT: %b.var: ref %tuple.type.1 = var b
// CHECK:STDOUT: %b: ref %tuple.type.1 = bind_name b, %b.var
// CHECK:STDOUT: %.loc14_29: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_32: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_35: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%.loc14_29, %.loc14_32, %.loc14_35)
// CHECK:STDOUT: %.loc14_36.2: ref i32 = tuple_access %b.var, element0
// CHECK:STDOUT: %.loc14_36.3: init i32 = initialize_from %.loc14_29 to %.loc14_36.2 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_36.3: init i32 = initialize_from %.loc14_29 to %.loc14_36.2 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_36.4: ref i32 = tuple_access %b.var, element1
// CHECK:STDOUT: %.loc14_36.5: init i32 = initialize_from %.loc14_32 to %.loc14_36.4 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_36.5: init i32 = initialize_from %.loc14_32 to %.loc14_36.4 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_36.6: ref i32 = tuple_access %b.var, element2
// CHECK:STDOUT: %.loc14_36.7: init i32 = initialize_from %.loc14_35 to %.loc14_36.6 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_36.8: init %.7 = tuple_init (%.loc14_36.3, %.loc14_36.5, %.loc14_36.7) to %b.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_37: init %.7 = converted %.loc14_36.1, %.loc14_36.8 [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_36.7: init i32 = initialize_from %.loc14_35 to %.loc14_36.6 [template = constants.%.1]
// CHECK:STDOUT: %.loc14_36.8: init %tuple.type.1 = tuple_init (%.loc14_36.3, %.loc14_36.5, %.loc14_36.7) to %b.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_37: init %tuple.type.1 = converted %.loc14_36.1, %.loc14_36.8 [template = constants.%tuple]
// CHECK:STDOUT: assign %b.var, %.loc14_37
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+29 -29
View File
@@ -18,19 +18,19 @@ fn Run() {
// 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: %.2: type = tuple_type (type) [template]
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32) [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.4: i32 = int_value 0 [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
// CHECK:STDOUT: %.1: i32 = int_value 0 [template]
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.1) [template]
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: type = array_type %.5, i32 [template]
// CHECK:STDOUT: %.7: type = ptr_type %.6 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -50,51 +50,51 @@ fn Run() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %return.patt: %.3 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %.3 = out_param_pattern %return.patt, runtime_param0
// CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_16.1: %.2 = tuple_literal (%int.make_type_32)
// CHECK:STDOUT: %.loc11_16.1: %tuple.type.1 = tuple_literal (%int.make_type_32)
// CHECK:STDOUT: %.loc11_16.2: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc11_16.3: type = converted %int.make_type_32, %.loc11_16.2 [template = i32]
// CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %return.param: ref %.3 = out_param runtime_param0
// CHECK:STDOUT: %return: ref %.3 = return_slot %return.param
// CHECK:STDOUT: %.loc11_16.4: type = converted %.loc11_16.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param0
// CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {}
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() -> %.3 {
// CHECK:STDOUT: fn @F() -> %tuple.type.2 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_28: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_30: %.3 = tuple_literal (%.loc11_28)
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc11_28) [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_31: %.3 = converted %.loc11_30, %tuple [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_28: i32 = int_value 0 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_30: %tuple.type.2 = tuple_literal (%.loc11_28)
// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_28) [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_31: %tuple.type.2 = converted %.loc11_30, %tuple [template = constants.%tuple]
// CHECK:STDOUT: return %.loc11_31
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_16: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_16: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32, %.loc14_11.1 [template = i32]
// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, i32 [template = constants.%.6]
// CHECK:STDOUT: %t.var: ref %.6 = var t
// CHECK:STDOUT: %t: ref %.6 = bind_name t, %t.var
// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, i32 [template = constants.%.3]
// CHECK:STDOUT: %t.var: ref %.3 = var t
// CHECK:STDOUT: %t: ref %.3 = bind_name t, %t.var
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %F.call: init %.3 = call %F.ref()
// CHECK:STDOUT: %.loc14_22.1: ref %.3 = temporary_storage
// CHECK:STDOUT: %.loc14_22.2: ref %.3 = temporary %.loc14_22.1, %F.call
// CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref()
// CHECK:STDOUT: %.loc14_22.1: ref %tuple.type.2 = temporary_storage
// CHECK:STDOUT: %.loc14_22.2: ref %tuple.type.2 = temporary %.loc14_22.1, %F.call
// CHECK:STDOUT: %.loc14_22.3: ref i32 = tuple_access %.loc14_22.2, element0
// CHECK:STDOUT: %.loc14_22.4: i32 = bind_value %.loc14_22.3
// CHECK:STDOUT: %.loc14_22.5: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_22.5: i32 = int_value 0 [template = constants.%.1]
// CHECK:STDOUT: %.loc14_22.6: ref i32 = array_index %t.var, %.loc14_22.5
// CHECK:STDOUT: %.loc14_22.7: init i32 = initialize_from %.loc14_22.4 to %.loc14_22.6
// CHECK:STDOUT: %.loc14_22.8: init %.6 = array_init (%.loc14_22.7) to %t.var
// CHECK:STDOUT: %.loc14_24: init %.6 = converted %F.call, %.loc14_22.8
// CHECK:STDOUT: %.loc14_22.8: init %.3 = array_init (%.loc14_22.7) to %t.var
// CHECK:STDOUT: %.loc14_24: init %.3 = converted %F.call, %.loc14_22.8
// CHECK:STDOUT: assign %t.var, %.loc14_24
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+34 -34
View File
@@ -15,18 +15,18 @@ var b: [i32; 3] = a;
// 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: %.2: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %.3: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: i32 = int_value 3 [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5, %.6, %.7) [template]
// CHECK:STDOUT: %.8: type = array_type %.7, i32 [template]
// CHECK:STDOUT: %.9: type = ptr_type %.8 [template]
// CHECK:STDOUT: %.10: i32 = int_value 0 [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.1: type = ptr_type %tuple.type.2 [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: %tuple: %tuple.type.2 = tuple_value (%.2, %.3, %.4) [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.7: i32 = int_value 0 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -48,60 +48,60 @@ var b: [i32; 3] = a;
// CHECK:STDOUT: %int.make_type_32.loc11_9: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc11_14: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc11_19: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_22.1: %.2 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14, %int.make_type_32.loc11_19)
// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int.make_type_32.loc11_9, %int.make_type_32.loc11_14, %int.make_type_32.loc11_19)
// CHECK:STDOUT: %.loc11_22.2: type = value_of_initializer %int.make_type_32.loc11_9 [template = i32]
// CHECK:STDOUT: %.loc11_22.3: type = converted %int.make_type_32.loc11_9, %.loc11_22.2 [template = i32]
// CHECK:STDOUT: %.loc11_22.4: type = value_of_initializer %int.make_type_32.loc11_14 [template = i32]
// CHECK:STDOUT: %.loc11_22.5: type = converted %int.make_type_32.loc11_14, %.loc11_22.4 [template = i32]
// CHECK:STDOUT: %.loc11_22.6: type = value_of_initializer %int.make_type_32.loc11_19 [template = i32]
// CHECK:STDOUT: %.loc11_22.7: type = converted %int.make_type_32.loc11_19, %.loc11_22.6 [template = i32]
// CHECK:STDOUT: %.loc11_22.8: type = converted %.loc11_22.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc11_22.8: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2]
// CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a
// CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var
// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc12_14: i32 = int_value 3 [template = constants.%.7]
// CHECK:STDOUT: %.loc12_14: i32 = int_value 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32]
// CHECK:STDOUT: %.loc12_9.2: type = converted %int.make_type_32.loc12, %.loc12_9.1 [template = i32]
// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, i32 [template = constants.%.8]
// CHECK:STDOUT: %b.var: ref %.8 = var b
// CHECK:STDOUT: %b: ref %.8 = bind_name b, %b.var
// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, i32 [template = constants.%.5]
// CHECK:STDOUT: %b.var: ref %.5 = var b
// CHECK:STDOUT: %b: ref %.5 = bind_name b, %b.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_27: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_30: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_33: i32 = int_value 3 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_34.1: %.3 = tuple_literal (%.loc11_27, %.loc11_30, %.loc11_33)
// CHECK:STDOUT: %.loc11_27: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_30: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc11_33: i32 = int_value 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_34.1: %tuple.type.2 = tuple_literal (%.loc11_27, %.loc11_30, %.loc11_33)
// CHECK:STDOUT: %.loc11_34.2: ref i32 = tuple_access file.%a.var, element0
// CHECK:STDOUT: %.loc11_34.3: init i32 = initialize_from %.loc11_27 to %.loc11_34.2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_34.3: init i32 = initialize_from %.loc11_27 to %.loc11_34.2 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_34.4: ref i32 = tuple_access file.%a.var, element1
// CHECK:STDOUT: %.loc11_34.5: init i32 = initialize_from %.loc11_30 to %.loc11_34.4 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_34.5: init i32 = initialize_from %.loc11_30 to %.loc11_34.4 [template = constants.%.3]
// CHECK:STDOUT: %.loc11_34.6: ref i32 = tuple_access file.%a.var, element2
// CHECK:STDOUT: %.loc11_34.7: init i32 = initialize_from %.loc11_33 to %.loc11_34.6 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_34.8: init %.3 = tuple_init (%.loc11_34.3, %.loc11_34.5, %.loc11_34.7) to file.%a.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_35: init %.3 = converted %.loc11_34.1, %.loc11_34.8 [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_34.7: init i32 = initialize_from %.loc11_33 to %.loc11_34.6 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_34.8: init %tuple.type.2 = tuple_init (%.loc11_34.3, %.loc11_34.5, %.loc11_34.7) to file.%a.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_35: init %tuple.type.2 = converted %.loc11_34.1, %.loc11_34.8 [template = constants.%tuple]
// CHECK:STDOUT: assign file.%a.var, %.loc11_35
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
// CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a
// CHECK:STDOUT: %.loc12_19.1: ref i32 = tuple_access %a.ref, element0
// CHECK:STDOUT: %.loc12_19.2: i32 = bind_value %.loc12_19.1
// CHECK:STDOUT: %.loc12_19.3: i32 = int_value 0 [template = constants.%.10]
// CHECK:STDOUT: %.loc12_19.3: i32 = int_value 0 [template = constants.%.7]
// CHECK:STDOUT: %.loc12_19.4: ref i32 = array_index file.%b.var, %.loc12_19.3
// CHECK:STDOUT: %.loc12_19.5: init i32 = initialize_from %.loc12_19.2 to %.loc12_19.4
// CHECK:STDOUT: %.loc12_19.6: ref i32 = tuple_access %a.ref, element1
// CHECK:STDOUT: %.loc12_19.7: i32 = bind_value %.loc12_19.6
// CHECK:STDOUT: %.loc12_19.8: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc12_19.8: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc12_19.9: ref i32 = array_index file.%b.var, %.loc12_19.8
// CHECK:STDOUT: %.loc12_19.10: init i32 = initialize_from %.loc12_19.7 to %.loc12_19.9
// CHECK:STDOUT: %.loc12_19.11: ref i32 = tuple_access %a.ref, element2
// CHECK:STDOUT: %.loc12_19.12: i32 = bind_value %.loc12_19.11
// CHECK:STDOUT: %.loc12_19.13: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc12_19.13: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc12_19.14: ref i32 = array_index file.%b.var, %.loc12_19.13
// CHECK:STDOUT: %.loc12_19.15: init i32 = initialize_from %.loc12_19.12 to %.loc12_19.14
// CHECK:STDOUT: %.loc12_19.16: init %.8 = array_init (%.loc12_19.5, %.loc12_19.10, %.loc12_19.15) to file.%b.var
// CHECK:STDOUT: %.loc12_20: init %.8 = converted %a.ref, %.loc12_19.16
// CHECK:STDOUT: %.loc12_19.16: init %.5 = array_init (%.loc12_19.5, %.loc12_19.10, %.loc12_19.15) to file.%b.var
// CHECK:STDOUT: %.loc12_20: init %.5 = converted %a.ref, %.loc12_19.16
// CHECK:STDOUT: assign file.%b.var, %.loc12_20
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+81 -81
View File
@@ -16,32 +16,32 @@ var c: [(); 5] = ((), (), (), (), (),);
// 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: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: type = tuple_type (i32) [template]
// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.2) [template]
// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 64 [template]
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (i32) [template]
// CHECK:STDOUT: %.4: i32 = int_value 0 [template]
// CHECK:STDOUT: %array.1: %.2 = tuple_value (%.1) [template]
// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 64 [template]
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
// CHECK:STDOUT: %.8: i32 = int_value 2 [template]
// CHECK:STDOUT: %.9: type = array_type %.8, f64 [template]
// CHECK:STDOUT: %.10: type = ptr_type %.9 [template]
// CHECK:STDOUT: %.11: f64 = float_literal 11.100000000000001 [template]
// CHECK:STDOUT: %.12: f64 = float_literal 2.2000000000000002 [template]
// CHECK:STDOUT: %.13: type = tuple_type (f64, f64) [template]
// CHECK:STDOUT: %array.2: %.9 = tuple_value (%.11, %.12) [template]
// CHECK:STDOUT: %.14: i32 = int_value 5 [template]
// CHECK:STDOUT: %.15: type = array_type %.14, %.1 [template]
// CHECK:STDOUT: %.16: type = ptr_type %.15 [template]
// CHECK:STDOUT: %.17: type = tuple_type (%.1, %.1, %.1, %.1, %.1) [template]
// CHECK:STDOUT: %tuple: %.1 = tuple_value () [template]
// CHECK:STDOUT: %.18: i32 = int_value 3 [template]
// CHECK:STDOUT: %.19: i32 = int_value 4 [template]
// CHECK:STDOUT: %array.3: %.15 = tuple_value (%tuple, %tuple, %tuple, %tuple, %tuple) [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = array_type %.6, f64 [template]
// CHECK:STDOUT: %.8: type = ptr_type %.7 [template]
// CHECK:STDOUT: %.9: f64 = float_literal 11.100000000000001 [template]
// CHECK:STDOUT: %.10: f64 = float_literal 2.2000000000000002 [template]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (f64, f64) [template]
// CHECK:STDOUT: %array.2: %.7 = tuple_value (%.9, %.10) [template]
// CHECK:STDOUT: %.11: i32 = int_value 5 [template]
// CHECK:STDOUT: %.12: type = array_type %.11, %empty_tuple.type [template]
// CHECK:STDOUT: %.13: type = ptr_type %.12 [template]
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [template]
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template]
// CHECK:STDOUT: %.14: i32 = int_value 3 [template]
// CHECK:STDOUT: %.15: i32 = int_value 4 [template]
// CHECK:STDOUT: %array.3: %.12 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -64,26 +64,26 @@ var c: [(); 5] = ((), (), (), (), (),);
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 1 [template = constants.%.1]
// 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: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.5]
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64]
// CHECK:STDOUT: %.loc12_14: i32 = int_value 2 [template = constants.%.8]
// CHECK:STDOUT: %.loc12_14: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64]
// CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64]
// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, f64 [template = constants.%.9]
// CHECK:STDOUT: %b.var: ref %.9 = var b
// CHECK:STDOUT: %b: ref %.9 = bind_name b, %b.var
// CHECK:STDOUT: %.loc13_10.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_13: i32 = int_value 5 [template = constants.%.14]
// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%.1 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_14: type = array_type %.loc13_13, %.1 [template = constants.%.15]
// CHECK:STDOUT: %c.var: ref %.15 = var c
// CHECK:STDOUT: %c: ref %.15 = bind_name c, %c.var
// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, f64 [template = constants.%.7]
// CHECK:STDOUT: %b.var: ref %.7 = var b
// CHECK:STDOUT: %b: ref %.7 = bind_name b, %b.var
// CHECK:STDOUT: %.loc13_10.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_13: i32 = int_value 5 [template = constants.%.11]
// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type]
// CHECK:STDOUT: %.loc13_14: type = array_type %.loc13_13, %empty_tuple.type [template = constants.%.12]
// CHECK:STDOUT: %c.var: ref %.12 = var c
// CHECK:STDOUT: %c: ref %.12 = bind_name c, %c.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -92,54 +92,54 @@ var c: [(); 5] = ((), (), (), (), (),);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_22.1: %.5 = tuple_literal (%.loc11_20)
// CHECK:STDOUT: %.loc11_22.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%.loc11_20)
// CHECK:STDOUT: %.loc11_22.2: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_22.3: ref i32 = array_index file.%a.var, %.loc11_22.2
// CHECK:STDOUT: %.loc11_22.4: init i32 = initialize_from %.loc11_20 to %.loc11_22.3 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_22.5: init %.3 = array_init (%.loc11_22.4) to file.%a.var [template = constants.%array.1]
// CHECK:STDOUT: %.loc11_23: init %.3 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%array.1]
// CHECK:STDOUT: %.loc11_22.4: init i32 = initialize_from %.loc11_20 to %.loc11_22.3 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_22.5: init %.2 = array_init (%.loc11_22.4) to file.%a.var [template = constants.%array.1]
// CHECK:STDOUT: %.loc11_23: init %.2 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%array.1]
// CHECK:STDOUT: assign file.%a.var, %.loc11_23
// CHECK:STDOUT: %.loc12_20: f64 = float_literal 11.100000000000001 [template = constants.%.11]
// CHECK:STDOUT: %.loc12_26: f64 = float_literal 2.2000000000000002 [template = constants.%.12]
// CHECK:STDOUT: %.loc12_30.1: %.13 = tuple_literal (%.loc12_20, %.loc12_26)
// CHECK:STDOUT: %.loc12_30.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc12_20: f64 = float_literal 11.100000000000001 [template = constants.%.9]
// CHECK:STDOUT: %.loc12_26: f64 = float_literal 2.2000000000000002 [template = constants.%.10]
// CHECK:STDOUT: %.loc12_30.1: %tuple.type.2 = tuple_literal (%.loc12_20, %.loc12_26)
// CHECK:STDOUT: %.loc12_30.2: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc12_30.3: ref f64 = array_index file.%b.var, %.loc12_30.2
// CHECK:STDOUT: %.loc12_30.4: init f64 = initialize_from %.loc12_20 to %.loc12_30.3 [template = constants.%.11]
// CHECK:STDOUT: %.loc12_30.5: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc12_30.4: init f64 = initialize_from %.loc12_20 to %.loc12_30.3 [template = constants.%.9]
// CHECK:STDOUT: %.loc12_30.5: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc12_30.6: ref f64 = array_index file.%b.var, %.loc12_30.5
// CHECK:STDOUT: %.loc12_30.7: init f64 = initialize_from %.loc12_26 to %.loc12_30.6 [template = constants.%.12]
// CHECK:STDOUT: %.loc12_30.8: init %.9 = array_init (%.loc12_30.4, %.loc12_30.7) to file.%b.var [template = constants.%array.2]
// CHECK:STDOUT: %.loc12_31: init %.9 = converted %.loc12_30.1, %.loc12_30.8 [template = constants.%array.2]
// CHECK:STDOUT: %.loc12_30.7: init f64 = initialize_from %.loc12_26 to %.loc12_30.6 [template = constants.%.10]
// CHECK:STDOUT: %.loc12_30.8: init %.7 = array_init (%.loc12_30.4, %.loc12_30.7) to file.%b.var [template = constants.%array.2]
// CHECK:STDOUT: %.loc12_31: init %.7 = converted %.loc12_30.1, %.loc12_30.8 [template = constants.%array.2]
// CHECK:STDOUT: assign file.%b.var, %.loc12_31
// CHECK:STDOUT: %.loc13_20.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_24.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_28.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_32.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_36.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_38.1: %.17 = tuple_literal (%.loc13_20.1, %.loc13_24.1, %.loc13_28.1, %.loc13_32.1, %.loc13_36.1)
// CHECK:STDOUT: %.loc13_38.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_38.3: ref %.1 = array_index file.%c.var, %.loc13_38.2
// CHECK:STDOUT: %.loc13_20.2: init %.1 = tuple_init () to %.loc13_38.3 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.4: init %.1 = converted %.loc13_20.1, %.loc13_20.2 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.5: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_38.6: ref %.1 = array_index file.%c.var, %.loc13_38.5
// CHECK:STDOUT: %.loc13_24.2: init %.1 = tuple_init () to %.loc13_38.6 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.7: init %.1 = converted %.loc13_24.1, %.loc13_24.2 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.8: i32 = int_value 2 [template = constants.%.8]
// CHECK:STDOUT: %.loc13_38.9: ref %.1 = array_index file.%c.var, %.loc13_38.8
// CHECK:STDOUT: %.loc13_28.2: init %.1 = tuple_init () to %.loc13_38.9 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.10: init %.1 = converted %.loc13_28.1, %.loc13_28.2 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.11: i32 = int_value 3 [template = constants.%.18]
// CHECK:STDOUT: %.loc13_38.12: ref %.1 = array_index file.%c.var, %.loc13_38.11
// CHECK:STDOUT: %.loc13_32.2: init %.1 = tuple_init () to %.loc13_38.12 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.13: init %.1 = converted %.loc13_32.1, %.loc13_32.2 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.14: i32 = int_value 4 [template = constants.%.19]
// CHECK:STDOUT: %.loc13_38.15: ref %.1 = array_index file.%c.var, %.loc13_38.14
// CHECK:STDOUT: %.loc13_36.2: init %.1 = tuple_init () to %.loc13_38.15 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.16: init %.1 = converted %.loc13_36.1, %.loc13_36.2 [template = constants.%tuple]
// CHECK:STDOUT: %.loc13_38.17: init %.15 = array_init (%.loc13_38.4, %.loc13_38.7, %.loc13_38.10, %.loc13_38.13, %.loc13_38.16) to file.%c.var [template = constants.%array.3]
// CHECK:STDOUT: %.loc13_39: init %.15 = converted %.loc13_38.1, %.loc13_38.17 [template = constants.%array.3]
// CHECK:STDOUT: %.loc13_20.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_24.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_28.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_32.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_36.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_38.1: %tuple.type.3 = tuple_literal (%.loc13_20.1, %.loc13_24.1, %.loc13_28.1, %.loc13_32.1, %.loc13_36.1)
// CHECK:STDOUT: %.loc13_38.2: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc13_38.3: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.2
// CHECK:STDOUT: %.loc13_20.2: init %empty_tuple.type = tuple_init () to %.loc13_38.3 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.4: init %empty_tuple.type = converted %.loc13_20.1, %.loc13_20.2 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.5: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_38.6: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.5
// CHECK:STDOUT: %.loc13_24.2: init %empty_tuple.type = tuple_init () to %.loc13_38.6 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.7: init %empty_tuple.type = converted %.loc13_24.1, %.loc13_24.2 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.8: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_38.9: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.8
// CHECK:STDOUT: %.loc13_28.2: init %empty_tuple.type = tuple_init () to %.loc13_38.9 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.10: init %empty_tuple.type = converted %.loc13_28.1, %.loc13_28.2 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.11: i32 = int_value 3 [template = constants.%.14]
// CHECK:STDOUT: %.loc13_38.12: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.11
// CHECK:STDOUT: %.loc13_32.2: init %empty_tuple.type = tuple_init () to %.loc13_38.12 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.13: init %empty_tuple.type = converted %.loc13_32.1, %.loc13_32.2 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.14: i32 = int_value 4 [template = constants.%.15]
// CHECK:STDOUT: %.loc13_38.15: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.14
// CHECK:STDOUT: %.loc13_36.2: init %empty_tuple.type = tuple_init () to %.loc13_38.15 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.16: init %empty_tuple.type = converted %.loc13_36.1, %.loc13_36.2 [template = constants.%empty_tuple]
// CHECK:STDOUT: %.loc13_38.17: init %.12 = array_init (%.loc13_38.4, %.loc13_38.7, %.loc13_38.10, %.loc13_38.13, %.loc13_38.16) to file.%c.var [template = constants.%array.3]
// CHECK:STDOUT: %.loc13_39: init %.12 = converted %.loc13_38.1, %.loc13_38.17 [template = constants.%array.3]
// CHECK:STDOUT: assign file.%c.var, %.loc13_39
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+33 -33
View File
@@ -17,18 +17,18 @@ let b: [i32; 3]* = &a;
// 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: %.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 {
@@ -74,20 +74,20 @@ let b: [i32; 3]* = &a;
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add]
// CHECK:STDOUT: %.loc13_18: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_21: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_18, %.loc13_21) [template = constants.%.4]
// CHECK:STDOUT: %.loc13_18: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_21: i32 = int_value 2 [template = constants.%.2]
// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_18, %.loc13_21) [template = constants.%.3]
// 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]
// CHECK:STDOUT: %.loc13_23: type = array_type %int.sadd, i32 [template = constants.%.5]
// CHECK:STDOUT: %a.var: ref %.5 = var a
// CHECK:STDOUT: %a: ref %.5 = bind_name a, %a.var
// CHECK:STDOUT: %.loc13_23: type = array_type %int.sadd, i32 [template = constants.%.4]
// CHECK:STDOUT: %a.var: ref %.4 = var a
// CHECK:STDOUT: %a: ref %.4 = bind_name a, %a.var
// CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_14: i32 = int_value 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_14: i32 = int_value 3 [template = constants.%.3]
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32]
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32.loc14, %.loc14_9.1 [template = i32]
// CHECK:STDOUT: %.loc14_15: type = array_type %.loc14_14, i32 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_16: type = ptr_type %.5 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_15: type = array_type %.loc14_14, i32 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_16: type = ptr_type %.4 [template = constants.%.5]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
@@ -96,25 +96,25 @@ let b: [i32; 3]* = &a;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc13_28: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_31: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_34: i32 = int_value 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc13_35.1: %.7 = tuple_literal (%.loc13_28, %.loc13_31, %.loc13_34)
// CHECK:STDOUT: %.loc13_35.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc13_28: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_31: i32 = int_value 2 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_34: i32 = int_value 3 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_35.1: %tuple.type = tuple_literal (%.loc13_28, %.loc13_31, %.loc13_34)
// CHECK:STDOUT: %.loc13_35.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_35.3: ref i32 = array_index file.%a.var, %.loc13_35.2
// CHECK:STDOUT: %.loc13_35.4: init i32 = initialize_from %.loc13_28 to %.loc13_35.3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_35.5: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_35.4: init i32 = initialize_from %.loc13_28 to %.loc13_35.3 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_35.5: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_35.6: ref i32 = array_index file.%a.var, %.loc13_35.5
// CHECK:STDOUT: %.loc13_35.7: init i32 = initialize_from %.loc13_31 to %.loc13_35.6 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_35.8: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_35.7: init i32 = initialize_from %.loc13_31 to %.loc13_35.6 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_35.8: i32 = int_value 2 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_35.9: ref i32 = array_index file.%a.var, %.loc13_35.8
// CHECK:STDOUT: %.loc13_35.10: init i32 = initialize_from %.loc13_34 to %.loc13_35.9 [template = constants.%.4]
// CHECK:STDOUT: %.loc13_35.11: init %.5 = array_init (%.loc13_35.4, %.loc13_35.7, %.loc13_35.10) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc13_36: init %.5 = converted %.loc13_35.1, %.loc13_35.11 [template = constants.%array]
// CHECK:STDOUT: %.loc13_35.10: init i32 = initialize_from %.loc13_34 to %.loc13_35.9 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_35.11: init %.4 = array_init (%.loc13_35.4, %.loc13_35.7, %.loc13_35.10) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc13_36: init %.4 = converted %.loc13_35.1, %.loc13_35.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%a.var, %.loc13_36
// CHECK:STDOUT: %a.ref: ref %.5 = name_ref a, file.%a
// CHECK:STDOUT: %.loc14: %.6 = addr_of %a.ref
// CHECK:STDOUT: %b: %.6 = bind_name b, %.loc14
// CHECK:STDOUT: %a.ref: ref %.4 = name_ref a, file.%a
// CHECK:STDOUT: %.loc14: %.5 = addr_of %a.ref
// CHECK:STDOUT: %b: %.5 = bind_name b, %.loc14
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+5 -5
View File
@@ -19,12 +19,12 @@ var a: [i32; Negate(1)];
// 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: %Negate.type: type = fn_type @Negate [template]
// CHECK:STDOUT: %Negate: %Negate.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value -1 [template]
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value -1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -62,8 +62,8 @@ var a: [i32; Negate(1)];
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate]
// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc16_21) [template = constants.%.3]
// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %int.snegate: init i32 = call %Negate.ref(%.loc16_21) [template = constants.%.2]
// CHECK:STDOUT: %.loc16_9.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc16_9.2: type = converted %int.make_type_32, %.loc16_9.1 [template = i32]
// CHECK:STDOUT: %.loc16_23: type = array_type %int.snegate, i32 [template = <error>]
+13 -13
View File
@@ -33,9 +33,9 @@ var b: [1; 39999999999999999993];
// 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: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template]
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
@@ -45,14 +45,14 @@ var b: [1; 39999999999999999993];
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic]
// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.6 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template]
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic]
// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.6: %.2 = assoc_entity element0, imports.%import_ref.7 [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -65,7 +65,7 @@ var b: [1; 39999999999999999993];
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+55, unloaded
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)]
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.2) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.6)]
// CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+70, unloaded
// CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+70, unloaded
// CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+70, unloaded
@@ -84,7 +84,7 @@ var b: [1; 39999999999999999993];
// CHECK:STDOUT: %.loc18_34: type = array_type <error>, i32 [template = <error>]
// CHECK:STDOUT: %a.var: ref <error> = var a
// CHECK:STDOUT: %a: ref <error> = bind_name a, %a.var
// CHECK:STDOUT: %.loc30_9.1: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc30_9.1: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc30_9.2: type = converted %.loc30_9.1, <error> [template = <error>]
// CHECK:STDOUT: %.loc30_32: type = array_type <error>, <error> [template = <error>]
// CHECK:STDOUT: %b.var: ref <error> = var b
@@ -100,8 +100,8 @@ var b: [1; 39999999999999999993];
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.3)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: !members:
@@ -151,7 +151,7 @@ var b: [1; 39999999999999999993];
// CHECK:STDOUT: %Self => constants.%Self.2
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
// CHECK:STDOUT: %Convert => constants.%Convert.2
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: %.2 => constants.%.6
// CHECK:STDOUT: %.1 => constants.%.4
// CHECK:STDOUT: %.2 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
+11 -11
View File
@@ -21,7 +21,7 @@ var a: [1; 1];
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template]
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.2: type = interface_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
@@ -30,14 +30,14 @@ var a: [1; 1];
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
// CHECK:STDOUT: %.3: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.5 [symbolic]
// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.5 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(type) [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(type) [template]
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template]
// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic]
// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [template]
// CHECK:STDOUT: %.6: %.2 = assoc_entity element0, imports.%import_ref.6 [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -48,7 +48,7 @@ var a: [1; 1];
// CHECK:STDOUT: }
// CHECK:STDOUT: %import_ref.1: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs]
// CHECK:STDOUT: %import_ref.2 = import_ref Core//prelude/operators/as, inst+55, unloaded
// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.3) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.7)]
// CHECK:STDOUT: %import_ref.3: @ImplicitAs.%.1 (%.2) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.6)]
// CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+70, unloaded
// CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+70, unloaded
// CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+70, unloaded
@@ -77,8 +77,8 @@ var a: [1; 1];
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.3) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.4)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.5 [symbolic = %.2 (constants.%.3)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: !members:
@@ -126,7 +126,7 @@ var a: [1; 1];
// CHECK:STDOUT: %Self => constants.%Self.2
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
// CHECK:STDOUT: %Convert => constants.%Convert.2
// CHECK:STDOUT: %.1 => constants.%.5
// CHECK:STDOUT: %.2 => constants.%.6
// CHECK:STDOUT: %.1 => constants.%.4
// CHECK:STDOUT: %.2 => constants.%.5
// CHECK:STDOUT: }
// CHECK:STDOUT:
+15 -15
View File
@@ -17,14 +17,14 @@ var a: [i32; 1] = (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: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %.6: i32 = int_value 3 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.1: i32 = int_value 1 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 2 [template]
// CHECK:STDOUT: %.5: i32 = int_value 3 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -43,22 +43,22 @@ var a: [i32; 1] = (1, 2, 3);
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_14: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_14: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc14_9.2: type = converted %int.make_type_32, %.loc14_9.1 [template = i32]
// CHECK:STDOUT: %.loc14_15: type = array_type %.loc14_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc14_15: type = array_type %.loc14_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_23: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_26: i32 = int_value 3 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_27: %.7 = tuple_literal (%.loc14_20, %.loc14_23, %.loc14_26)
// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.1]
// CHECK:STDOUT: %.loc14_23: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_26: i32 = int_value 3 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_27: %tuple.type = tuple_literal (%.loc14_20, %.loc14_23, %.loc14_26)
// CHECK:STDOUT: assign file.%a.var, <error>
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -18,18 +18,18 @@ var b: i32 = a[{.index = 3}.index];
// 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: %.2: i32 = int_value 3 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template]
// CHECK:STDOUT: %.9: type = struct_type {.index: i32} [template]
// CHECK:STDOUT: %struct: %.9 = struct_value (%.2) [template]
// CHECK:STDOUT: %.1: i32 = int_value 3 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: %.7: type = struct_type {.index: i32} [template]
// CHECK:STDOUT: %struct: %.7 = struct_value (%.1) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -49,12 +49,12 @@ var b: i32 = a[{.index = 3}.index];
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 3 [template = constants.%.1]
// 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: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc15_8.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32]
// CHECK:STDOUT: %.loc15_8.2: type = converted %int.make_type_32.loc15, %.loc15_8.1 [template = i32]
@@ -66,28 +66,28 @@ var b: i32 = a[{.index = 3}.index];
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_23: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_26: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_27.1: %.7 = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26)
// CHECK:STDOUT: %.loc11_27.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_23: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_26: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26)
// CHECK:STDOUT: %.loc11_27.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_27.3: ref i32 = array_index file.%a.var, %.loc11_27.2
// CHECK:STDOUT: %.loc11_27.4: init i32 = initialize_from %.loc11_20 to %.loc11_27.3 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.5: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.4: init i32 = initialize_from %.loc11_20 to %.loc11_27.3 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_27.5: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_27.6: ref i32 = array_index file.%a.var, %.loc11_27.5
// CHECK:STDOUT: %.loc11_27.7: init i32 = initialize_from %.loc11_23 to %.loc11_27.6 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_27.8: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_27.7: init i32 = initialize_from %.loc11_23 to %.loc11_27.6 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.8: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.9: ref i32 = array_index file.%a.var, %.loc11_27.8
// CHECK:STDOUT: %.loc11_27.10: init i32 = initialize_from %.loc11_26 to %.loc11_27.9 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_27.11: init %.3 = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array]
// CHECK:STDOUT: %.loc11_27.10: init i32 = initialize_from %.loc11_26 to %.loc11_27.9 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_27.11: init %.2 = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%a.var, %.loc11_28
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
// CHECK:STDOUT: %.loc15_26: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc15_27.1: %.9 = struct_literal (%.loc15_26)
// CHECK:STDOUT: %struct: %.9 = struct_value (%.loc15_26) [template = constants.%struct]
// CHECK:STDOUT: %.loc15_27.2: %.9 = converted %.loc15_27.1, %struct [template = constants.%struct]
// CHECK:STDOUT: %.loc15_28: i32 = struct_access %.loc15_27.2, element0 [template = constants.%.2]
// CHECK:STDOUT: %a.ref: ref %.2 = name_ref a, file.%a
// CHECK:STDOUT: %.loc15_26: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc15_27.1: %.7 = struct_literal (%.loc15_26)
// CHECK:STDOUT: %struct: %.7 = struct_value (%.loc15_26) [template = constants.%struct]
// CHECK:STDOUT: %.loc15_27.2: %.7 = converted %.loc15_27.1, %struct [template = constants.%struct]
// CHECK:STDOUT: %.loc15_28: i32 = struct_access %.loc15_27.2, element0 [template = constants.%.1]
// CHECK:STDOUT: %.loc15_34.1: ref i32 = array_index %a.ref, %.loc15_28 [template = <error>]
// CHECK:STDOUT: %.loc15_34.2: i32 = bind_value %.loc15_34.1
// CHECK:STDOUT: assign file.%b.var, %.loc15_34.2
+63 -63
View File
@@ -43,17 +43,17 @@ var d: [i32; 3] = t2;
// 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: %.2: i32 = int_value 3 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: type = ptr_type String [template]
// CHECK:STDOUT: %.7: String = string_literal "Hello" [template]
// CHECK:STDOUT: %.8: String = string_literal "World" [template]
// CHECK:STDOUT: %.9: type = tuple_type (i32, String, String) [template]
// CHECK:STDOUT: %.10: i32 = int_value 0 [template]
// CHECK:STDOUT: %.1: i32 = int_value 3 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: type = ptr_type String [template]
// CHECK:STDOUT: %.6: String = string_literal "Hello" [template]
// CHECK:STDOUT: %.7: String = string_literal "World" [template]
// CHECK:STDOUT: %tuple.type.1: type = tuple_type (i32, String, String) [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template]
// CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template]
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
@@ -63,21 +63,21 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic]
// CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
// CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic]
// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [symbolic]
// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic]
// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.6 [symbolic]
// CHECK:STDOUT: %ImplicitAs.type.3: type = interface_type @ImplicitAs, @ImplicitAs(i32) [template]
// CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert, @ImplicitAs(i32) [template]
// CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template]
// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.15: %.11 = assoc_entity element0, imports.%import_ref.7 [symbolic]
// CHECK:STDOUT: %.16: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %.17: type = tuple_type (i32, %.6, %.6) [template]
// CHECK:STDOUT: %.18: type = ptr_type %.17 [template]
// CHECK:STDOUT: %.19: i32 = int_value 2 [template]
// CHECK:STDOUT: %.20: type = tuple_type (i32, i32) [template]
// CHECK:STDOUT: %.21: type = tuple_type (type, type) [template]
// CHECK:STDOUT: %.22: type = ptr_type %.20 [template]
// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template]
// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.7 [symbolic]
// CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %tuple.type.3: type = tuple_type (i32, %.5, %.5) [template]
// CHECK:STDOUT: %.14: type = ptr_type %tuple.type.3 [template]
// CHECK:STDOUT: %.15: i32 = int_value 2 [template]
// CHECK:STDOUT: %tuple.type.4: type = tuple_type (i32, i32) [template]
// CHECK:STDOUT: %tuple.type.5: type = tuple_type (type, type) [template]
// CHECK:STDOUT: %.16: type = ptr_type %tuple.type.4 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -90,7 +90,7 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32]
// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs]
// CHECK:STDOUT: %import_ref.3 = import_ref Core//prelude/operators/as, inst+55, unloaded
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.11) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)]
// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.9) = import_ref Core//prelude/operators/as, inst+77, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)]
// CHECK:STDOUT: %import_ref.5 = import_ref Core//prelude/operators/as, inst+70, unloaded
// CHECK:STDOUT: %import_ref.6 = import_ref Core//prelude/operators/as, inst+70, unloaded
// CHECK:STDOUT: %import_ref.7 = import_ref Core//prelude/operators/as, inst+70, unloaded
@@ -108,50 +108,50 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32.loc18: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc18_14: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc18_14: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc18_9.1: type = value_of_initializer %int.make_type_32.loc18 [template = i32]
// CHECK:STDOUT: %.loc18_9.2: type = converted %int.make_type_32.loc18, %.loc18_9.1 [template = i32]
// CHECK:STDOUT: %.loc18_15: type = array_type %.loc18_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc18_15: type = array_type %.loc18_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: %int.make_type_32.loc20: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc20_29.1: %.16 = tuple_literal (%int.make_type_32.loc20, String, String)
// CHECK:STDOUT: %.loc20_29.1: %tuple.type.2 = tuple_literal (%int.make_type_32.loc20, String, String)
// CHECK:STDOUT: %.loc20_29.2: type = value_of_initializer %int.make_type_32.loc20 [template = i32]
// CHECK:STDOUT: %.loc20_29.3: type = converted %int.make_type_32.loc20, %.loc20_29.2 [template = i32]
// CHECK:STDOUT: %.loc20_29.4: type = converted %.loc20_29.1, constants.%.9 [template = constants.%.9]
// CHECK:STDOUT: %t1.var: ref %.9 = var t1
// CHECK:STDOUT: %t1: ref %.9 = bind_name t1, %t1.var
// CHECK:STDOUT: %.loc20_29.4: type = converted %.loc20_29.1, constants.%tuple.type.1 [template = constants.%tuple.type.1]
// CHECK:STDOUT: %t1.var: ref %tuple.type.1 = var t1
// CHECK:STDOUT: %t1: ref %tuple.type.1 = bind_name t1, %t1.var
// CHECK:STDOUT: %int.make_type_32.loc28: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc28_14: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc28_14: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc28_9.1: type = value_of_initializer %int.make_type_32.loc28 [template = i32]
// CHECK:STDOUT: %.loc28_9.2: type = converted %int.make_type_32.loc28, %.loc28_9.1 [template = i32]
// CHECK:STDOUT: %.loc28_15: type = array_type %.loc28_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %b.var: ref %.3 = var b
// CHECK:STDOUT: %b: ref %.3 = bind_name b, %b.var
// CHECK:STDOUT: %.loc28_15: type = array_type %.loc28_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %b.var: ref %.2 = var b
// CHECK:STDOUT: %b: ref %.2 = bind_name b, %b.var
// CHECK:STDOUT: %int.make_type_32.loc34: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc34_14: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc34_14: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc34_9.1: type = value_of_initializer %int.make_type_32.loc34 [template = i32]
// CHECK:STDOUT: %.loc34_9.2: type = converted %int.make_type_32.loc34, %.loc34_9.1 [template = i32]
// CHECK:STDOUT: %.loc34_15: type = array_type %.loc34_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %c.var: ref %.3 = var c
// CHECK:STDOUT: %c: ref %.3 = bind_name c, %c.var
// CHECK:STDOUT: %.loc34_15: type = array_type %.loc34_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %c.var: ref %.2 = var c
// CHECK:STDOUT: %c: ref %.2 = bind_name c, %c.var
// CHECK:STDOUT: %int.make_type_32.loc36_10: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc36_15: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc36_18.1: %.21 = tuple_literal (%int.make_type_32.loc36_10, %int.make_type_32.loc36_15)
// CHECK:STDOUT: %.loc36_18.1: %tuple.type.5 = tuple_literal (%int.make_type_32.loc36_10, %int.make_type_32.loc36_15)
// CHECK:STDOUT: %.loc36_18.2: type = value_of_initializer %int.make_type_32.loc36_10 [template = i32]
// CHECK:STDOUT: %.loc36_18.3: type = converted %int.make_type_32.loc36_10, %.loc36_18.2 [template = i32]
// CHECK:STDOUT: %.loc36_18.4: type = value_of_initializer %int.make_type_32.loc36_15 [template = i32]
// CHECK:STDOUT: %.loc36_18.5: type = converted %int.make_type_32.loc36_15, %.loc36_18.4 [template = i32]
// CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%.20 [template = constants.%.20]
// CHECK:STDOUT: %t2.var: ref %.20 = var t2
// CHECK:STDOUT: %t2: ref %.20 = bind_name t2, %t2.var
// CHECK:STDOUT: %.loc36_18.6: type = converted %.loc36_18.1, constants.%tuple.type.4 [template = constants.%tuple.type.4]
// CHECK:STDOUT: %t2.var: ref %tuple.type.4 = var t2
// CHECK:STDOUT: %t2: ref %tuple.type.4 = bind_name t2, %t2.var
// CHECK:STDOUT: %int.make_type_32.loc40: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc40_14: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc40_14: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc40_9.1: type = value_of_initializer %int.make_type_32.loc40 [template = i32]
// CHECK:STDOUT: %.loc40_9.2: type = converted %int.make_type_32.loc40, %.loc40_9.1 [template = i32]
// CHECK:STDOUT: %.loc40_15: type = array_type %.loc40_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %d.var: ref %.3 = var d
// CHECK:STDOUT: %d: ref %.3 = bind_name d, %d.var
// CHECK:STDOUT: %.loc40_15: type = array_type %.loc40_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %d.var: ref %.2 = var d
// CHECK:STDOUT: %d: ref %.2 = bind_name d, %d.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) {
@@ -163,8 +163,8 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)]
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.12)]
// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.9)]
// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.10)]
// CHECK:STDOUT:
// CHECK:STDOUT: interface {
// CHECK:STDOUT: !members:
@@ -186,29 +186,29 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc18_20: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc18_23: String = string_literal "Hello" [template = constants.%.7]
// CHECK:STDOUT: %.loc18_32: String = string_literal "World" [template = constants.%.8]
// CHECK:STDOUT: %.loc18_39.1: %.9 = tuple_literal (%.loc18_20, %.loc18_23, %.loc18_32)
// CHECK:STDOUT: %.loc18_39.2: i32 = int_value 0 [template = constants.%.10]
// CHECK:STDOUT: %.loc18_20: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc18_23: String = string_literal "Hello" [template = constants.%.6]
// CHECK:STDOUT: %.loc18_32: String = string_literal "World" [template = constants.%.7]
// CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%.loc18_20, %.loc18_23, %.loc18_32)
// CHECK:STDOUT: %.loc18_39.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc18_39.3: ref i32 = array_index file.%a.var, %.loc18_39.2
// CHECK:STDOUT: %.loc18_39.4: init i32 = initialize_from %.loc18_20 to %.loc18_39.3 [template = constants.%.5]
// CHECK:STDOUT: %.loc18_39.4: init i32 = initialize_from %.loc18_20 to %.loc18_39.3 [template = constants.%.4]
// CHECK:STDOUT: %.loc18_39.5: i32 = converted %.loc18_23, <error> [template = <error>]
// CHECK:STDOUT: assign file.%a.var, <error>
// CHECK:STDOUT: %t1.ref: ref %.9 = name_ref t1, file.%t1
// CHECK:STDOUT: %t1.ref: ref %tuple.type.1 = name_ref t1, file.%t1
// CHECK:STDOUT: %.loc28_19.1: ref i32 = tuple_access %t1.ref, element0
// CHECK:STDOUT: %.loc28_19.2: i32 = bind_value %.loc28_19.1
// CHECK:STDOUT: %.loc28_19.3: i32 = int_value 0 [template = constants.%.10]
// CHECK:STDOUT: %.loc28_19.3: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc28_19.4: ref i32 = array_index file.%b.var, %.loc28_19.3
// CHECK:STDOUT: %.loc28_19.5: init i32 = initialize_from %.loc28_19.2 to %.loc28_19.4
// CHECK:STDOUT: %.loc28_19.6: ref String = tuple_access %t1.ref, element1
// CHECK:STDOUT: %.loc28_19.7: i32 = converted %.loc28_19.6, <error> [template = <error>]
// CHECK:STDOUT: assign file.%b.var, <error>
// CHECK:STDOUT: %.loc34_20: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc34_23: i32 = int_value 2 [template = constants.%.19]
// CHECK:STDOUT: %.loc34_24: %.20 = tuple_literal (%.loc34_20, %.loc34_23)
// CHECK:STDOUT: %.loc34_20: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc34_23: i32 = int_value 2 [template = constants.%.15]
// CHECK:STDOUT: %.loc34_24: %tuple.type.4 = tuple_literal (%.loc34_20, %.loc34_23)
// CHECK:STDOUT: assign file.%c.var, <error>
// CHECK:STDOUT: %t2.ref: ref %.20 = name_ref t2, file.%t2
// CHECK:STDOUT: %t2.ref: ref %tuple.type.4 = name_ref t2, file.%t2
// CHECK:STDOUT: assign file.%d.var, <error>
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -243,7 +243,7 @@ var d: [i32; 3] = t2;
// CHECK:STDOUT: %Self => constants.%Self.2
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2
// CHECK:STDOUT: %Convert => constants.%Convert.2
// CHECK:STDOUT: %.1 => constants.%.13
// CHECK:STDOUT: %.2 => constants.%.14
// CHECK:STDOUT: %.1 => constants.%.11
// CHECK:STDOUT: %.2 => constants.%.12
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1 -1
View File
@@ -17,7 +17,7 @@ var a: [i32; ];
// 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: }
// CHECK:STDOUT:
+34 -34
View File
@@ -20,20 +20,20 @@ fn G() -> i32 {
// 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: %.2: i32 = int_value 3 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.1: i32 = int_value 3 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -53,26 +53,26 @@ fn G() -> i32 {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
// CHECK:STDOUT: %arr.patt: %.3 = binding_pattern arr
// CHECK:STDOUT: %arr.param_patt: %.3 = value_param_pattern %arr.patt, runtime_param0
// CHECK:STDOUT: %arr.patt: %.2 = binding_pattern arr
// CHECK:STDOUT: %arr.param_patt: %.2 = value_param_pattern %arr.patt, runtime_param0
// CHECK:STDOUT: %i.patt: i32 = binding_pattern i
// CHECK:STDOUT: %i.param_patt: i32 = value_param_pattern %i.patt, runtime_param1
// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param2
// CHECK:STDOUT: } {
// CHECK:STDOUT: %int.make_type_32.loc11_12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_17: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_17: i32 = int_value 3 [template = constants.%.1]
// 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]
// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.3]
// CHECK:STDOUT: %.loc11_18: type = array_type %.loc11_17, i32 [template = constants.%.2]
// CHECK:STDOUT: %int.make_type_32.loc11_24: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_32.loc11_24 [template = i32]
// CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_32.loc11_24, %.loc11_24.1 [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc11_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_32.1: type = value_of_initializer %int.make_type_32.loc11_32 [template = i32]
// CHECK:STDOUT: %.loc11_32.2: type = converted %int.make_type_32.loc11_32, %.loc11_32.1 [template = i32]
// CHECK:STDOUT: %arr.param: %.3 = value_param runtime_param0
// CHECK:STDOUT: %arr: %.3 = bind_name arr, %arr.param
// CHECK:STDOUT: %arr.param: %.2 = value_param runtime_param0
// CHECK:STDOUT: %arr: %.2 = bind_name arr, %arr.param
// CHECK:STDOUT: %i.param: i32 = value_param runtime_param1
// CHECK:STDOUT: %i: i32 = bind_name i, %i.param
// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param2
@@ -92,11 +92,11 @@ fn G() -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%arr.param_patt: %.3, %i.param_patt: i32) -> i32 {
// CHECK:STDOUT: fn @F(%arr.param_patt: %.2, %i.param_patt: i32) -> i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %arr.ref: %.3 = name_ref arr, %arr
// CHECK:STDOUT: %arr.ref: %.2 = name_ref arr, %arr
// CHECK:STDOUT: %i.ref: i32 = name_ref i, %i
// CHECK:STDOUT: %.loc12_15.1: ref %.3 = value_as_ref %arr.ref
// CHECK:STDOUT: %.loc12_15.1: ref %.2 = value_as_ref %arr.ref
// CHECK:STDOUT: %.loc12_15.2: ref i32 = array_index %.loc12_15.1, %i.ref
// CHECK:STDOUT: %.loc12_15.3: i32 = bind_value %.loc12_15.2
// CHECK:STDOUT: return %.loc12_15.3
@@ -105,25 +105,25 @@ fn G() -> i32 {
// CHECK:STDOUT: fn @G() -> i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %.loc16_13: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_16: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_19: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc16_20.1: %.7 = tuple_literal (%.loc16_13, %.loc16_16, %.loc16_19)
// CHECK:STDOUT: %.loc16_23: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_20.2: ref %.3 = temporary_storage
// CHECK:STDOUT: %.loc16_20.3: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc16_13: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc16_16: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_19: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%.loc16_13, %.loc16_16, %.loc16_19)
// CHECK:STDOUT: %.loc16_23: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc16_20.2: ref %.2 = temporary_storage
// CHECK:STDOUT: %.loc16_20.3: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_20.4: ref i32 = array_index %.loc16_20.2, %.loc16_20.3
// CHECK:STDOUT: %.loc16_20.5: init i32 = initialize_from %.loc16_13 to %.loc16_20.4 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_20.6: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_20.5: init i32 = initialize_from %.loc16_13 to %.loc16_20.4 [template = constants.%.4]
// CHECK:STDOUT: %.loc16_20.6: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc16_20.7: ref i32 = array_index %.loc16_20.2, %.loc16_20.6
// CHECK:STDOUT: %.loc16_20.8: init i32 = initialize_from %.loc16_16 to %.loc16_20.7 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_20.9: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_20.8: init i32 = initialize_from %.loc16_16 to %.loc16_20.7 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_20.9: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_20.10: ref i32 = array_index %.loc16_20.2, %.loc16_20.9
// CHECK:STDOUT: %.loc16_20.11: init i32 = initialize_from %.loc16_19 to %.loc16_20.10 [template = constants.%.2]
// CHECK:STDOUT: %.loc16_20.12: init %.3 = array_init (%.loc16_20.5, %.loc16_20.8, %.loc16_20.11) to %.loc16_20.2 [template = constants.%array]
// CHECK:STDOUT: %.loc16_20.13: init %.3 = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array]
// CHECK:STDOUT: %.loc16_20.14: ref %.3 = temporary %.loc16_20.2, %.loc16_20.13
// CHECK:STDOUT: %.loc16_20.15: %.3 = bind_value %.loc16_20.14
// CHECK:STDOUT: %.loc16_20.11: init i32 = initialize_from %.loc16_19 to %.loc16_20.10 [template = constants.%.1]
// CHECK:STDOUT: %.loc16_20.12: init %.2 = array_init (%.loc16_20.5, %.loc16_20.8, %.loc16_20.11) to %.loc16_20.2 [template = constants.%array]
// CHECK:STDOUT: %.loc16_20.13: init %.2 = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array]
// CHECK:STDOUT: %.loc16_20.14: ref %.2 = temporary %.loc16_20.2, %.loc16_20.13
// CHECK:STDOUT: %.loc16_20.15: %.2 = bind_value %.loc16_20.14
// CHECK:STDOUT: %F.call: init i32 = call %F.ref(%.loc16_20.15, %.loc16_23)
// CHECK:STDOUT: %.loc16_25.1: i32 = value_of_initializer %F.call
// CHECK:STDOUT: %.loc16_25.2: i32 = converted %F.call, %.loc16_25.1
+14 -14
View File
@@ -19,12 +19,12 @@ fn G(T:! type) {
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %.1: type = tuple_type () [template]
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, %T [symbolic]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic]
// CHECK:STDOUT: %array: %.3 = tuple_value () [symbolic]
// CHECK:STDOUT: %.1: i32 = int_value 0 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, %T [symbolic]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic]
// CHECK:STDOUT: %array: %.2 = tuple_value () [symbolic]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -54,19 +54,19 @@ fn G(T:! type) {
// CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %.loc13_17.2: type = array_type constants.%.2, @G.%T.loc11_6.2 (%T) [symbolic = %.loc13_17.2 (constants.%.3)]
// CHECK:STDOUT: %array: @G.%.loc13_17.2 (%.3) = tuple_value () [symbolic = %array (constants.%array)]
// CHECK:STDOUT: %.loc13_17.2: type = array_type constants.%.1, @G.%T.loc11_6.2 (%T) [symbolic = %.loc13_17.2 (constants.%.2)]
// CHECK:STDOUT: %array: @G.%.loc13_17.2 (%.2) = tuple_value () [symbolic = %array (constants.%array)]
// CHECK:STDOUT:
// CHECK:STDOUT: fn(%T.param_patt: type) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)]
// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_17.1: type = array_type %.loc13_16, %T [symbolic = %.loc13_17.2 (constants.%.3)]
// CHECK:STDOUT: %arr.var: ref @G.%.loc13_17.2 (%.3) = var arr
// CHECK:STDOUT: %arr: ref @G.%.loc13_17.2 (%.3) = bind_name arr, %arr.var
// CHECK:STDOUT: %.loc13_22.1: %.1 = tuple_literal ()
// CHECK:STDOUT: %.loc13_22.2: init @G.%.loc13_17.2 (%.3) = array_init () to %arr.var [symbolic = %array (constants.%array)]
// CHECK:STDOUT: %.loc13_23: init @G.%.loc13_17.2 (%.3) = converted %.loc13_22.1, %.loc13_22.2 [symbolic = %array (constants.%array)]
// CHECK:STDOUT: %.loc13_16: i32 = int_value 0 [template = constants.%.1]
// CHECK:STDOUT: %.loc13_17.1: type = array_type %.loc13_16, %T [symbolic = %.loc13_17.2 (constants.%.2)]
// CHECK:STDOUT: %arr.var: ref @G.%.loc13_17.2 (%.2) = var arr
// CHECK:STDOUT: %arr: ref @G.%.loc13_17.2 (%.2) = bind_name arr, %arr.var
// CHECK:STDOUT: %.loc13_22.1: %empty_tuple.type = tuple_literal ()
// CHECK:STDOUT: %.loc13_22.2: init @G.%.loc13_17.2 (%.2) = array_init () to %arr.var [symbolic = %array (constants.%array)]
// CHECK:STDOUT: %.loc13_23: init @G.%.loc13_17.2 (%.2) = converted %.loc13_22.1, %.loc13_22.2 [symbolic = %array (constants.%array)]
// CHECK:STDOUT: assign %arr.var, %.loc13_23
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+33 -33
View File
@@ -15,18 +15,18 @@ var b: i32 = a[{.index = 2}.index];
// 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: %.2: i32 = int_value 3 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template]
// CHECK:STDOUT: %.9: type = struct_type {.index: i32} [template]
// CHECK:STDOUT: %struct: %.9 = struct_value (%.6) [template]
// CHECK:STDOUT: %.1: i32 = int_value 3 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.6: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.5, %.1) [template]
// CHECK:STDOUT: %.7: type = struct_type {.index: i32} [template]
// CHECK:STDOUT: %struct: %.7 = struct_value (%.5) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -46,12 +46,12 @@ var b: i32 = a[{.index = 2}.index];
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32.loc11: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 3 [template = constants.%.1]
// 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: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: %int.make_type_32.loc12: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc12_8.1: type = value_of_initializer %int.make_type_32.loc12 [template = i32]
// CHECK:STDOUT: %.loc12_8.2: type = converted %int.make_type_32.loc12, %.loc12_8.1 [template = i32]
@@ -63,28 +63,28 @@ var b: i32 = a[{.index = 2}.index];
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_23: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_26: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_27.1: %.7 = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26)
// CHECK:STDOUT: %.loc11_27.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_23: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_26: i32 = int_value 3 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26)
// CHECK:STDOUT: %.loc11_27.2: i32 = int_value 0 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_27.3: ref i32 = array_index file.%a.var, %.loc11_27.2
// CHECK:STDOUT: %.loc11_27.4: init i32 = initialize_from %.loc11_20 to %.loc11_27.3 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.5: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.4: init i32 = initialize_from %.loc11_20 to %.loc11_27.3 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_27.5: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_27.6: ref i32 = array_index file.%a.var, %.loc11_27.5
// CHECK:STDOUT: %.loc11_27.7: init i32 = initialize_from %.loc11_23 to %.loc11_27.6 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_27.8: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_27.7: init i32 = initialize_from %.loc11_23 to %.loc11_27.6 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.8: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_27.9: ref i32 = array_index file.%a.var, %.loc11_27.8
// CHECK:STDOUT: %.loc11_27.10: init i32 = initialize_from %.loc11_26 to %.loc11_27.9 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_27.11: init %.3 = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array]
// CHECK:STDOUT: %.loc11_27.10: init i32 = initialize_from %.loc11_26 to %.loc11_27.9 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_27.11: init %.2 = array_init (%.loc11_27.4, %.loc11_27.7, %.loc11_27.10) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.11 [template = constants.%array]
// CHECK:STDOUT: assign file.%a.var, %.loc11_28
// CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a
// CHECK:STDOUT: %.loc12_26: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc12_27.1: %.9 = struct_literal (%.loc12_26)
// CHECK:STDOUT: %struct: %.9 = struct_value (%.loc12_26) [template = constants.%struct]
// CHECK:STDOUT: %.loc12_27.2: %.9 = converted %.loc12_27.1, %struct [template = constants.%struct]
// CHECK:STDOUT: %.loc12_28: i32 = struct_access %.loc12_27.2, element0 [template = constants.%.6]
// CHECK:STDOUT: %a.ref: ref %.2 = name_ref a, file.%a
// CHECK:STDOUT: %.loc12_26: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc12_27.1: %.7 = struct_literal (%.loc12_26)
// CHECK:STDOUT: %struct: %.7 = struct_value (%.loc12_26) [template = constants.%struct]
// CHECK:STDOUT: %.loc12_27.2: %.7 = converted %.loc12_27.1, %struct [template = constants.%struct]
// CHECK:STDOUT: %.loc12_28: i32 = struct_access %.loc12_27.2, element0 [template = constants.%.5]
// CHECK:STDOUT: %.loc12_34.1: ref i32 = array_index %a.ref, %.loc12_28
// CHECK:STDOUT: %.loc12_34.2: i32 = bind_value %.loc12_34.1
// CHECK:STDOUT: assign file.%b.var, %.loc12_34.2
+49 -49
View File
@@ -14,22 +14,22 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
// 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: %.2: i32 = int_value 9 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: i32 = int_value 3 [template]
// CHECK:STDOUT: %.8: i32 = int_value 4 [template]
// CHECK:STDOUT: %.9: i32 = int_value 5 [template]
// CHECK:STDOUT: %.10: i32 = int_value 6 [template]
// CHECK:STDOUT: %.11: i32 = int_value 7 [template]
// CHECK:STDOUT: %.12: i32 = int_value 8 [template]
// CHECK:STDOUT: %.13: type = tuple_type (i32, i32, i32, i32, i32, i32, i32, i32, i32) [template]
// CHECK:STDOUT: %.14: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.7, %.8, %.9, %.10, %.11, %.12, %.2) [template]
// CHECK:STDOUT: %.1: i32 = int_value 9 [template]
// CHECK:STDOUT: %.2: type = array_type %.1, i32 [template]
// CHECK:STDOUT: %.3: type = ptr_type %.2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %.6: i32 = int_value 3 [template]
// CHECK:STDOUT: %.7: i32 = int_value 4 [template]
// CHECK:STDOUT: %.8: i32 = int_value 5 [template]
// CHECK:STDOUT: %.9: i32 = int_value 6 [template]
// CHECK:STDOUT: %.10: i32 = int_value 7 [template]
// CHECK:STDOUT: %.11: i32 = int_value 8 [template]
// CHECK:STDOUT: %tuple.type: type = tuple_type (i32, i32, i32, i32, i32, i32, i32, i32, i32) [template]
// CHECK:STDOUT: %.12: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.2 = tuple_value (%.4, %.5, %.6, %.7, %.8, %.9, %.10, %.11, %.1) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -48,57 +48,57 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9);
// CHECK:STDOUT: }
// CHECK:STDOUT: %Core.import = import Core
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 9 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_14: i32 = int_value 9 [template = constants.%.1]
// 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: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.2]
// CHECK:STDOUT: %a.var: ref %.2 = var a
// CHECK:STDOUT: %a: ref %.2 = bind_name a, %a.var
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_23: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_26: i32 = int_value 3 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_29: i32 = int_value 4 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_32: i32 = int_value 5 [template = constants.%.9]
// CHECK:STDOUT: %.loc11_35: i32 = int_value 6 [template = constants.%.10]
// CHECK:STDOUT: %.loc11_38: i32 = int_value 7 [template = constants.%.11]
// CHECK:STDOUT: %.loc11_41: i32 = int_value 8 [template = constants.%.12]
// CHECK:STDOUT: %.loc11_44: i32 = int_value 9 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_45.1: %.13 = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26, %.loc11_29, %.loc11_32, %.loc11_35, %.loc11_38, %.loc11_41, %.loc11_44)
// CHECK:STDOUT: %.loc11_45.2: i32 = int_value 0 [template = constants.%.14]
// CHECK:STDOUT: %.loc11_20: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_23: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_26: i32 = int_value 3 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_29: i32 = int_value 4 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_32: i32 = int_value 5 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_35: i32 = int_value 6 [template = constants.%.9]
// CHECK:STDOUT: %.loc11_38: i32 = int_value 7 [template = constants.%.10]
// CHECK:STDOUT: %.loc11_41: i32 = int_value 8 [template = constants.%.11]
// CHECK:STDOUT: %.loc11_44: i32 = int_value 9 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26, %.loc11_29, %.loc11_32, %.loc11_35, %.loc11_38, %.loc11_41, %.loc11_44)
// CHECK:STDOUT: %.loc11_45.2: i32 = int_value 0 [template = constants.%.12]
// CHECK:STDOUT: %.loc11_45.3: ref i32 = array_index file.%a.var, %.loc11_45.2
// CHECK:STDOUT: %.loc11_45.4: init i32 = initialize_from %.loc11_20 to %.loc11_45.3 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_45.5: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_45.4: init i32 = initialize_from %.loc11_20 to %.loc11_45.3 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_45.5: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_45.6: ref i32 = array_index file.%a.var, %.loc11_45.5
// CHECK:STDOUT: %.loc11_45.7: init i32 = initialize_from %.loc11_23 to %.loc11_45.6 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_45.8: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_45.7: init i32 = initialize_from %.loc11_23 to %.loc11_45.6 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_45.8: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc11_45.9: ref i32 = array_index file.%a.var, %.loc11_45.8
// CHECK:STDOUT: %.loc11_45.10: init i32 = initialize_from %.loc11_26 to %.loc11_45.9 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_45.11: i32 = int_value 3 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_45.10: init i32 = initialize_from %.loc11_26 to %.loc11_45.9 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_45.11: i32 = int_value 3 [template = constants.%.6]
// CHECK:STDOUT: %.loc11_45.12: ref i32 = array_index file.%a.var, %.loc11_45.11
// CHECK:STDOUT: %.loc11_45.13: init i32 = initialize_from %.loc11_29 to %.loc11_45.12 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_45.14: i32 = int_value 4 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_45.13: init i32 = initialize_from %.loc11_29 to %.loc11_45.12 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_45.14: i32 = int_value 4 [template = constants.%.7]
// CHECK:STDOUT: %.loc11_45.15: ref i32 = array_index file.%a.var, %.loc11_45.14
// CHECK:STDOUT: %.loc11_45.16: init i32 = initialize_from %.loc11_32 to %.loc11_45.15 [template = constants.%.9]
// CHECK:STDOUT: %.loc11_45.17: i32 = int_value 5 [template = constants.%.9]
// CHECK:STDOUT: %.loc11_45.16: init i32 = initialize_from %.loc11_32 to %.loc11_45.15 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_45.17: i32 = int_value 5 [template = constants.%.8]
// CHECK:STDOUT: %.loc11_45.18: ref i32 = array_index file.%a.var, %.loc11_45.17
// CHECK:STDOUT: %.loc11_45.19: init i32 = initialize_from %.loc11_35 to %.loc11_45.18 [template = constants.%.10]
// CHECK:STDOUT: %.loc11_45.20: i32 = int_value 6 [template = constants.%.10]
// CHECK:STDOUT: %.loc11_45.19: init i32 = initialize_from %.loc11_35 to %.loc11_45.18 [template = constants.%.9]
// CHECK:STDOUT: %.loc11_45.20: i32 = int_value 6 [template = constants.%.9]
// CHECK:STDOUT: %.loc11_45.21: ref i32 = array_index file.%a.var, %.loc11_45.20
// CHECK:STDOUT: %.loc11_45.22: init i32 = initialize_from %.loc11_38 to %.loc11_45.21 [template = constants.%.11]
// CHECK:STDOUT: %.loc11_45.23: i32 = int_value 7 [template = constants.%.11]
// CHECK:STDOUT: %.loc11_45.22: init i32 = initialize_from %.loc11_38 to %.loc11_45.21 [template = constants.%.10]
// CHECK:STDOUT: %.loc11_45.23: i32 = int_value 7 [template = constants.%.10]
// CHECK:STDOUT: %.loc11_45.24: ref i32 = array_index file.%a.var, %.loc11_45.23
// CHECK:STDOUT: %.loc11_45.25: init i32 = initialize_from %.loc11_41 to %.loc11_45.24 [template = constants.%.12]
// CHECK:STDOUT: %.loc11_45.26: i32 = int_value 8 [template = constants.%.12]
// CHECK:STDOUT: %.loc11_45.25: init i32 = initialize_from %.loc11_41 to %.loc11_45.24 [template = constants.%.11]
// CHECK:STDOUT: %.loc11_45.26: i32 = int_value 8 [template = constants.%.11]
// CHECK:STDOUT: %.loc11_45.27: ref i32 = array_index file.%a.var, %.loc11_45.26
// CHECK:STDOUT: %.loc11_45.28: init i32 = initialize_from %.loc11_44 to %.loc11_45.27 [template = constants.%.2]
// CHECK:STDOUT: %.loc11_45.29: init %.3 = array_init (%.loc11_45.4, %.loc11_45.7, %.loc11_45.10, %.loc11_45.13, %.loc11_45.16, %.loc11_45.19, %.loc11_45.22, %.loc11_45.25, %.loc11_45.28) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc11_46: init %.3 = converted %.loc11_45.1, %.loc11_45.29 [template = constants.%array]
// CHECK:STDOUT: %.loc11_45.28: init i32 = initialize_from %.loc11_44 to %.loc11_45.27 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_45.29: init %.2 = array_init (%.loc11_45.4, %.loc11_45.7, %.loc11_45.10, %.loc11_45.13, %.loc11_45.16, %.loc11_45.19, %.loc11_45.22, %.loc11_45.25, %.loc11_45.28) to file.%a.var [template = constants.%array]
// CHECK:STDOUT: %.loc11_46: init %.2 = converted %.loc11_45.1, %.loc11_45.29 [template = constants.%array]
// CHECK:STDOUT: assign file.%a.var, %.loc11_46
// CHECK:STDOUT: return
// CHECK:STDOUT: }